How to use the amrecover command to restore data

This article is for Amanda Enterprise Edition (AE)

With this configuration, you should now be able to contact the server from the host where you are performing the restore by running amrecover:

  1. As root user, run:
    # amrecover <your-backup-set-name-here>
  2. If needed, use the “sethost” command at the amrecover prompt to set the hostname as specified on the “Backup what” page.  You can run “listhost” at the amrecover prompt to see a list of valid hostname options.
    amrecover> sethost <hostname-of-the-backup-client>
  3. Use the “setdisk” command to set the disk/directory name as specified on the “Backup what” page.  You can run “listdisk” at the amrecover prompt to see a list of valid disks/directories options.
    amrecover> setdisk <directory-that-was-backed-up>
  4. Use the “ls” command to list the content of the last successful backup
    amrecover> ls
  5. Use the “cd” command to change directory locate the file you need to restore, in the backup
    amrecover> cd <directory>
  6. If you did not run amrecover from the directory to which you want to restore, use the “lcd” command to change the local directory (the directory in where files and directories will be restored)
    amrecover> lcd <local-directory>
  7. Use the “add” command repeatedly as needed to select all files and directories you want to restore
    amrecover> add <file-I-want-to-restore>
  8. When finished selecting files and directories to restore, use the “extract” command to extract (restore) the selected files and directories
    amrecover> extract
    Answer questions as prompted.
  9. Use the “quit” command to exit the “amrecover” prompt
    amrecover> quit

Notes:

  1. If you need to restore data from a specific date, on the “amrecover ” prompt use the “setdate” command. Eg. amrecover> setdate YYYY-MM-DD-HH-MM-SS
  2. As usual, “# man amrecover” will give you all the options for this command.

Powered by BetterDocs

Leave a Reply