>The most straightforward method appears to be to reinstall the operating 
>system, use native utilities (tar or dump) or install amanda utilities, then 
>restore the files.

That's the general theory.

>If I'm running amrecover onto a newly installed operating system, will it 
>overwrite existing files?  ...

You're asking the wrong question.  Amrecover does not write files.
It runs a recover program for you based on what program was used to
create the dump image (tar, dump/restore, etc).  You need to look at
the documentation for that program to see what it does about overwriting.

In general, I think most restore programs do overwrite, although I'm
pretty sure I remember someone posting about one of the free Unix ones
not doing so without some extra flag (sigh -- nothing like consistency).

I would not use amrecover (at the moment) to do a full recovery.  It is
more oriented toward individual files/directories.  Most recover programs
want different parameters to tell them this is a full recovery so they
can do things a bit differently (e.g. remove files that come back in
one image but have been removed in a later one).

I've thought (and have a TODO item) about adding a flag/feature to
amrecover to do this, but haven't had the energy to go around to all
the recover program variations and figuring out what they would want.

>Also, can someone give me an example of using tar or dump to restore a file 
>off of a remote machine?

Starting from the client:

  client $ rsh -n server mt -f /dev/whatever rewind
  client $ rsh -n server mt -f /dev/whatever fsf NN # if desired
  client $ rsh -n server /path/to/amrestore -p /dev/whatever client disk | \
             /path/to/restore/pgm args ...

Is that close enough or do you want to see a real live example?  Oh,
never mind :-).  Here's one from one of my Solaris systems ("gandalf"
is the client, "fortress" is the server):

  gandalf $ rsh -n fortress mt -f /dev/rmt/12mn rewind
  gandalf $ rsh -n fortress mt -f /dev/rmt/12mn fsf 3
  gandalf $ rsh -n fortress /opt/amanda/sbin/amrestore \
                   -p \
                   /dev/rmt/12mn \
                   gandalf.cc.purdue.edu \
                   /work \
            | /usr/sbin/ufsrestore xbf 2 - \
                /tmp/setiathome-3.03.sparc-sun-solaris2.6/state.sah
  amrestore: WARNING: not at start of tape, file numbers will be offset
  amrestore:   0: restoring gandalf.cc.purdue.edu._work.20010411.1
  set owner/mode for '.'? [yn] n

FYI, I wrote some junk in the restored file and did this a second time,
and ufsrestore *does* overwrite the file if it exists.

>Ivan

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]

Reply via email to