Convention-over-configuration DAR backups
- Home page: http://danmbox.github.io/dar-incdec-repo
- Downloads: github
- Author: Dan A. Muresan (danmbox at gmail dot com)
.-------------------. .-------------. | daily incremental | | weekly | | email@example.com | | decremental | |-------------------| | 007.00-dec | | etc-T9@T7 |--. |-------------| | www-T9@T7 | '-->| etc-T7 |<--. | | | www-T7 | | | etc-T8@T7 | | | | | www-T8@T7 | .-->| etc-T0@T7 |---' | ... | | | www-T0@T7 | | etc-T3@T0 |--' '-------------' | www-T3@T0 | '-------------------'
dar-incdec repository (see
example_repo in the distribution)
consists of several folders, each corresponding to a backup interval
(e.g. daily, weekly). Each interval folder contains multiple rules
(e.g. back up
/var/www). Each rule generates a backup series
composed of multiple snapshots, distinguished by different suffixes
The name of interval folders should contain an interval (in days,
possibly with decimals), an optional reference-interval specification
(for incremental backups), and the backup mode (
001.00@007-incis a daily incremental backup on top of the latest weekly snapshot (there should be a corresponding
000.50-incis a twice-daily "traditional" incremental backup (each snapshot is on top of the previous snapshot); if not specified, the reference interval (folder) defaults to the current interval.
007-decis a weekly decremental backup. The latest backup is always full, and all others are "decremental" with respect to their immediate successor.
Backup rules are stored in a
.backups subdirectory in each interval
folder. Rules should be files with names like
prefix can contain alphanumeric characters and underscores
(each prefix corresponds to a backup series). Rules can be symlinks
and can be shared between the various interval directories. The
@ref overrides the interval-wide reference directory, but
to you shouldn't normally need this feature.
Each rule file contains
dar arguments (the tree root
-g paths), possibly preceded by
--defaults= (which enables
compression, except for some well-known non-compressible
extensions). Do not include any
dar flags related to incremental /
decremental backup, as
dar-incdec-repo adds these automatically.
darincdec_repo.py backup /path/to/repo
example_repo in the distribution for a sample repository.
There is an auxiliary lower-level utility,
creates snapshots for a given series (prefix), operating within a single
interval directory. Both utilities can be invoked with
Copyright 2015 Dan A. Muresan
See LICENSE.txt for licensing information.