Amanda-Users

Re: accidentally deleted amanda.conf

2005-11-16 04:50:13
Subject: Re: accidentally deleted amanda.conf
From: Paul Bijnens <paul.bijnens AT xplanation DOT com>
To: Joe Konecny <jkonecny AT rmtohio DOT com>
Date: Wed, 16 Nov 2005 10:42:05 +0100
Joe Konecny wrote:

# amrestore -p /dev/nst0 servername '/disk/list/entry$'  |
     gtar -xpvf - ./path/to/amanda.conf


    # Note that the disklistentry is a pattern, not a string
    # use "restore" instead of gtar if you make backups with dump
...
R4P17# amrestore -p /dev/nsa0 no.such.host
amrestore:   0: skipping start of tape: date 20051115 label DailySet1006
amrestore:   1: skipping R4P17.gmihome.com.amrd0s1f.20051105.1
amrestore:   2: skipping R4P17.gmihome.com.amrd0s1f.20051106.2
amrestore:   3: skipping R4P17.gmihome.com.amrd0s1f.20051112.1
amrestore:   4: skipping R4P17.gmihome.com.amrd0s1f.20051113.2
amrestore:   5: reached end of tape: date 20051115

This seems to me like you have several dumps of several dates on one
tape.  Also note there is no level 0 on this tape!!!


So...
R4P17# mt -t /dev/nsa0 rewind
R4P17# amrestore -p /dev/nsa0 R4P17.gmihome.com.amrd0s1f.20051105.1

NO! You could at least do a "man amrestore" :-)
The above lines from amrestore are in the format:
                ...skipping host.company.com._the_disk_name.DATE.LVL

amrestore expect the hostname and diskname (and "diskname" is actually
a pattern, not a string).  In your case that is:

   amrestore -p /dev/nsa0 R4P17.gmihome.com '^amrd0s1f$' 20051105

And, note the trailing '.1' on the line that was output by amrestore
meaning that the dumpimage is from a level 1 backup. That could be correct (when you changed amanda.conf since the last level 0), or
not correct (if you didn't change amanda.conf then you need the last
level 0 dump).

I find it also strange that you seem to have a level 1 of 20051105
and level 2 of the next day, and then again a level 1 of 20051112.
Where is the level 0 from between those dates???
And if you really want to restore from a level 1, are you sure
you don't need the latest one, from 20051112 ???

You also noted that you use dump/restore instead of gnutar. In
that case pipe to:

  amrestore .... | restore -ivbf 2 -

But because I expect that you will need to try this many times,
you could first restore the backup image to disk, by leaving out
the '-p' option of amrestore:

  amrestore /dev/nsa0 R4P17.gmihome.com '^amrd0s1f$' 20051105

Now you have a file on disk named:
  R4P17.gmihome.com.amrd0s1f.20051105.1

And then use the interactive mode of restore on this file:

  restore -ivbf 2 R4P17.gmihome.com.amrd0s1f.20051105.1

But, read "man restore" carefully, because "restore" is different
for each architecture and could have different options needed in your
environment.


--
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>