On Tuesday 16 March 2004 16:46, jlm17 wrote:...
I have a question about the name of the log file generated by amdump. So the format is log.date.number, where number starts at 0. If I run two amdumps in one day, would log.date.0 be the log file for the first amdump to start, or the first amdump to finish?
Amdump will mail you a report if properly configured, why not use that one?
You took the words right out of my mouth :-)
But if you want to do something else with the log file, like feeding
it to amtoc, then you do need to know which log file is the good one.
My cron executes following script each night. It runs amtoc on the right logfile, and ejects from my chg-multi drives with 2 tapes the
tapes that were written. (change the pathnames in the script!)
-------------------cut----------- #!/bin/sh
CONFIG=$1
/opt/local/sbin/amdump $CONFIG LOGF=`ls -t /var/opt/amanda/$CONFIG/log.2* | head -1` /opt/local/sbin/amtoc -a -t $LOGF
grep '^START taper .* label ' $LOGF | while read line do /opt/local/sbin/amtape $CONFIG eject /opt/local/sbin/amtape $CONFIG slot prev done -------------------cut-----------
-- Paul Bijnens, Xplanation Tel +32 16 397.511 Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM Fax +32 16 397.512 http://www.xplanation.com/ email: [EMAIL PROTECTED] *********************************************************************** * I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, F6, * * quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, * * stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt, abort, hangup, * * PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e, kill -1 $$, shutdown, * * kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... * * ... "Are you sure?" ... YES ... Phew ... I'm out * ***********************************************************************