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.
The user may explicitely request a checkpoint using a RAB client program.
The number of new or modified files in the directory exceeds a configurable number.
The number of days since the last checkpoint exceeds a configurable number. These numbers can be configured per directory or global. If both methods are used, a checkpoint is triggered if any of the two events occur.
The DVD RAM is too small, to save the directory.
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.