Amanda-Users

Re: Can't quite read tape

2003-05-14 10:28:02
Subject: Re: Can't quite read tape
From: Brian Cuttler <brian AT wadsworth DOT org>
To: Josh Kuperman <josh AT saratoga.lib.ny DOT us>
Date: Wed, 14 May 2003 10:23:55 -0400 (EDT)
Josh,

Let amanda do the work.

# amrestore -p /tape/drive amclient-name partition-name | (os)restore -if - .

or 

# amrestore /tape/drive amclient-name partition-name

The first to restore the files directly, if you need to extract
the dump in its entirely to move to an alternate architecture then
use the second command and it'll restire the dump file in its
entirety to your current directory.

                                                Brian

---
   Brian R Cuttler                 brian.cuttler AT wadsworth DOT org
   Computer Systems Support        (v) 518 486-1697
   Wadsworth Center                (f) 518 473-6384
   NYS Department of Health        Help Desk 518 473-0773




> I am having a tough time recovering data from a tape.This is the first
> time since I started using compression. I can dig through my
> amanda.conf, the amdump file for the run, the log file, if that
> contains the info I need. I am running Amanda 2.4.2 and I'm using an
> Exabyte 8500 tape drive. I back up two machines one an older RedHat
> (6.2) which has the tape in it, and a RaQ Cobalt server. I built
> amanda from source on both machines, and I believe my problem is
> somehow skipping over the headers, so the gzip program will extract
> the data. But I'm despearate and will defer to experts.
> 
> 
> I can position it to a file but I can't quite read it. It is almost
> like the header info can't be stripped off the begginning. I have been
> repositioning it with mt and checking the status so that I'm always
> starting at block 0 and partition 0 of whatever file I'm trying to
> grab off the tape. Compounding my aggrevation is that I did manage to
> use the command sequence to successfully pipe the first file (a back
> up of the partion /var on a remote host) to the tar command -- but I
> seem unable to repeat it. I've looked through my command history and
> can't find anything unique so all I can assume is that somehow I
> either have damaged the tape or can't quite get to the right position
> do to miscalculation or block size error. I have the usual locating
> option with mt: fsf,fsfm,fsr,asf,bsf,bsfm, and bsr.
> 
> The dd command is perfectly capable of dumping the files, but I don't
> really have the space of my amanda server machine. I need to restore a
> user directory /home/user/x on a remote host. I figure it would be
> easier to restore the directory to the machine with the tape drive and
> go from there, but for now I'm stuck.
> 
> ====================================================================
> [root@omaha /whatever]# mt -f /dev/nst0 status
> SCSI 2 tape drive:
> File number=4, block number=0, partition=0.
> Tape block size 1024 bytes. Density code 0x0 (default).
> Soft error count since last status=0
> General status bits on (81010000):
>  EOF ONLINE IM_REP_EN
> [root@omaha /whatever]# dd if=/dev/nst0 bs=32k | head -4
> 
> AMANDA: FILE 20030512 omaha / 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... -
> 
> 
> [root@omaha /whatever]# dd if=/dev/nst0 bs=32k skip=1 | /bin/gzip -dc
> | /bin/gtar -tf -
> 
> gzip: stdin: not in gzip format
> 2+0 records in
> 1+0 records out
> Broken pipe
> ====================================================================
> 
> Even when I tried to position from the beginning of the tape:
> 
> ====================================================================
> [root@omaha /whatever]# mt -f /dev/nst0 asf 0status
> [root@omaha /whatever]# mt -f /dev/nst0 status
> SCSI 2 tape drive:
> File number=0, block number=0, partition=0.
> Tape block size 1024 bytes. Density code 0x0 (default).
> Soft error count since last status=0
> General status bits on (41010000):
>  BOT ONLINE IM_REP_EN
> [root@omaha /whatever]# dd if=/dev/nst0 bs=32k skip=1 | /bin/gzip -dc
> | /bin/gtar -tf -
> 
> gzip: stdin: not in gzip format
> 1+0 records in
> 1+0 records out
> 
> ====================================================================
> -- 
> Josh Kuperman                       
> josh AT saratoga.lib.ny DOT us
> 


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