This article explains to you 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 is lost. These steps enable you to restore data from tape without that information:
- Insert the tape containing the data you want to restore.
- Login as root to the Amanda server
- Determine the tape device name.
- Rewind the tape:
mt -f /dev/nst0 rewind
- cd to an empty directory with enough space to extract your data.
- Decide on the hostname and diskname that you want to restore.
- 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
8. The archive file should appear in the current directory:
[root@host restore]# Is9. Extract the archive using tar:
hostname.zmanda.com. var.20070816104124.0
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/