HOWTO Restore Files From Amanda: Difference between revisions

From Research
Jump to navigation Jump to search
Line 28: Line 28:
== Finish Up ==
== Finish Up ==
Rewind a tape; as root:
Rewind a tape; as root:
  # mt -f /dev/st0 rewind ''/dev/nst0'' is the '''non'''-rewinding device''
  # mt -f /dev/st0 rewind     ''(/dev/nst0'' is the '''non'''-rewinding device, although it may rewind anyway)''
  # mt -f /dev/nst0 eject
  # mt -f /dev/nst0 eject

Revision as of 04:44, 5 May 2007

How to restore files from an Amanda tape backup.

SSH to musashi for recovering files from a machine, and SSH to yamato to recover files from users or projects.

Finding Where the Files you want to Restore are Located

# su - amanda
$ amadmin $backupname find $hostname/$ipaddress $directorypath
$ amadmin DailyMusashi find 209.87.56.16 /etc

You should see something like this:

2006-04-07 209.87.56.16 /etc/  0 DailyMusashi20   24 OK
2006-04-10 209.87.56.16 /etc/  1 DailyMusashi21   16 OK
2006-04-11 209.87.56.16 /etc/  1 DailyMusashi22   19 OK
2006-04-12 209.87.56.16 /etc/  1 DailyMusashi23   23 OK
2006-04-13 209.87.56.16 /etc/  1 DailyMusashi24   29 OK
2006-04-18 209.87.56.16 /etc/  1 DailyMusashi25   23 OK

Restoring Files

Looking at the file-listing, you are interested in the most-recent level0 backup (to begin with), and the most-recent level1. None of the others (ie xxx ) are of any interest at all. We will only use DailyMusashi20, and DailyMusashi25.
Now that you know what tape the files are on, insert the first tape into the drive and ask for the files. Note: The files will be extracted into the current directory.

$ mkdir restore; cd restore
$ amrestore -p /dev/nst0 209.87.56.16 /etc | tar xvf -

This process will output the files and directories in the current folder. You can aboard the process at anytime when your file has been recovered (CTRL-C).

Finish Up

Rewind a tape; as root:

# mt -f /dev/st0 rewind     (/dev/nst0 is the non-rewinding device, although it may rewind anyway)
# mt -f /dev/nst0 eject