Amanda-Users

Re: Recover info from an amanda tape

2003-04-07 17:05:29
Subject: Re: Recover info from an amanda tape
From: Jean-Francois Malouin <Jean-Francois.Malouin AT bic.mni.mcgill DOT ca>
To: amanda-users AT amanda DOT org
Date: Mon, 7 Apr 2003 15:19:19 -0400
* Jimmy (jimmy AT v2k DOT ca) [20030407 15:11] thus spake:
> Hello list,
> 
> I have a situation here and I am not sure how to go about doing this
> right.  I am sorry for the length of this e-mail.  I am so new to
> amanda, I really did not know what would be useful information, so I put
> together everything I thought might be usefull.  I am sure that this
> would be trivial for anyone with some experiance using amanda.  (Thats
> just unfortunely not me)  :)
> 
> I have a backup that was done using amanda on a 35gig DLT tape.  I am
> tring to recover some files from the tape.  I thought that I would not
> need to use amanda todo it, I could just get the info I needed from tar,
> but everything I have tried has failed, so now I am thinking maybe using
> amanda is the only way.  I will list out what I have tried and what my
> results were hoping someone can point me in the right direction as to
> how I can get to those files.  :)
> 
> I tried simply doing a:
> tar -xvf /dev/st0 -b 128
> 
> After MANY hours, it ended with:
> tar: Unexpected EOF in archive
> tar: Error is not recoverable: exiting now

you have to skip the 1st 32k:

dd if=/dev/nst0 bs=32k skip=1 | tar xvf -

I hope you used a norewind device
otherwize your screwd. 
Run this shell script with the norewind tape device as argument, 
it will tell you what's on the tape if any. 

#!/bin/sh
TAPEDEV=$*
mt -f $TAPEDEV rewind
while mt -f $TAPEDEV fsf 1 ; do 
  dd if=$TAPEDEV bs=32k count=1 | head -1
  sleep 1
done


good luck,
jf

> 
> But I did get two directories:
> indexes
> spool
> 
> My indexes directory listing looks like this:
> 20020318
> 20020319
> 20020320
> 20020321
> 20020322
> 20020329
> 20020330
> 20020401
> 20020402
> 20020403
> 
> And I know (from the label on the tape) there was a full backup done on
> Mar 30 (20020330).  When I dig down into the index directory, I can find
> the idx file with the files I need:
> indexes/20020330/fileserv/FILESERV_200203300505_export_home.idx
> 
> So I look in the spool directory and figure out the last file that was
> extracted was from the day before 20020329.
> 
> Thinking something went wrong along the way, I did:
> dd if=/dev/st0 of=fileserv.tar bs=64k
> 
> I end up with a 5 gig tar file.  When I try to extarct the file I need I
> get the same EOF error.  
> 
> So I am assuming when you do a full backup with amanda, it does
> something different.  I installed amanda and tried using amrestore and
> am recover, but to no avail.  I cannot get the syntax correct to get
> them to do anything.
> 
> When I view the contents of the tar, it is in this format: 
> -rw-r--r-- backup/backup 14852500 2002-03-18 03:35:16 
>  spool/20020318/fileserv/FILESERV_200203180324_export_home.tgz
> 
> SO I think the backup/backup has something todo with hostname.  The
> something I need to get this to work with amrestore I think.
> 
> Can anyone point me in the right direction?  Does the EOF mean the
> backup is no good?  Or do I need to use amrestore or amrecover to get to
> the files I need?  If I do, what would be the most logical syntax to get
> to those files?
> 
> Thank you very much just for reading this far.  :)
> 
> Jimmy
> 
> 
> 
> 
> -- 
> Jimmy <jimmy AT v2k DOT ca>

-- 
What laughter, why joy, when constantly aflame?
Enveloped in darkness, don't you look for a lamp? 

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