Amanda-Users

Re: Amanda and Full metal restore

2006-01-11 07:58:20
Subject: Re: Amanda and Full metal restore
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: mark.cooke AT twentyfive.co DOT uk
Date: Wed, 11 Jan 2006 13:50:48 +0100
Mark Cooke wrote:

I've just got amanda installed in Debian stable, using the file driver to a removable USB hard drive. So with this working I have decided to test a full metal restore; in case the server needs to be reinstalled at any point from scratch.

Good!



So testing the set-up, I do one full backup (in this case /etc).
export the amanda database using amadmin, delete the following directories contents, as these would not be present in a brand new install:

/var/lib/amanda/gnutar-lists/*
/var/lib/amanda/Daily/*
/var/lib/amanda/amandadates (this I just remove the written dates).
/var/log/amanda/Daily/*

Note that the "log" files are actually the databases used by
amanda to find contents of the tapes.
So you actually erased the ondisk information.

See also:  http://wiki.zmanda.com/index.php/Amanda_log_files



I then recreate the relevant Daily directories, in
/var/lib/amanda and /var/log/amanda

I leave the contents of /etc/amanda/Daily, as I would have this already set-up on a new install from an archived tarball, that is independent of the amanda set-up..

I then import the backup amanda database, using:
su backup -c "/usr/sbin/amadmin Daily import < export.db"

This database is only for "amadmin info", but "amadmin find" needs
the log files, that you did not put back.
Amrecover also needs these logfiles to find which tape(s) go together
with wich dates.



This imports ok, as we now have the following directories and files:
/var/lib/amanda/Daily/curinfo/localhost/_etc

This goes fine; so I then try to do a restore:
amrestore Daily
I get a 501 Index directory /var/lib/amanda/Daily/index does not exist

I bet you did "amrecover Daily" instead of "amrestore Daily".  The
"amrestore" command has a complete different syntax, and that one
indeed can be used without any online information. The error message
about the Index is from amrecover, can cannot come from amrestore.

So for a real "bare metal" recovery you need "amrestore" (because
you do not have any information about indexes or anything on your
freshly installed disk).  Or you first need to restore the "log"
files + the index files, and then you can use "amrecover".



So I recreate this with the correct permissions.
and try again and get the following error:
Warning: no log files found for tape MediaSet14 written 2006-01-11

Amrecover does indeed need log files.

See also:  http://wiki.zmanda.com/index.php/Restoring_files



--
Paul Bijnens, Xplanation                            Tel  +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM    Fax  +32 16 397.512
http://www.xplanation.com/          email:  Paul.Bijnens AT xplanation DOT com
***********************************************************************
* 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, *
* init 0, kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ...  "Are you sure?"  ...   YES   ...   Phew ...   I'm out          *
***********************************************************************



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