Re: FW: URGENT!!! System Disk recovery - UNKNOWN file. amrecover: Cant read file header

2004-08-26 Thread Paul Bijnens
Ranveer Attalia wrote:
amidx debug file info:
>
amidxtaped: version 2.4.4p1
amidxtaped: time 0.000: > SECURITY USER root
amidxtaped: time 0.002: bsd security: remote host telhp6.tertio.com user 
root local user amanda
amidxtaped: time 0.003: amandahosts security check passed
amidxtaped: time 0.003: > CONFIG=Weekly
amidxtaped: time 0.003: > LABEL=Fri3.1
Notice it asks for tape label "Fri3.1".
amidxtaped: time 0.003: > FSF=87
amidxtaped: time 0.003: > HEADER
amidxtaped: time 0.003: > DEVICE=/dev/rmt/1ubn
amidxtaped: time 0.003: > HOST=^telhp6$
amidxtaped: time 0.003: > DISK=^/usr$
amidxtaped: time 0.066: > DATESTAMP=20040820
And it asks for date"20040820".
amidxtaped: time 0.066: > END
amidxtaped: time 0.095: amrestore_nargs=0
amidxtaped: time 0.095: Ready to execv amrestore with:
path = /opt/amanda/sbin/amrestore
argv[0] = "amrestore"
argv[1] = "-p"
argv[2] = "-h"
argv[3] = "-l"
argv[4] = "Fri3.1"
argv[5] = "-f"
argv[6] = "87"
argv[7] = "/dev/rmt/1ubn"
argv[8] = "^telhp6$"
argv[9] = "^/usr$"
argv[10] = "20040820"
Wrong label: 'Jul0.1'
You see here?   amrestore asked you to load "Fri3.1", but it found
the wrong tape, and quits immediately.
--
Paul Bijnens, XplanationTel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUMFax  +32 16 397.512
http://www.xplanation.com/  email:  [EMAIL PROTECTED]
***
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...*
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out  *
***



Re: FW: URGENT!!! System Disk recovery - UNKNOWN file. amrecover: Cant read file header

2004-08-25 Thread Paul Bijnens
Ranveer Attalia wrote:
I realised that I had commented out the WEEKLY/disklist (being over
cautius last night) so thats why there was no dump to list. When I do it
now - it works ok:
Fine.

Was this backup made by "dump", then you need "restore", but if it was
created by "gnutar" than then you gnutar to restore.

Looks like it was done by dump. Below is a cut of the WEEKLY/disklist
file for telhp6 and the WEEKLY/amanda.conf file. 
DISKLIST
...
telhp6 /opt always-full
...
define dumptype always-full {
global
comment "Full dump of this filesystem always"
compress none
index
priority high
dumpcycle 0
Unless dumptype "global" does not contains "program GNUTAR", then
it is indeed dump.
You can also verify this on the amanda tape header, which contains
this information too!
mt -f /dev/rmt/1ubn rewind
mt -f /dev/rmt/1ubn fsf 4
dd bs=32k count=1 if=+dev+rmt/1ubn
and voila; you should see something like:
AMANDA: FILE 20040623 host /the/dir lev 0 comp N program /usr/bin/gtar
To restore, position tape at start of file and run:
dd if= bs=32k skip=1 | /usr/bin/gtar -f... -
But I guess you'll see "restore" instead of "gtar".
Or do you see a variant of restore, like vxrestore?  See below.

When trying the amrestore its still complaining about "Tape is not a
dump tape" 
First you need to be sure about which program is generating that error
message.
I guess it is the "restore" command.
Try doing a "strings -a /usr/sbin/restore" and verify if there is
message "Tape is not a dump tape".

How do I use GNUTAR (please plase give me an example using hostname:
telhp6,  partition: opt, amanda server: tsssun1 
(although I dont think its using GNUTAR from the info above)

as root:
cd /the/destination/folder
remsh ...amrestore-cmd-as-used-is-ok... | tar -xpvf -
But I believe you are correct in using restore.
Are you using the restore on the correct architecture?
You need restore from the HP-machine for HP-dumps, and if
the filesystem was a special format like veritas, you need
the corresponding restore for that filesystem.
The amanda tapeheader for that backup does contain that information!
Instead of reading the slow tape over and over again, you can
dump the backup image on a disk (leave out the -p from amrestore).
And then try to find out what kind of image it is, with e.g.
using "file telhp6._opt.20040824.0", and trying tar and/or
restore to generate a table of contents.
Just ignore the users (temporarily)
I do that anyway  ;-) 
Its my boss I'm more worried about ! 
Never mind about him, especially in these cases.  (And he should know
that too!)
--
Paul Bijnens, XplanationTel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUMFax  +32 16 397.512
http://www.xplanation.com/  email:  [EMAIL PROTECTED]
***
* I think I've got the hang of it now:  exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit,  ZZ, :q, :q!,  M-Z, ^X^C,  logoff, logout, close, bye,  /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt,  abort,  hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e,  kill -1 $$,  shutdown, *
* kill -9 1,  Alt-F4,  Ctrl-Alt-Del,  AltGr-NumLock,  Stop-A,  ...*
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out  *
***