amanda
, bacula
, or BackupPC
. Those are client/server systems featuring many options, whose configuration is rather difficult. Some of them provide user-friendly web interfaces to mitigate this. For non-enterprise systems, administrators might want to check out rsnapshot
or rdiff-backup
. Users can easily create backups of their filesystems with timeshift
, fsarchiver
, duplicity
, or even dd
.
apt-cache search backup
.
rsync
command (from the package of the same name) is used daily to back up these different servers.
rsync
command is preceded by a duplication of the content of the previous backup with hard links, which prevents usage of too much hard drive space. The rsync
process then only replaces files that have been modified since the last backup. With this mechanism a great number of backups can be kept in a small amount of space. Since all backups are immediately available and accessible (for example, in different directories of a given share on the network), you can quickly make comparisons between two given dates.
dirvish
program. It uses a backup storage space (“bank” in its vocabulary) in which it places timestamped copies of sets of backup files (these sets are called “vaults” in the dirvish documentation).
/etc/dirvish/master.conf
file. It defines the location of the backup storage space, the list of “vaults” to manage, and default values for expiration of the backups. The rest of the configuration is located in the bank/vault/dirvish/default.conf
files and contains the specific configuration for the corresponding set of files.
Voorbeeld 9.3. The /etc/dirvish/master.conf
file
bank: /backup exclude: lost+found/ core *~ Runall: root 22:00 expire-default: +15 days expire-rule: # MIN HR DOM MON DOW STRFTIME_FMT * * * * 1 +3 months * * 1-7 * 1 +1 year * * 1-7 1,4,7,10 1
bank
setting indicates the directory in which the backups are stored. The exclude
setting allows you to indicate files (or file types) to exclude from the backup. The Runall
is a list of file sets to backup with a time-stamp for each set, which allows you to assign the correct date to the copy, in case the backup is not triggered at precisely the assigned time. You have to indicate a time just before the actual execution time (according to /etc/cron.d/dirvish
). Finally, the expire-default
and expire-rule
settings define the expiration policy for backups. The above example keeps forever backups that are generated on the first Sunday of each quarter, deletes after one year those from the first Sunday of each month, and after 3 months those from other Sundays. Other daily backups are kept for 15 days. The order of the rules does matter, Dirvish uses the last matching rule, or the expire-default
one if no other expire-rule
matches.
Voorbeeld 9.4. The /backup/root/dirvish/default.conf
file
client: rivendell.falcot.com tree: / xdev: 1 index: gzip image-default: %Y%m%d exclude: /var/cache/apt/archives/*.deb /var/cache/man/** /tmp/** /var/tmp/** *.bak
hostname
), especially those in the root tree (tree: /
), except those listed in exclude
. The backup will be limited to the contents of one filesystem (xdev: 1
). It will not include files from other mount points. An index of saved files will be generated (index: gzip
), and the image will be named according to the current date (image-default: %Y%m%d
).
dirvish --vault vault --init
command. From there on the daily invocation of dirvish-runall
will automatically create a new backup copy just after having deleted those that expired.
dconf
(see Paragraaf 13.3.1, “GNOME” for more information about this).