RE: Help - recovering without amanda
2003-12-01 17:29:33
On Mon, 1 Dec 2003 at 4:18pm, Rebecca Pakish Crum wrote
> when I run:
> # mt rewind
> # mt fsf 1
> # dd if=/dev/rmt/0hn bs=32k count=1
> I get:
The amanda header, which is the first 32k of that tape "file". The rest
of that tape file contains the backup image.
> So it appears as if this is the first thing on the tape...so I cd
> /u05/oracle/admin and run
I always restore to a temp space, just in case.
> # mt rewind
> # mt fsf 1
> # dd if=/dev/rmt/0hn bs=1 skip=1 | /usr/local/bin/tar -xf -
^
Bad. It should be bs=32k, as above (and as in the header you got running
the first command). Also, an even safer way is to not do the pipe:
dd if=/dev/rmt/0hn bs=32k skip=1 of=output.file
Then you can do 'tar t' on the output file to get a table of contents
and *really* make sure it's what you want.
Here's a brief summary. Amanda stores several files on a tape. The first
is the tape header. That's what you skip over with 'mt fsf 1'. The next
file is the first dump image. The next is the second image, etc. Each
dump image has a 32k amanda header, and then the image.
The dd command with with 'bs=32k skip=1' reads the whole file, skipping
over the first 32k -- the amanda header. It stops when it hits EOF of
that dump image. If you run the exact same dd command again, you'll grab
the next backup image.
--
Joshua Baker-LePain
Department of Biomedical Engineering
Duke University
|
|
|