At 02:42 PM 3/6/2001, John R. Jackson wrote:
> >By the way...how does amanda's software compression factor into this?
>
>You have to know if the image is compressed or not and insert the
>appropriate uncompress command in the pipeline (or, as a special case,
>use the GNU tar 'z' option, which does that for you).
>
>Note that the image header (the first 32 KByte block of the file) tells
>whether the image is compressed or not.  For that matter, it tells you
>the exact command sequence to use to recover the image.

Ach!! I am close, I can feel it... I was playing around waiting
for replies, and I did the following:

mt -f /dev/nst0 rewind
dd if=/dev/nst0 bs=32k count=1
dd if=/dev/nst0 bs=32k count=1
dd if=/dev/nst0 bs=32k count=1

the first one showed me:

AMANDA: TAPESTART DATE 20010227 TAPE Daily3


1+0 records in
1+0 records out

the second gave me:

0+0 records in
0+0 records out

and the third produced:

AMANDA: FILE 20010227 backup.diligence.com /pkgs lev 0 comp .gz program 
/bin/gtar
To restore, position tape at start of file and run:
         dd if=<tape> bs=32k skip=1 | /usr/bin/gzip -dc | bin/gtar -f... -

1+0 records in
1+0 records out



-=BUT=-

when I do:

mt -f /dev/nst0 rewind
mt -f /dev/nst0 fsf 02

I get an I/O error...
same as if I "mt -f /dev/nst0 fsf 2"

So, then I tried

mt -f /dev/nst0 rewind
mt -f /dev/nst0 fsf 1
mt -f /dev/nst0 fsf 1

I also get an I/O error...

Then I tried to dd the first two to /dev/null
and the third time I do

dd if=/dev/nst0 bs=32k skip=1 | /usr/bin/gzip -dc | bin/gtar -f... -

I see:

dd: /dev/nst0: I/O error
0+0 records in
0+0 records out

gzip stdin: unexpected end of file


Am I going to need to identify the start and end of this file and do it by 
count?

dd if=/dev/nst0 bs=32k skip=1 count=NN | /usr/bin/gzip -dc | bin/gtar -f... -

where NN is the number of blocks in the file?
Thank the higher powers that I'm dealing with this now as a test run
and not later in an emergency...I would have been killed by now :o)


Jer




Reply via email to