Amanda-Users

Re: Restoring from tape when Amanda server failed

2006-07-19 19:32:17
Subject: Re: Restoring from tape when Amanda server failed
From: Gene Heskett <gene.heskett AT verizon DOT net>
To: amanda-users AT amanda DOT org
Date: Wed, 19 Jul 2006 19:18:44 -0400
On Wednesday 19 July 2006 17:07, gil naveh wrote:
>    Thanks for all the help, but I have a problem to restore the 
> files. When I type:
>  root@ # dd if=/dev/rmt/0n ibs=64k | ufsrestore if -
>  I recieve the following error message:
>  read: Invalid argument
>  0+0 records in
>  0+0 records out
>  Volume is not in dump format
>
>  But as far as I know it should be in a dump format!!! ? because in
> the Amanda.conf  I defined the backup as:
>
>      define dumptype daily {
>         global
>         # program  "DUMP"     # the default
>         # record yes         # the default
>         comment  "daily"
>         compress client  fast
>         priority high
>         # dumpcycle 5        # should be obtained from dumpcycle 
> above index yes
>      }
>
>
>      I also tried the following:
>  % mt -f /dev/rmt/0n rewind
>  % dd if=/dev/rmt/0n of=/tmp/data bs=64k count=2
>  % od -c /tmp/data | head
>
>  And received the following output:
>  0000000  \0 002   P 022  \0  \f  \0  001   .  \0  \0  \0  \0 003 242
>   Q 0000020  \0  \f  \0 002   .   .   \0  \0  \0 002   P 023 001 350 
> \0 006 0000040   n   e   w   b    c   k  \0  \0  \0  \f  \0 003    b 
>  c   k  \0 0000060  \0  \0  \0  \0 001 320  \0 006    n   e   w   b  
> c   k   \0  \0 0000100  \0  \0  \0  \0  \0  \0  \0   \0  \0  \0  \0 
> \0  \0  \0  \0  \0 *
>  0001000
>
One thing I can categoricly state is that that is not an amanda tape 
header.

It should resemble this for the above command line:
[root@coyote amanda]# od -c scratch1 | head
0000000   A   M   A   N   D   A   :       T   A   P   E   S   T   A   R
0000020   T       D   A   T   E       2   0   0   3   0   5   2   6
0000040   T   A   P   E       D   a   i   l   y   S   e   t   1   -   0
0000060   2  \n  \f  \n  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
0100000


>  Can one deduct the dump format from the above output?
>
>  Many thanks,
>  gil
>    Paul Bijnens <paul.bijnens AT xplanation DOT com> wrote:
>
>On 2006-07-19 17:35, gil naveh wrote:
>> Thanks for the help.
>> I am familiar with the Amrestore command.
>
>Then you understand that you can replace "amrestore" with a
>"mt" and "dd".
>
>> But the problem I am facing is that the Amanda server which also
>> holds other applications crushed. So I have to restore data from
>> another server - I have Solaris 9 and and or Solaris 10 servers that
>> I can connect to the tape drive...
>> I also saved the configuration files of the amanda server.
>> Is there a way to directly connect to the tape drive and use unix
>> commands to restore data from it?
>> Or any other suggestions...
>
>    mt -f /dev/rmt/0n  fsf 34
>    dd bs=32k if=/dev/rmt/0n skip=1  of=/some/where
>
>dd to to stdout, in a pipe with netcat:
>         ...  | nc -w 1 client 1234
>
>And on the client you have already this command listening:
>
>    nc -l -p 1234 | gtar -zxpGvf -
>
>The docs in  http://www.amanda.org/docs/restore.html
>are a little more expanded, giving more examples in:
>
>    http://wiki.zmanda.com/index.php/Restoring_files
>
>Easiest is to first restore the amanda command "amrestore"
>That one does not need any config file at all.

-- 
Cheers, Gene
People having trouble with vz bouncing email to me should add the word
'online' between the 'verizon', and the dot which bypasses vz's
stupid bounce rules.  I do use spamassassin too. :-)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2006 by Maurice Eugene Heskett, all rights reserved.