Amanda-Users

Re: Restoring a blown-up server; determining which tapes have the backup

2003-08-29 10:57:33
Subject: Re: Restoring a blown-up server; determining which tapes have the backup
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Fri, 29 Aug 2003 10:34:38 -0400
On Fri, Aug 29, 2003 at 03:12:47PM +0300, Antonios Christofides wrote:
> Hi,
> 
> I know this has been discussed before, but I need some more ideas.
> I've recently switched from homegrown script to Amanda, and although
> backup works fine, I haven't made the recovery plan yet, I'm doing so
> now.
> 
...
> 
> So I thought of this alternative: place the amanda index and log files
> (and, maybe, amanda reports, but not hard printed) on a small partition
> which is always fully backed up, and always last on tape (so that it
> contains the updated information about that tape's backups). So I
> recover that partition, and then I run amrecover or amrestore or
> something and the rest is figured out by amanda. The only thing I need
> to find out is which is the most recent tape, but I don't think that's
> too difficult; it will either be the tape which precedes a missing
> tape (which is presumably reduced to ashes), or it may be remembered,
> and it can be verified with a "dd if=/dev/nst0 bs=32k".
> 
> You think this would (a) work, and (b) be a good idea?

As was pointed out by Kurt, the files would be incomplete/inaccurate
if done during the amdump run.

At least one of our members, Gene H., runs a script at the end of
his amdump runs.  IIRC, his script makes a tarball of his config
directory, including the index, curinfo, and log dirs.  It then
determines if there is likely to be sufficient space on the tape
after the backup run to hold the tarball.  If yes, it is appended
after the amanda trailer file as a separate file amanda knows nothing
about.  The tarball may also include things like .amandahosts that are
not in the config directory tree, but I'm not certain.

In theory then, you could reconstruct a barebones system including
amanda software.  Install and amanda user, untar this extra file from
the most recent tape and begin to install.  I don't know if practice
has proven theory yet :)  However, I do see one complication, it may
not scale well.  The logs and indexes can become quite large for some
installations.

If as you say the printed toc's are a problem to maintain, you might
adopt Gene's scheme of adding to the tape after the dump.  The printed
report can be generated by 'amreport -p ...', and just this single,
reasonably sized file, appended to the tape.  But you would know what
was on that tape and where.

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)