Amanda-Users

Re: crash recovery

2002-11-11 11:40:35
Subject: Re: crash recovery
From: Galen Johnson <gjohnson AT trantor DOT org>
To: Gene Heskett <gene_heskett AT iolinc DOT net>
Date: Mon, 11 Nov 2002 11:03:15 -0500
Gene Heskett wrote:

Hi everybody;

Its Gene, the old f--- ahhh, man, back from 2 weeks worth of trying to make a tv station or 4 out of not very much. Hindered by the help that I was promised doing a disappearing act to goto a funeral in texas on the second day, and turning it into 2 weeks vacation. Damn, I just *love* being thrown to the wolves like that . . .

Unforch, in the process of shutting things down as I was leaving for the western slopes of colorado, I grabbed the wrong line cord and did a rather instant powerdown on this machine, something that appears to be a huge no-no for active ext3 systems. To be exact, it totally wrecked /, something I'm not a happy camper over at all. I was under the impression that ext3 was never in an invalid condition. By-by about 30 gigs of data. fsck reported many thousands of inodes as invalid. Bah!

So I fdisk'ed /dev/hda, re-arranged it a bit, formatted and installed RH8.0, followed by ripping out their KDE and installing the good KDE-3.0.4, or I woudn't even be doing email as evolution doesn't seem to like pop servers at all. It cannot send to one but can suck from one. Go figure.

Anyway, the advise on how to recover useing tar & gzip doesn't seem to want to work. The only way to get dd to actually write a disk file is with dd if=/dev/nst0 bs=32k of=tape.contents.# where the # is a sequence # extension in /tmp. And that only works if an 'mt tell' says its at block 64.
Hey Gene,

I just went through something similar...Here's the steps I went through (I didn't follow the instructions from "The Chapter" exactly). This worked well enough for me.

What do I do if Amanda doesn't see my index but I know backup exists?

Figure out which tape you need and make sure it's loaded in the drive...then:

1) change to your working directory (make sure it's different for each tape restored) and rewind the tape:
# cd somedir
# mt rewind
2) move forward 1 record on the tape
# mt fsf 1
3) Check to see what that record is...
# dd if=$TAPE bs=32k count=1
4) Repeat steps 2 and 3 until you find the directory you want to restore (//snap/prepress/classifieds for this example)
5) Count the number of times you had to repeat steps 2 and 3.
6) Rewind the tape
# mt rewind
7) Jump forward to the point you need
# mt fsf ##
8) Double check that you are in the correct spot by repeating step 3, if you are then repeat steps 6 and 7.
9) restore to the current directory
# dd if=$TAPE bs=32k skip=1 | /usr/bin/gzip -dc | tar -xpGvf - ./classifieds

the directory at the end is important...if you have a typo or are at the wrong spot on the tape then it will fail with a 'no files' error. It will be real easy to see when you restore to the wrong directory as you will see a bunch of 'tar: Deleting ...' messages. BE SURE YOU DO NOT RESTORE TO THE REAL DIRECTORY. This will cause it to remove any files that aren't in te restore...note: you may need to restore multiple backups for the windows machines as they do not set the archive bits properly.

Let me know if you have any questions.

=G=


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