Amanda-Users

Re: Problem with amrecover

2005-02-04 12:19:42
Subject: Re: Problem with amrecover
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Fri, 4 Feb 2005 12:05:14 -0500
On Fri, Feb 04, 2005 at 11:21:07AM -0000, soed2003 wrote:
> 
> --- In amanda-users AT yahoogroups DOT com, Jon LaBadie <jon@j...> wrote:
> > On Sat, Jan 22, 2005 at 02:45:40PM +0100, Sören Edzen wrote:
> > > Hi!
> > > 
> > > I have problem using amrecover. I get the following output:
> > > 
> > > amidxtaped: time 0.002: Ready to execv amrestore with:
> > > path = /usr/local/sbin/amrestore
> > > argv[0] = "amrestore"
> > > argv[1] = "-p"
> > > argv[2] = "-h"
> > > argv[3] = "/dev/nst0"
> > > argv[4] = "^zampo.edzen.net$"
> > > argv[5] = "^/usr/local/cvsroot$"
> > > argv[6] = "20050115"
> > 
> > As the exact amrestore command is shown,
> > can you reproduce the error by running it manually?
> > 
> > If so, it may be time to try and pull off manually
> > some of the tape files and see if they are recorded
> > correctly.  This will involve using mt and dd commands.
> > Then tar or dump on the result.
> > 
> > -- 
> > Jon H. LaBadie                  jon@j...
> >  JG Computing
> >  4455 Province Line Road        (609) 252-0159
> >  Princeton, NJ  08540-4322      (609) 683-7220 (fax)
> 
> Hi 
> I tried the exact amrestore command and got this:
> 
> amrestore -p -h /dev/nst0 ^zampo.edzen.net$ ^/usr/local/cvsroot$ 20050204
> amrestore:   0: skipping start of tape: date 20050202 label zampo102
> amrestore:   1: skipping zampo.edzen.net._home_soredz_.mutt.20050202.0
> amrestore: error reading file header: Input/output error
> 
> How to restore with dd? mt is used to rewind the tape, right?
> 
> Any ideas? I'm getting desperate. First I had trouble getting amanda to 
> perform the 
> backups. Then when I finally made it I cant restore anything. 
> 
And of course, backups are worthless unless you can get your data back.

mt is used for more than rewinding.

Amanda backs up entities in its disklist file, aka DLE's, such as 
/home/soredz/.mutt
on zampo.edzen.net.  (Based on the above, I presume this is an entry in your
disklist file, that it is a directory, and you are using gnutar to do the backup
of this DLE, is that correct?)

Each of these DLE's is backed up to an archive file and put on tape as a single
tape file with 32KB of amanda info added at the front of the archive.  If your
disklist file has 10 DLE's, each is on the tape in a separate tape file.  Plus
there are two special amanda files, one each at the start and end of the tape.

Using unix commands like dd, mt, tar, restore, ... you should be able to
retrieve your data even with out amanda commands.  That is assuming the
data on the tape is good, the archive properly made, taped, and retrievable.

Basically you position the tape at the beginning of the tape file you want.

        mt -f <tape> rewind
        mt -f <tape> fsf <file number>

If you want to look at which DLE this tape file contains, look at the first
32KB with dd.

        dd if=<tape> bs=32k count=1

If you want the archive file on your hard disk, repeat the mt commands to
get to the start of the tape file again and use dd.

        dd if=<tape> of=<your choice of names> bs=32k skip=1

Theoretically there was no need to repeat the mt commands, you could have
done the 2 dd commands one after the other (without the skip=1)

        dd if=<tape> of=<header> bs=32k count=1
        dd if=<tape> of=<data>   bs=32k

Now you have your archive file on hard disk.  It may be compresses with gzip
and need uncompression (depends on your config settings).

You should be able to recover what is there with gnutar or your restore command
as appropriate for how the archive was made.

-- 
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)

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