Amanda-Users

Re: Recovering files from DVD-recorded backup

2006-07-31 15:17:31
Subject: Re: Recovering files from DVD-recorded backup
From: Ross Vandegrift <ross AT kallisti DOT us>
To: Anne Wilson <cannewilson AT tiscali.co DOT uk>
Date: Mon, 31 Jul 2006 15:10:29 -0400
On Mon, Jul 31, 2006 at 06:56:22PM +0100, Anne Wilson wrote:
> It seems to me that once vtapes are free for overwriting the corresponding 
> index will be lost too.  Can either amrestore or amrecover actually access 
> these files?

Barring defects in the file/media, amrestore can *always* be used to
recover an amanda backup.  The procedure isn't quite as automated as
amrecover.  Here's an outline of what you might need to do:

1) Determine what tape you actually need.  You might not know this for
real the first time!  Trial and error may be required.

2) Mount the DVD, say at /mnt.

3) To figure out what backups are on the tape, run something like
this:

# amrestore -f 0 -p file:/mnt/tapeX invalid-host > /dev/null

This says to start at block 0, of the tape file:/mnt/tapeX (path
depends on how you named tapes/burned them), search for
"invalid-host" and throw the data to /dev/null.

This command will give you a printout of the contents of the tape like
this:

amrestore:   0: skipping start of tape: date 20050128 label DailySet117
amrestore:   1: skipping blah.sda1.20050128.2
...

This output is formatted like "hostname.device.date.dumplevel".  Find
the dump that you are looking for.  Let's assume we want to restore
from "blah.sda1.20050128.2".

4) Now we run a valid amrestore command to get data:

# amrestore -f 1 -p file:/mnt/tapeX blah sda1 | restore -if -

This pulls data for blah:/sda1 from file:/mnt/tapeX starting at block 1.
You'll get a shell very much like amrecover that you can navigate the
filesystem dump, add files, and extract them.


If you use tar, you'll want to do something like:
# amrestore -f 1 -p file:/mnt/tapeX blah sda1 | tar xpvf -

to untar the tarball into your current directory.

-- 
Ross Vandegrift
ross AT kallisti DOT us

"The good Christian should beware of mathematicians, and all those who
make empty prophecies. The danger already exists that the mathematicians
have made a covenant with the devil to darken the spirit and to confine
man in the bonds of Hell."
        --St. Augustine, De Genesi ad Litteram, Book II, xviii, 37

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