Backup Server – Amanda – Selective File Restore

Restoring is accomplished with the amrecover command. You may choose to expand the files on the Amanda Server’s holding disk…. it’s big enough, or perhaps you’d rather run amrecover command directly from the Amanda client system. This is not the proper procedure for recovery of an entire system. amrecover digs in to the tarballs and pulls out files selectively. If you need the full restore then use amrestore which is faster because it allows the system to bypass the step of finding all of the files in the tarball before expanding them… amrestore assumes they are all there.

OTHER ARTICLES IN THIS SERIES
These are links to all the core Amanda articles:

  • CONCEPTS AND VOCABULARY
  • HOWTO – Backup Files with Amanda
  • HOWTO – Recover Some files with Amanda
  • HOWTO – Barebones Recover the Amanda Backup Server
  • HOWTO – Restore Entire Systems With Amanda

EXTRACTION
amrecover -C daily -s backup.servername.com
listhost – lists the hosts in the daily backup config
sethost servername – sets the host to servername.
listdisk – list the disks we backup on servername
setdisk /restore_directory – sets the directory to /restore_directory on servername.
setdate —10 [optional] – Let’s pull our backup from the 10th of this month.
ls / cd / pwd / help – Navigate around.
add restore_directory/ – Add the entire path or a single file. Do this repeatedly.
clear or delete restore_directory/ – Clear the entire extraction list or just delete a single path or item.
extract – extracts the files. Be patient. This may require referencing multiple backup and pulling date from very large files.
exit – exit out of amrestore.
Once you get to the extract exercise a little patience and just go away for a time. Gzip is gong to dominate the CPU and disk reads for a time, but you’ll also see tar, amandad, amrecover and amidxtaped running. A system load of two or three is typical. It looks like the more files, even if they are tiny, the higher the load. Larger files seems to extract much faster.

MOVE THESE FILES TO THE DESTINATION
I’ve always said that rsync is powerful, but the problem is people has difficulty using is. We use it here because if the transfer of files is interrupted you can start it again and it will pick up where it left off. Also.. if does some nice work statusing you while the files move.

OPTS=”-v -u -a –rsh=ssh –stats”
USER=root
DEST=monroe
DESTDIR=/root/vgupta
RESTOREDIR=vgupta/
rsync $OPTS $RESTOREDIR $USER@$DEST:$DESTDIR

Take a note of the backslashes in the DIR variables… Destination is NOT terminated with a / while RESTOREDIR IS terminated with a /.

Expect around 20Mbytes/sec on these transfers.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>