PDA

View Full Version : Problems in restoring from tape



brock
May 18th, 2006, 02:56 AM
First thing, I apoligise in advance if I miss the obvious, but I pretty new to Linux and Amanda.

I'm running SUSE Server9 and I'm trying to get data back from a DLT8000 tape drive which is attached to the server via SCSI but I'm not having much joy.

I've used ' amrestore -p /dev/nrmt9 no-such-host > /dev/null' to get the name of the images (we've lost the logs) and I have found the image. Every time I try to restore the image it does not seem to work. I do the following:



billy:/amanda # amrestore -p /dev/st0 billy billy._var.20060407.0 | restore -ivf-
Verify tape and initialize maps
Input is from a local file/pipe
amrestore: 0: skipping start of tape: date 20060407 label billy-Full-1-03
amrestore: 1: skipping billy._users_disk11.20060407.0
amrestore: 2: skipping billy._users_disk5.20060407.0
amrestore: 3: skipping billy._users_disk2.20060407.0
amrestore: 4: skipping billy._var.20060407.0
amrestore: 5: skipping billy._users_disk8.20060407.0
amrestore: 6: skipping billy._server_billy_build.20060407.0

I then it just ends. I've dropped the 'b' option as recommended. I want to restore the image to the CWD (which has plenty of space) not a sda1 or sdb2 etc etc. It just seems to skip past everything.

I want to restore the file 'billy._var.20060407.0'

Any help would be greatly appreciated!

ktill
May 18th, 2006, 10:34 AM
>billy:/amanda # amrestore -p /dev/st0 billy billy._var.20060407.0 | restore -ivf-

what about

#amrestore -p /dev/st0 billy

hopefully the above command will produce files in CWD.

--Kevin Till
Zmanda

brock
May 19th, 2006, 01:45 AM
Thanks for that.

Funnily enough it dawned on me to try that and it worked great. In the future in would be nice to restore a specific image from the tape but I haven't had much luck in that so far.

brock
May 22nd, 2006, 02:15 AM
I now get the following error messages:

billy:/amanda # tar xvf /dev/st0 billy._.20060407.0
tar: /dev/st0: Cannot read: Cannot allocate memory
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

ANy a help appreciated

brock
May 23rd, 2006, 04:52 AM
Anybody?

I have now tried all sorts. I can forward to the file I want by using 'mt -f /dev/tape fsf 14' having got the file number by doing ' amrestore -p /dev/st0 no-such-host > /dev/null'
I've tried 'tar xvf /dev/st0 billy._disk1.20060407.0'
I've tried 'dd if=/dev/tape bs=32k | tar xvf -'
I've tried 'amrestore -p /dev/st0 billy._disk1.20060407.0 | tar xvf -

The problem seems that whatever I do it just merrily skips on past the file.

What I don't get is that I'm using 'mt -f /dev/st0 fsf 14 to skip past the other files so it doesn't spend ages seeking yet it always seems to reoprt back from the first file and tediously goes through the whole tape again - why? It skips to 14 (or appears to be) then it should start listing/finding tec from 14, not start from 0 all over again. What am I doing wrong?

ktill
May 23rd, 2006, 03:32 PM
>I now get the following error messages:

>billy:/amanda # tar xvf /dev/st0 billy._.20060407.0


if billy._.20060407.0 is a file produced by amrestore, you might want to try:

tar tvf billy._.20060407.0 {this will give a listing of the files}

tar xvf billy._.20060407.0 {this will extract all the files from billy._.20060407.0}

brock
May 24th, 2006, 02:46 AM
Thanks for the reply.

No luck, says no such file or directory.


The listing I get from 'amrestore -p /dev/tape no-such-host > /dev/null' is as follows:


amrestore: 0: skipping start of tape: date 20060407 label billy-Full-1-03
amrestore: 1: skipping billy._users_disk11.20060407.0
amrestore: 2: skipping billy._users_disk5.20060407.0
amrestore: 3: skipping billy._users_disk2.20060407.0
amrestore: 4: skipping billy._var.20060407.0
amrestore: 5: skipping billy._users_disk8.20060407.0
amrestore: 6: skipping billy._server_billy_build.20060407.0
amrestore: 7: skipping billy._.20060407.0
amrestore: 8: skipping billy._users_disk3.20060407.0
amrestore: 9: skipping billy._server_billy_archive.20060407.0
amrestore: 10: skipping billy._server_billy_alpha.usr.local.20060407.0
amrestore: 11: skipping billy._server_billy_ponting.20060407.0
amrestore: 12: skipping billy._users_disk15.20060407.0
amrestore: 13: skipping billy._home.20060407.0
amrestore: 14: skipping billy._usr.20060407.0
amrestore: 15: skipping billy._server_billy_cds.20060407.0
amrestore: 16: skipping billy._users_disk6.20060407.0
amrestore: 17: skipping billy._users_disk7.20060407.0
amrestore: 18: skipping billy._users_disk12.20060407.0
amrestore: 19: reached end of information


I restored 'billy._var.20060407.0' with no problems - however restoring 'billy._usr.20060407.0' I have no luck. Whatever I do now it seems to lock on to 'billy._users_disk11.20060407.0'. Out of deperation I tried dumping the whole lot and this is where it is odd, it starting restoring file # 1 billy._users_disk11.20060407.0 and as it restores the file numbers increased,and they don't seem to correlate with the above listing,

amrestore: 0: skipping start of tape: date 20060407 label billy-Full-1-03
amrestore: 1: skipping billy._users_disk11.20060407.0
amrestore: 2: skipping billy._users_disk11.20060407.0
amrestore: 3: skipping billy._users_disk11.20060407.0
amrestore: 4: skipping billy._users_disk11.20060407.0
amrestore: 5: skipping billy._users_disk11.20060407.0
amrestore: 6: skipping billy._users_disk11.20060407.0
amrestore: 7: skipping billy._users_disk11.20060407.0
amrestore: 8: skipping billy._users_disk11.20060407.0
amrestore: 9: skipping billy._users_disk11.20060407.0
amrestore: 10: skipping billy._users_disk11.20060407.0
amrestore: 11: skipping billy._users_disk11.20060407.0
amrestore: 12: skipping billy._users_disk11.20060407.0

....and so on, I stopped at 30, why are they all disk11? Has something screwed up (tape fault) or is it me?

I kept it simple and used 'amrestore /dev/st0' to dump the lot.

I have tried skipping through the tape, using mt -f 14 /dev/st0 and I figure I should get 'billy._usr.20060407.0' seeing as it is #14, but nope I get the same old 'billy._users_disk11.20060407.0' I've tried all the way up to #19, still the same result.

ktill
May 24th, 2006, 10:53 AM
what did you do to restore billy._var.20060407.0?


If billy._usr.20060407.0 is ineed in the tape, you should do:

1) mt -f /dev/nst0 rewind
2) amrestore /dev/nst0 billy usr

brock
May 25th, 2006, 05:45 AM
I used amrestore /dev/st0 billy._var.20060407.0 same command now does not seem to work.

I did a mt -f /dev/st0 rewind and I also tried retension

What I don't understand is if I do amrestore /dev/st0 billy it should restore everything on the tape - right?

All it does it skip through everyting.

ktill
May 25th, 2006, 12:46 PM
>What I don't understand is if I do amrestore /dev/st0 billy it should restore everything on the >tape - right?

it will restore images in the tape that was backed up from the machine billy.


>All it does it skip through everyting.
it skips if images in the tape doesn't match billy.

brock
May 26th, 2006, 01:43 AM
I'm working on the host billy trying to restore image billy._usr.20060407.0 from tape,

amrestore -p /dev/st0 no-such-host > /dev/null

I get the listing

amrestore: 0: skipping start of tape: date 20060407 label billy-Full-1-03
amrestore: 1: skipping billy._users_disk11.20060407.0
amrestore: 2: skipping billy._users_disk5.20060407.0
amrestore: 3: skipping billy._users_disk2.20060407.0
amrestore: 4: skipping billy._var.20060407.0
amrestore: 5: skipping billy._users_disk8.20060407.0
amrestore: 6: skipping billy._server_billy_build.20060407.0
amrestore: 7: skipping billy._.20060407.0
amrestore: 8: skipping billy._users_disk3.20060407.0
amrestore: 9: skipping billy._server_billy_archive.20060407.0
amrestore: 10: skipping billy._server_billy_alpha.usr.local.20060407.0
amrestore: 11: skipping billy._server_billy_ponting.20060407.0
amrestore: 12: skipping billy._users_disk15.20060407.0
amrestore: 13: skipping billy._home.20060407.0
amrestore: 14: skipping billy._usr.20060407.0
amrestore: 15: skipping billy._server_billy_cds.20060407.0
amrestore: 16: skipping billy._users_disk6.20060407.0
amrestore: 17: skipping billy._users_disk7.20060407.0
amrestore: 18: skipping billy._users_disk12.20060407.0


I want file 14, as I said for file 4 all seemed to work fine.

So if I do amrestore now for file 14 and all it ever dones is skip through everything is the tape messed up?

I've tried this, I cd into a tmp directory, use amrestore /dev/st0, according to man it should restore the lot if no arguement is given. I've also tried amrestore /dev/st0 billy, and the variations on file names.

brock
June 13th, 2006, 06:49 AM
Still no luck.

I've 'cd' inot a temp directory with 55GB of space (in fact, it is the amanda holding disk I'm using just for now) - tapes hold 40GB and no compression, so there is around 40GBs of data on the tape so I don't mind dumping the lot.

What happens is this.

I'm dumping the lot.

So do the mt -f /dev/st0 rewind

the amrestore /dev/st0

it starts to restore users/disk11, I'm monitoring the data size in the temp directory, when it gets to around 1GB it seems to delete everything and start the restore of disk11 all over again - it seems to be stuck in a loop.