Amanda-Users

Re: How chg-multi selects which tape to backup to.....

2005-02-14 12:20:46
Subject: Re: How chg-multi selects which tape to backup to.....
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: Vicki Stanfield <vicki AT progeny DOT com>
Date: Mon, 14 Feb 2005 18:15:14 +0100
Vicki Stanfield wrote:
I am using chg-multi with two tape drives. Sometimes my backups only
require one tape, other times both. After the weekend, I use amtape
current to determine which tape drive is current and put the first of
the two tapes asked for by amcheck in it. It doesn't always seem,
however, that amanda is writing to the next tape in sequence in the
tapelist file. I would appreciate confirmation that "amtape DailySet
current" is intended to specify which tape drive amanda expects to
search for the next tape, as specified in tapelist.

Amanda writes to first tape encountered in the changer that it finds
suitable to overwrite, i.e. not used within the last "tapecycle" and
still marked as "reuse" in tapelist.
So if you have more tapes than "tapecycle" indicates, you're
seeing this behaviour.  To strictly follow the tapelist sequence,
make this number the same.

To easily see which tapes were written to nightly, I use this script
below that ejects all used tapes.  It also avoids the trouble you're
having to predict which tape will be written to.


============= cut here =======
#!/bin/bash

CONFIG=$1

amdump  $CONFIG
LOGF=`ls -t /var/opt/amanda/$CONFIG/log.2* | head -1`
amtoc -a -t $LOGF
rsync -e ssh -az --delete /var/opt/amanda/$CONFIG \
        amandamirror:/var/opt/amanda/$CONFIG

# This works for 2 drives only :-)
grep -c '^START taper .* label ' $LOGF |
while read line
do
        /opt/local/sbin/amtape $CONFIG eject
        /opt/local/sbin/amtape $CONFIG slot prev
done
============= cut here ============



--
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:  Paul.Bijnens AT xplanation DOT com
***********************************************************************
* 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          *
***********************************************************************



<Prev in Thread] Current Thread [Next in Thread>