On 2006-09-27 16:54, McGraw, Robert P. wrote:
I run an archive once a month and would like to mark tapes that have been
used by the archive as no-reuse. I have to do this manually now.
Is there a way that this can be done automatically with an amanda
configuration parameter? I have looked for something like this and have not
seen anything but just wanted to be sure. If not any other suggestions.
Untested... (sorry, no time to test, but you get the idea...)
#!/bin/sh
# Run this command by cron instead of amdump
# like: /usr/local/bin/amandabackup archive
CONFIG=$1
amdump $CONFIG
LOGF=`ls -t /var/lib/amanda/$CONFIG/log.2* | head -1`
grep '^START taper .* label ' $LOGF |
while read start taper datestamp thedatestamp label thelabel rest
do amadmin $CONFIG no-reuse $thelabel
done
--
Paul Bijnens, xplanation Technology Services 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, *
* init 0, kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ... "Are you sure?" ... YES ... Phew ... I'm out *
***********************************************************************