Re: Help restoring
2005-08-26 10:10:04
On Thu, Aug 25, 2005 at 07:43:53PM +0100, Tony van der Hoff wrote:
> I'm trying to recover my /etc directory from tape, so in accordance with
> docs/RESTORE, I'm doing this:
>
> [root@tony-lx etc]# mt fsf 1 && dd if=/dev/tape bs=32k count=1
> AMANDA: FILE 20050821 tony-lx /etc lev 0 comp .gz program /bin/gtar
> To restore, position tape at start of file and run:
> dd if=<tape> bs=32k skip=1 | /bin/gzip -dc | bin/gtar -f... -
>
>
> 1+0 records in
> 1+0 records out
> [root@tony-lx etc]# dd if=/dev/tape bs=32k skip=1 | /bin/gzip -dc |
> /bin/gtar -xpvf -
>
> gzip: stdin: not in gzip format
> 2+0 records in
> 1+0 records out
>
> And, of course nothing in my restore/etc dir. I hope it's just my
> incompetence :(
>
Those two command sequences can not be run one after the other.
Each assumes the tape is as the same starting position. After
positioning the tape to the beginning of a tape file, the first
command looks at the first block of the tape file. The second
command, if started from the same beginning of a tape file,
skips over the first block (the one read by the first command).
But if the tape is not at the beginning of the file you either
don't need to skip anything, or you have to rewind and reposition
to the beginning of the tape file.
BTW, I think the device you are using "/dev/tape" is the rewind
on close device. Thus after the first dd ... count=1 command
the tape probably rewinds to the beginning of the tape.
/dev/ntape is likely the "leave the tape where it is" device.
--
Jon H. LaBadie jon AT jgcomp DOT com
JG Computing
4455 Province Line Road (609) 252-0159
Princeton, NJ 08540-4322 (609) 683-7220 (fax)
|
|
|