Document Archive: btrbk-0.17.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 other options can be defined for each backup.

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 backuped. <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 backuped, 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). Defaults to <subvolume-name>. This option is only valid in the target section.

snapshot_create_always yes|no

If set, the snapshots are always created, even if the backup subvolume cannot be created (e.g. if the target subvolume cannot be reached). Use in conjunction with the resume_missing option to make sure that the backups are created as soon as the target subvolume is reachable again. Useful for laptop filesystems in order to make sure the snapshots are created even if you are on the road. Defaults to “no”.

incremental yes|no|strict

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

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

Define 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 »