Backup strategy

The aim of this section is to describe the details of our backup procedure. We begin with the first level backup. First the current backup medium is determined, we simply cycle through the available media defined in /var/lib/rab/Media. We mount the medium to the directory /var/lib/rab/mnt/DVD, and create a directory named with the current date. Some administrative files are created in this directory, and the backup data will be written to the subdirectory data. Usually, you make one backup per day, so the directory name should be unique. Otherwise, another suffix is appended to the name. Each directory is saved to a corresponding path under the data directory.

As already explained, there are two different types of directories. A standard directory will be completely copied if there is any change in the directory. Here, a directory could mean an entire directory tree. Archive directories, on the other hand, are incrementally saved. We determine all files not already saved on this backup medium, and copy these file in the backup directory.

From time to time, we will write a checkpoint to a CD. There are four different ways to trigger such a checkpoint.

In any case, we may write some additional directories to the CD. Usually, we will write a checkpoint even if the directory in question is unmodified since the last checkpoint. This behaviour is configurable, you can tell RAB that there is no backup necessary if a certain number of CD copies exists. After a checkpoint is written, we will begin to delete old backups from our DVD RAM media.

RAB is able to write a checkpoint to more than one CD, but there exists a buildin limit on the number of CD's to be used for a single checkpoint. Currently, this maximal number equals 64. If your backup exceeds this limit, you will need a more powerfull backup program, anyway.

The toplevel directory of a RAB checkpoint CD contains backups of the current RAB configuration and data files, and a small README file describing the CD. The actual backup files are located in the directory data. Each path in the original filesystem is mapped to a corresponding path below data.

Eventually, the CD also contains a set of additional directories to fill up some unused space. All of these directories are contained in the toplevel subdirectory add. This subdirectory holds a list of data directories named 1, 2, and so on. The README file already mentioned contains a list mapping these directory numbers to their actual directory path.