How to use the amrestore command to restore data from tape

This article is for Amanda Enterprise (AE)

These steps are useful when the Amanda server has crashed and all index data lost. These steps enable you to restore data from tape without that information.

  1. Insert tape containing data you want to restore
  2. Login as root to the Amanda server
  3. Determine the tape device name
  4. Rewind the tape ;mt -f /dev/nst0 rewind
  5. cd to an empty directory with enough space to extract your data
  6. Decide on the hostname and diskname that you want to restore
  7. Run the amrestore command:
amrestore /dev/nst0 hostname.zmanda.com /var
Example output:
[root@bugs restore]# amrestore /dev/nst0 hostname.zmanda.com /var
Restoring from tape Tape-5 starting with file 1.
amrestore: 1: skipping FILE: date 20070816104124 host hostname.zmanda.com disk /boot lev 0 comp N program /bin/tar
amrestore: 2: skipping FILE: date 20070816104124 host localhost disk /etc lev 0 comp N program /bin/tar
amrestore: 3: restoring FILE: date 20070816104124 host hostname.zmanda.com disk /var lev 0 comp N program /bin/tar
  1. The archive file should appear in the current directory:
[root@host restore]# ls
hostname.zmanda.com._var.20070816104124.0
  1. Extract the archive using tar
tar -vxf hostname.zmanda.com._var.20070816104124.0
Example Output:
[root@bugs restore]# tar -vxf hostname.zmanda.com._var.20070816104124.0 | more
./
./account/
./amanda_restore_10/
./cache/
./cache/alchemist/
./cache/alchemist/apache/
./cache/alchemist/printconf.local/
./cache/alchemist/printconf.local/wm/
./cache/alchemist/printconf.rpm/
./cache/alchemist/printconf.rpm/wm/
./cache/foomatic/
./cache/gstreamer-0.8/
./cache/logwatch/
./cache/man/
./cache/man/X11R6/
./cache/man/X11R6/cat1/
./cache/man/X11R6/cat2/
./cache/man/X11R6/cat3/
./cache/man/X11R6/cat4/

Powered by BetterDocs

Leave a Reply