Phoebe 1,
2, 3,
4 Catalogs
'n Manuals
Hardening
| Server Restore ProceduresUnarguably, the one thing that is more important than performing regular backups is having them available when it comes time to recover an important file! Obviously, as discussed in the section called Server Backup Procedures, the procedures for performing a restore will differ depending on your choice of a backup solution. In this section, I will discuss methods for restoring files which have been backed up with ``tar'' and ''KDat''. Restoring with ``tar'':The following command will restore all files from the ``full-backup-09-October-1999.tar.gz'' archive, which is an example backup of our Linux system (as created in the example commands shown in the section called Backing up with ``tar''::
The above command extracts all files contained in the compressed archive, preserving original file ownership and permissions. The ``x'' option stands for extract. (The other options are described in the section called Backing up with ``tar'':.
If you do not need to restore all files contained in the archive, you can specify one or more files that you wish to restore, as in the following example:
The above command restores the ``etc/profile'' and ``usr/local/bin/tolower'' files from the example archive.
As mentioned in the section called Server Backup Procedures, when creating an archive file, tar will strip leading ``/'' (slash) characters from file path names. This means that restore files may not end up in the same locations they were backed up from. Therefore, either change to the ``/'' root directory, or use the ``--directory /'' option.
Restoring with ``KDat'':To restore one or more files from a KDat-created backup set, insert the backup tape into the drive, choose “Mount Tape” from the “File” menu option (or left-click on the icon that looks like a tape). KDat will try to read header information from the tape, and if successful, will then try to find the tape index which matches the identification found in the tape header. This tape index is stored on your hard drive, and is a unique file created for each backup tape formatted by KDat, and is updated each time you perform a backup. If this corresponding tape index is missing (perhaps you are restoring from a backup set created on another machine, or the index file was deleted or somehow corrupted on your hard drive), KDat will inform you of this fact, and ask you if it is okay to recreate the index by reading the tape. Because you will need to recreate it before you will be able to restore your desired files, it makes perfect sense to left-click “Yes”.
Once the tape index has been successfully read, it can then used to select the directories or files you wish to restore from the backup set, in much the same manner you used when creating your backup profiles (see the section called Server Backup Procedures for detailed instructions on the file selection process). Once you have selected the appropriate files, you can start the restoration process by choosing “Restore...” from the “File” option on the menu bar (or left-click the tape restore icon). KDat will display a dialog box, allowing you to confirm which files will be restored. In addition, you have the option of specifying a directory into which files will be restored. This will allow you to restore critical system files into your home directory, and then compare, move, or update those files to their intended location later on. This is actually the safest way of restoring files. To begin the recovery process, click the “Okay” button. KDat will then scan the tape and restore the selected files. On occasion, you may find it necessary or useful to restore one or more files from a backup set created with KDat without using KDat to do so. Perhaps you would like to restore such files on a system that does not offer a GUI-based environment, or would like to do so over a slow network connection through which remote execution of KDat would be impractical. Fortunately, KDat writes its backup data sets using the ``tar'' tool, a command-line based tool that is available on any *nix system. Should you wish to restore your KDat-created backup set using tar, simply do so using whatever options you would with any normal backup set created with tar itself. Bear in mind, however, that data sets are not stored in compressed format.
|