-->
Previous Table of Contents Next


Planning a Backup Schedule

It’s important to come up with a backup schedule that meets your needs and makes it possible to restore recent copies of files. After you decide on a schedule, stick to it.

The ideal situation is to be able to restore any file at any time. Taken to an extreme, that’s not possible, but you should be able to restore files on a daily basis. To do this, you use a combination of complete and incremental backups. A complete backup is one that contains every file on the system. An incremental backup is one that contains files that have changed since the last backup. Incremental backups can be at different levels—incremental to the last complete backup or incremental to the last incremental backup. It’s convenient to think of backups as occurring at different levels:

Level 0: full backup
Level 1: incremental to the last complete backup
Level 2: incremental to the last level 1 backup

The following are some sample backup schedules:

  Full backup one day, incremental other days.
Day 1 Level 0, complete backup
Day 2 Level 1, incremental backup
Day 3 Level 1, incremental backup
Day 4 Level 1, incremental backup
Day 5 Level 1, incremental backup

If you create and save an index of each backup, you should need only one day’s backup to restore an individual file and only two days’ backups (that of day 1 and another day) to completely restore the system.
  Full backup once a month, weekly incremental, and daily incremental. (This example is built around Tuesday, but it could be any day of the week.)
First Tuesday Level 0, complete backup
Any other Tuesday Level 1, incremental backup
Any other day Level 2, incremental backup

To restore an individual file under this schedule, you may need the complete backup if the file wasn’t changed during the month, the level 1 backup if the file was changed the previous week but not this week, or the level 2 backup if the file was changed this week. This schedule is more complex than the previous example, but backups take less time per day.

You also might want to consider keeping backup files for an extended period, in case you need to restore an older version. A common schedule is to keep one weekly copy of a full backup for four weeks. For periods of longer than four weeks, you might consider keeping a biweekly backup for about three months.

Performing Backups and Restoring Files

Several different utilities are available for backing up and restoring files in a Linux system. Some are simple and straightforward; others are more complex. The simple methods have their limitations, however. Choose the one that meets your needs.

Because backing up and restoring files is very important, a number of available software systems are dedicated to that task. The following sections present two of them:

  tar is a tape archive utility available on every Linux or UNIX system. This easy-to-use Linux version can use several tapes or disks.
  cpio is a general-purpose utility for copying files available on every UNIX system. cpio is easy to use and more robust than tar, and it can use several tapes or disks.

Using tar

The UNIX tar utility was originally designed to create a tape archive (to copy files or directories to tape and then to extract or restore files from the archive). You can use it to copy to any device. It has the following advantages:

  It’s simple to use.
  It’s reliable and stable.
  Archives can be read on virtually any Linux or UNIX system.


Previous Table of Contents Next