HOWTO Restore Files From Amanda: Difference between revisions

From Research
Jump to navigation Jump to search
Mmmark (talk | contribs)
Mmmark (talk | contribs)
Line 26: Line 26:
Rewind a tape:
Rewind a tape:
  # mt -f /dev/nst0 rewind
  # mt -f /dev/nst0 rewind
# mt -f /dev/nst0 eject

Revision as of 21:15, 4 July 2006

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

Now that you know what tape the files are on, insert the 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:

# mt -f /dev/nst0 rewind
# mt -f /dev/nst0 eject