Amanda-Users

Re: Help restoring

2005-08-26 10:01:23
Subject: Re: Help restoring
From: Matt Hyclak <hyclak AT math.ohiou DOT edu>
To: amanda-users AT amanda DOT org
Date: Fri, 26 Aug 2005 09:44:42 -0400
On Thu, Aug 25, 2005 at 07:43:53PM +0100, Tony van der Hoff enlightened us:
> 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 :( 
> 
> Any suggestions, please?

Is /dev/tape a link to the non-rewinding device, or the rewinding device?
(/dev/nst0 for non-rewinding on linux and /dev/st0 for rewinding).

It looks to me like this is what happens in your above command:

Skip forward one to the file on tape that contains /etc
dd the first 32k block that contains the amanda label
dd the gzipped file *skipping the first block*, resulting in a gzip file
   missing the first 32k

You missed the part that says position tape at start of the file :-)

Try again without the second skip=1

Matt

-- 
Matt Hyclak
Department of Mathematics 
Department of Social Work
Ohio University
(740) 593-1263

Attachment: pgph0xkBwYlfm.pgp
Description: PGP signature

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