re-index old tapes ?

2001-07-16 Thread Rainer Fuegenstein

Hi,

When installing amanda, I set up a tape cycle of about
20 DAT2 tapes named TAPE01 to TAPE20. some months ago,
I upgraded the streamer to DAT3, put the old DAT2 tapes
away and labelled 20 new DAT3 tapes with the names
TAPE01 to TAPE20. from the point of amanda's view, it 
was a seamless migration to the new dat drive/tapes.

the problem is: I urgently need to restore files from the old
DAT2 tapes which are, of course, no longer in the current
amanda index.

Is there a possibility to re-index such tapes, even if 
they have the same label as a current one ? is it wise
to re-label the old tape to a different name or will
re-labelling erase them ?

tnx in advance.






Re: re-index old tapes ?

2001-07-16 Thread John R. Jackson

the problem is: I urgently need to restore files from the old
DAT2 tapes which are, of course, no longer in the current
amanda index.

Is there a possibility to re-index such tapes, even if 
they have the same label as a current one ?  ...

Amanda does not have a mechanism (although it should) to regenerate
index files.  And, as you have surmised, things might get a bit confusing
with the same range of labels.  Also, the log.MMDD.NN files (which
Amanda has probably cleared out), are also needed for amrecover.

Here's what I would do.  First, I'd get a catalogue of what is on each
tape like this and save it away:

  amrestore -p $TAPE no-such-host

Then, for the images I needed (particular clients and disks), I'd
regenerate the index information.  How that's done depends on what type
of program generated the image and what OS is on the client.  If it's
GNU tar, or if the client and tape server run the same OS and the tape
server has the restore program available, you can do it there, something
like this:

  mt rewind
  mt fsf NN
  amrestore -p the-client the-disk | gtar tbf 2 -  index.client.disk.level

(you will also need a gunzip in the pipeline if you used software
compression).

If you don't have the right software on the tape server, stick an ssh/rsh
in the pipeline and send the image back over to the client to do the
indexing there.

Now you can find which image has the files you need, find the tape with
that image, and do the restores by hand with amrestore piped into the
restore program.

is it wise
to re-label the old tape to a different name or will
re-labelling erase them ?

You cannot relabel a tape.  Everything after the last write is lost,
and since the label is at the beginning, it would clobber all the data.

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]