This backup system works by putting files in /etc/backup.d. It can support a
number of different backends. Currently, there is only rdiff-backup and duplicity implemented.
- Copy
backupto some place in the$PATH, generallyPREFIX/bin - Create a directory for your drivers, generally
PREFIX/share/backup/drivers - You can install the drivers found in the
driversdirectory toPREFIX/share/backup/driversor you can create your own drivers. - Create a directory /etc/backup.d to receive the backup descriptors.
-
backup backup DESCRIPTORWhere
DESCRIPTORis the full path to a descriptor generally found in/etc/backup.d. This command will backup the files according to the descriptor. -
backup restore DESCRIPTOR [...]Where
DESCRIPTORis the full path to a descriptor generally found in/etc/backup.d. This command will restore the files last backed-up by the same descriptor. Additional arguments an be passed to the backend. -
backup list DESCRIPTORList the backups made by the descriptor
-
backup helpPrint some help.
The descriptor describe what files must be backed-up. It is always associated with a driver, which describes how to back-up the files.
The driver can add more descriptor types and can handle some configuration files if wanted.
To find the driver for a given descriptor, the backup system will try to find a
file named driver or driver.sh that is in the same directory as the
descriptor. The driver or driver.sh is generally a symbolic link pointing to
a driver implementation in PREFIX/share/backup/drivers/.
A special case for subdirectory descriptors that look for their drivers inside their directory.
See the README.md file in backup.d
This driver will look for a file named rdiff-backup.conf next to the driver
file. It is a shell script that can changes the following variables :
DESTINATION(mandatory): Where to backup toAUTO_PRUNE: Iftrue, remove files older thanAUTO_PRUNE_DELAYduring backup. Default isfalse.AUTO_PRUNE_DELAY: argument to--auto-prune-delaywhenAUTO_PRUNEistrue. Default is1W
This driver looks for a file named duplicity.conf next to the driver file. It is a shell script that can change the following variables:
DESTINATION(mandatory): Where to backup toAUTO_PRUNE: Iftrue, remove files older thanAUTO_PRUNE_DELAYduring backup. Default isfalse. Executesduplicity remove-older-than.AUTO_PRUNE_DELAY: remove files older than this delay ifAUTO_PRUNEistrue. Default is1WFULL_BACKUP_PERIOD: run a full backup instead of an incremental backup if the full backup is older than this period. Defaults to the auto prune delay.FLAGS: additional duplicity flags (bash array)