Document Archive: btrbk-0.19.1

NAME

btrbk.conf − btrbk configuration file

SYNOPSIS

/etc/btrbk.conf
/etc/btrbk/btrbk.conf

DESCRIPTION

The btrbk configuration file specifies which btrfs subvolumes on the filesystem are to be processed, what target subvolumes should be used to create the backups, and where the snapshots should be generated. The retention policy, as well as most other options can be defined either globally or within a section.

The options specified always apply to the last section encountered, superseding the values set in upper-level sections. This means that global options must be set before any sections are defined.

The sections are:
volume
<volume-directory>|<url>

Directory of a btrfs volume containing the source subvolume(s) to be backed up. <volume-directory> must be an absolute path and point to a btrfs volume (or subvolume). Usually the mount point of a btrfs filesystem mounted with the subvolid=0 option.

subvolume <subvolume-name>

Subvolume to be backed up, relative to the <volume-directory> specified in the volume section.

target <type> <volume-directory>|<url>

Target type and directory where the backup subvolumes are to be created. <volume-directory> must be an absolute path and point to a btrfs volume (or subvolume). Currently the the only valid <type> is “send−receive”.

For the volume and target sections, you can also specify a ssh-url instead of a local directory. The syntax for <url> is:

ssh://host.xz/path/to/volume

Note that btrfs is very picky on file names (mainly for security reasons), only the characters [0-9] [a-z] [A-Z] and "._+-@" are allowed.

The configuration options are:
snapshot_dir
<directory>

Directory in which the btrfs snapshots are created, relative to <volume-directory> of the volume section. Note that btrbk does not autmatically create this directory, and the snapshot creation will fail if it is not present.

snapshot_name <basename> Base name of the created snapshot (and

backup). This option is only valid in the target section. Defaults to <subvolume-name>.

snapshot_create always|ondemand|onchange|no

If set to “ondemand”, snapshots are only created if the target subvolume is reachable (useful if you are tight on disk space and you only need btrbk for backups to an external disk which is not always connected). If set to “onchange”, snapshots are only created if the source subvolume has changed since the last snapshot (more precisely: if the btrfs generation has been increased since the last snapshot). If set to “always”, snapshots are always created. If set to “no”, the snapshots are never created (useful in conjunction with the resume_missing option if another instance of btrbk is taking care of snapshot creation). Defaults to “always”.

incremental yes|no|strict

If set, incremental backups are created. If set to “strict”, non-incremental (initial) backups are never created. Defaults to “yes”.

resume_missing yes|no

If set, the backups in the target directory are compared to the source snapshots, and missing backups are created if needed (complying to the target preserve matrix). Defaults to “yes”.

target_preserve_daily all|<number>

How many days of backups should be preserved. Defaults to “all”.

target_preserve_weekly all|<number>

Defines for how many weeks back weekly backups should be preserved. Every backup created at preserve_day_of_week (or the next backup in this week if none was made on the exact day) is considered as a weekly backup. Defaults to “0”.

target_preserve_monthly all|<number>

Defines for how many months back monthly backups should be preserved. Every last weekly backup in a month is considered a monthly backup. Defaults to “all”.

snapshot_preserve_daily
snapshot_preserve_weekly
snapshot_preserve_monthly

Defines retention policy for the snapshots, with same semantics as the target_preserve_* options.

preserve_day_of_week monday|tuesday|...|sunday

Defines on what day a backup/snapshot is considered as a weekly backup. Defaults to “sunday”.

ssh_identity <file>

Absolute path to a ssh identity file (private key). Note that if the private key is password protected, btrbk will prompt for user input, which is usually not desired.

ssh_user <username>

Remote username for ssh. Defaults to “root”. Note that you will have to make sure that the remote user is able to run /sbin/btrfs (which needs root privileges).

btrfs_commit_delete after|each|no

If set, make sure the deletion of snapshot and backup subvolumes are committed to disk when btrbk terminates. Defaults to “no”.

btrfs_progs_compat yes|no *experimental*

Enable compatibility mode for btrfs-progs < 3.17 (btrfs --version). This option can be set either globally or within a target section. If enabled, the latest common snapshots are determined by subvolume names instead of received_uuid, which can lead to false guesses if the snapshot or target subvolumes are manipulated by hand (moved, deleted).

Lines that contain a hash character (#) in the first column are treated as comments.

AVAILABILITY

Please refer to the btrbk project page http://www.digint.ch/btrbk/ for further details.

SEE ALSO

btrbk(1)

AUTHOR

Axel Burri <axel@tty0.ch>

« prev | next »