12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

232CHAPTER 10Techniques for Backup and RecoveryRestoring from BackupNow that you have learned how to perform backups with Amanda, the next step is tolearn about restoring from backup. Remember to test the restore process before a systemfailure occurs.There are two utilities for restoring with Amanda: amrestore and amrecover. The amrestoreutility can be used to restore entire images from the backup server; amrecover is an interactivecommand run on the client and used to recover specific files.Using amrestoreBefore using amrestore, determine which tape has the image you want to restore usingeither amadmin or amtoc. Make sure the tape is mounted on the server before restoring animage. To retrieve all images for the host named wudan, use the following command:amrestore wudanRefer to the man page for amrestore with the man amrestore for additional options.Using amrecoverTo use amrecover, the index parameter must be set to yes for the dumptype defined inamanda.conf and set for the client in the disklist file. Because the root user on the clientmust run amrecover, be sure the root user is allowed as a remote user on the client in the.amandahosts file on the server.To start amrecover, log in as root on the client, start a shell prompt, change to the directorythat should contain the file or files you want to restore, and type the amrecover command such as amrecover DailySet1. If connection is successful, youwill receive the amrecover> prompt.The default restore date is set to the current day. Use the setdate command to change thedate from which you want to restore files, use the cd command to change directories tofind the files on the server, and use the ls command to list files in the current directoryon the server. After finding the file to recover, use the add command to addthe file to the list of files to recover, and use the extract command to retrieve the file.Refer to the man page with the man amrecover command for a full list of possiblecommands.Other <strong>Linux</strong> Backup UtilitiesIf you write your own custom scripts or software for performing backups, many <strong>Linux</strong>utilities can be used including tar and rsync. Use this section to learn more about themand determine if they can be useful for you.The tar UtilityWhen backing up data that is no longer being used or data that is not frequentlychanged, consider creating a compressed archive file using the tar archive utility incombination with one of the compression tools such as gzip or bzip2. Creating a

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!