Maintaining and Troubleshooting Linux
◾
577
stored on tapes 2 and 3. We are making the assumption that incremental backups will not
require nearly as much storage as a full backup. With this pattern of saving onto tapes, we
would continue to use an incremental tape for several days before we had to reuse a full
backup tape. See Table 14.2 that shows in 1 week that we are using only three tapes. We
must reuse our first tape only in week 3 and tape 1 is not reused until week 4.
What happens if you need to restore from an incremental backup? Here is the drawback
to
incremental backups, and the solution depends on what needs to be restored. Are you
restoring individual files or the full file system? In the former case, your solution is to scan
the incremental backups for the most recent version of the file(s) in question. If there are
multiple
files to recover, you may find that you have to restore from more than one tape
and in fact, you may have to search all the tapes to locate the file(s) to restore. You would
search these tapes backward from the most recent incremental backup back to the full
backup. The reason for this is that once you have found the file(s), you can stop.
If you are restoring
the entire file system, you will proceed in the opposite order. First,
you restore the file system from the latest full backup. Then, you will restore individual files
found from each incremental backup going forward in time. This approach may result in
your restoring the same file several times,
but each time, you will be restoring a newer ver-
sion. Restoration of the full file system may take a good deal more time than performing
either the full backup or any individual incremental backup.
The final question that we posed originally was how you perform the backup. The answer
to this question will impact other answers. An easy solution to backing up all of /home is to
mount
a tape drive, writable CD drive or external file system, and perform a tar operation
on /home resulting in a tar file stored to the mounted drive.
Tar has several benefits over other approaches. For instance,
you could potentially run
tar without unmounting the file system being backed up, leaving it accessible during the
backup. Tar is also fairly easy to use and can compress its contents during archiving. Tar is
also capable of incremental backups although it is not as easily controlled as through dump.
One way to handle an incremental backup is to specify in a separate file,
filename
, all the
TABLE 14.2
Daily Backup Strategy
Do'stlaringiz bilan baham: