Amanda-Users

Re: question about amcheck

2002-11-13 18:22:07
Subject: Re: question about amcheck
From: Niall O Broin <niall AT magicgoeshere DOT com>
To: direzione AT phitec DOT it
Date: Wed, 13 Nov 2002 22:46:16 +0000
On Wed, Nov 13, 2002 at 07:53:36PM +0100, direzione AT phitec DOT it wrote:

> I have compiled and configured my linux box with amanda 2.4.3. I need to 
> backup 
> my data on big harddisks. When I test amanda with "amcheck 13nov2002" i 
> prompts:
> insert tape into slot 1 and press return" and  this message is repeated if I 
> press
> return again and again.

A number of points:

1) If you're going to include your ENTIRE config file, then clean out the
cruft. You appended app. 550 lines of config file for Gawd's sake !

2) Please use a mail client which wraps text at a sensible line length.

3) You haven't told amanda where to backup. Your config file says, deep in
the middle of all the cruft:

tapedev "no-such-device"        # the no-rewind tape device to be used

and amanda is valiantly trying to read a tape in a device call
no-such-device which probably doesn't exist. Your holding disk entry
specifies   /DS2/dumps/amanda   so I'm going to wildly assume that this is
where you want to store your backups. (this is not what the holding disk is
for BTW - RTFM for details). If this the case, then you'll need a tapedev
entry like

tapedev "file:/DS2/dumps/amanda"

You have this

> labelstr "^13nov2002[0-9][0-9]*$"     # label constraint regex: all tapes 
> must match

for your label regex but why would you need 13nov2002 in every tape name ?
Again, you need to RTFM about this. Let's try to use the labelstr from the
example amanda.conf

labelstr "^DailySet1[0-9][0-9]*$"

which would mean that you'd have tapes labelled DailySet101, DailySet102,
DailySet103 etc. Yes, you want to backup to disk, but when backing up to
disk, amanda uses a directory as a "virtual tape".

So change your config as I've outlined and do the following (as user amanda,
and assuming your config is called Daily)

mkdir /DS2/dumps/amanda/data
amlabel Daily DailySet101

Assuming everything else in your config and setup is OK, amcheck should now
work. Now that if you RTFM for amcheck you will see that you can split up
the checks by using -c, -l and -t to check the various things - this is a
good idea when you're beginning.

Assuming that everything now works, you're not yet out of the woods. You've
only got one "tape" which is not much use.

So, you need to prepare a number of "virtual tapes". What I, and others, do
is to prepare a quantity of "tapes" and symlink tapedev to the appropriate
one before amdump runs.  So in your case, I'd change the config file again
to have

tapedev "file:/DS2/dumps/amanda/tape"

and then remove /DS2/dumps/amanda/* completely. Then use something like the
following to prepare your "tapes": (Bourne shell syntax - if you don't use a
Bourne compatible shell, either a) figure it out  or  b) Run such a shell
and then do these commands)

for tape in 01 02 03 04 05 06 07 08 09
do
  mkdir /DS2/dumps/amanda/DailySet1$tape
  mkdir /DS2/dumps/amanda/DailySet1$tape/data
  ln -s /DS2/dumps/amanda/DailySet1$tape /DS2/dumps/amanda/tape
  amlabel TIZ DailySet1$tape
  rm /DS2/dumps/amanda/tape
done

Now before your daily amdump run, you should do

rm /DS2/dumps/amanda/tape
ln -s /DS2/dumps/amanda/$TAPE /DS2/dumps/amanda/tape

Where you set $tape to the appropriate value. I use this in my daily dump
script (my daily config is called TIZ)

TAPE=`tail -1 /etc/amanda/TIZ/tapelist|awk '{print $2}'`

> Thanks for help

You're welcome, but I think you're going to have to RTFM some more.



Regards,



Niall  O Broin

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