Document Archive: btrbk-0.16

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, overriding the same option of the next higher section. 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 (or subvolume) containing the source subvolume(s) to be backuped (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. In the current version of btrbk, 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

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.

incremental yes|no|strict

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

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”.

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 »