Amanda-Users

Awkwardness with amrecover and file: device

2002-09-15 05:39:14
Subject: Awkwardness with amrecover and file: device
From: Niall O Broin <niall AT magicgoeshere DOT com>
To: amanda-users AT amanda DOT org
Date: Sun, 15 Sep 2002 10:25:33 +0100
I've recently started using the file: device for backup to some large cheap
IDE disks and it's now working well and I'm quite happy with it. However,
there is an issue of ease of use with amrecover that might be put on the
list - I noticed this during some test restores and then last night I needed
to do a real restore and the issue refreshed itself in my mind.

I'm doing what some people of the list have suggested for managing backups
to file: i.e. I symlink a directory to my 'tape drive' directory (I have  
tapedev "file:/backup/tape"

in my configuration file) . My labelstr is "^TIZdaily[0-9]*$" so I've
created a bunch of 'tapes' (directories) on my backup disk (mounted on
/backup) called TIZdaily01-50 and as I see how disk usage goes, I may create
more. 

I created my tapes like this

for tape in `seq -w 1 50`
do
  mkdir /backup/TIZdaily$tape
  mkdir /backup/TIZdaily$tape/data
  ln -s /backup/TIZdaily$tape /backup/tape
  amlabel TIZ TIZdaily$tape
  rm /backup/tape
done

and then every day my cron launched script gets the tape to be used from the
tape list into $tape and does 

rm /backup/tape
ln -s /backup/TIZdaily$tape /backup/tape

This is fine and dandy and works smoothly but then we come to use amrecover
and we face the issue of specifying the name of the tape device with -d.
What to use ? If I happen to know that the files I want are on tape
TIZdaily08 I can simply use -d file:/backup/TIZdaily08 but often you won't
know which tape you'll need. There are currently two options as I see it:

1) Specify -d file:/backup/tape and when you get a prompt like

Load tape TIZdaily08 now
Continue [?/Y/n/t]? 

you do 

rm /backup/tape
ln -s /backup/TIZdaily$tape /backup/tape

in another shell.

2) Specify anything (or nothing) with -d and when you get a prompt like

Load tape TIZdaily08 now
Continue [?/Y/n/t]?

answer t  and specify the tape device like this

Load tape TIZdaily08 now
Continue [?/Y/n/t]? t
New tape device [?]: backup:file:/backup/TIZdaily08

My backup server is called backup (imaginative, no ?) and the above syntax
is necessary because if you simply specify file:/backup/TIZdaily08 it is
assumed that you're referring to a backup server called file.

The second solution is what I'm doing because it's marginally less awkward
than the first but it still could hardly be described as smooth.

I've several proposed solutions, which I'll present in what I presume is the
order of decreasing difficulty:

1) Give amrecover an implicit understanding of the scheme I use with
directories and symlinks (or a similar scheme - I looked in the archives and
saw where somebody else used a simulated changer - I didn't use that option
because it seemed more awkward than mine) so that if it needs several
'tapes' for a recover operation it doesn't need to prompt at all because it
knows where to find the tapes and how to load them. (Does the changer
solution actually provide this ? - I didn't look in enough detail).
Presumably if this were to be done, amdump et al. would also gain an
understanding of this scheme and my daily script wouldn't have to symlink
any more.

2) Change amrecover's handling of the t subcommand slightly so that it
understands a + prefix. Then you give amrecover -d file:/backup/ and at the
+ prompt you would specify simply the tape name e.g. TIZdaily08 and
amrecover would know that to make the real tape name it simply concatenates
the -d name and the value specified with + (being smart enough to add in a
trailing / if it wasn't on the -d specified name)

3) Change amrecover to recognise when the file: device is being used so that
it wouldn't thing that  file:/backup/TIZdaily08 is referring to a server
called file.


That's it - sorry to have gone on for so long but I hope this might lead to
some useful changes in amanda. OTOH those who spend time actually developing
amanda might decide that as amrecover isn't (hopefully) actually used all
that often, I can just live with the awkwardness :-)



Kindest regards,




Niall  O Broin

<Prev in Thread] Current Thread [Next in Thread>
  • Awkwardness with amrecover and file: device, Niall O Broin <=