2015-03-13 14:44:09 +01:00
|
|
|
#
|
2015-01-17 13:53:23 +01:00
|
|
|
# Example btrbk configuration file
|
2015-03-13 14:44:09 +01:00
|
|
|
#
|
|
|
|
# Note that the options can be overridden in the
|
|
|
|
# volume/subvolume/target sections. Refer to man btrbk.conf(5) for a
|
|
|
|
# more detailed explanation of this.
|
|
|
|
#
|
2015-01-17 13:53:23 +01:00
|
|
|
|
2015-03-13 14:44:09 +01:00
|
|
|
# Directory in which the btrfs snapshots are created. Relative to
|
|
|
|
# <volume-directory> of the volume section.
|
|
|
|
# If not set, the snapshots are directly created in:
|
|
|
|
# <volume>/<volume-directory>
|
|
|
|
#
|
|
|
|
# NOTE: btrbk does not autmatically create this directory, and the
|
|
|
|
# snapshot creation will fail if it is not present.
|
|
|
|
#
|
2015-01-17 13:53:23 +01:00
|
|
|
snapshot_dir _btrbk_snap
|
|
|
|
|
2015-01-17 14:55:46 +01:00
|
|
|
# Always create snapshots, even if the target volume is unreachable
|
2015-01-17 13:53:23 +01:00
|
|
|
snapshot_create_always yes
|
|
|
|
|
2015-01-17 14:55:46 +01:00
|
|
|
# Perform incremental backups (set to "strict" if you want to prevent
|
|
|
|
# creation of initial backups if no parent is found)
|
|
|
|
incremental yes
|
2015-01-17 13:53:23 +01:00
|
|
|
|
|
|
|
# ssh key for ssh volumes/targets
|
|
|
|
ssh_identity /etc/btrbk/ssh/id_ed25519
|
2015-01-17 14:55:46 +01:00
|
|
|
ssh_user root
|
2015-01-17 13:53:23 +01:00
|
|
|
|
|
|
|
# Preserve weekly/monthly backups from given day of week
|
|
|
|
preserve_day_of_week sunday
|
|
|
|
|
|
|
|
# Preserve matrix for snapshots
|
|
|
|
snapshot_preserve_daily 14
|
|
|
|
snapshot_preserve_weekly 0
|
|
|
|
snapshot_preserve_monthly 0
|
|
|
|
|
|
|
|
# Preserve matrix for backups
|
|
|
|
target_preserve_daily 20
|
|
|
|
target_preserve_weekly 10
|
|
|
|
target_preserve_monthly all
|
|
|
|
|
|
|
|
# Make sure the deletion of subvolumes is committed to disk when btrbk terminates
|
|
|
|
btrfs_commit_delete after
|
|
|
|
|
2015-03-24 13:13:00 +01:00
|
|
|
# Enable compatibility mode for btrfs-progs < 3.17.
|
|
|
|
# Set this either globally or in a specific "target" section.
|
|
|
|
#btrfs_progs_compat yes
|
|
|
|
|
2015-01-17 14:55:46 +01:00
|
|
|
|
|
|
|
#
|
2015-03-13 14:44:09 +01:00
|
|
|
# Volume section: "volume <volume-directory>"
|
|
|
|
# <volume-directory> Directory of a btrfs volume (or subvolume)
|
|
|
|
# containing the subvolume to be backuped
|
|
|
|
# (usually the mount-point of a btrfs filesystem
|
|
|
|
# mounted with subvolid=0 option)
|
2015-01-17 13:53:23 +01:00
|
|
|
#
|
2015-03-13 14:44:09 +01:00
|
|
|
# Subvolume section: "subvolume <subvolume-name>
|
|
|
|
|
|
|
|
# <subvolume-name> Subvolume to be backuped, relative to
|
|
|
|
# <volume-directory> in volume section
|
2015-01-17 14:55:46 +01:00
|
|
|
#
|
2015-03-13 14:44:09 +01:00
|
|
|
# Target section: "target <type> <volume-directory>"
|
|
|
|
|
|
|
|
# <type> Backup type, currently only "send-receive"
|
|
|
|
|
|
|
|
# <volume-directory> Directory of a btrfs volume (or subvolume)
|
|
|
|
# receiving the backups
|
2015-01-17 14:55:46 +01:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# NOTE: The parser does not care about indentation, this is only for
|
|
|
|
# human readability. The options always apply to the last section
|
|
|
|
# encountered, overriding the corresponding option of the upper
|
|
|
|
# section. This means that the global options must be set before any
|
|
|
|
# "volume" section.
|
2015-01-17 13:53:23 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
volume /mnt/btr_system
|
|
|
|
subvolume root_gentoo
|
|
|
|
target send-receive /mnt/btr_ext/_btrbk
|
|
|
|
target send-receive /mnt/btr_backup/_btrbk
|
|
|
|
receive_log sidecar
|
|
|
|
|
|
|
|
subvolume kvm
|
|
|
|
# use different preserve matrix for kvm backups
|
|
|
|
target_preserve_daily 7
|
|
|
|
target_preserve_weekly 4
|
|
|
|
|
|
|
|
target send-receive /mnt/btr_ext/_btrbk
|
|
|
|
target_preserve_weekly 0
|
|
|
|
|
|
|
|
target send-receive /mnt/btr_backup/_btrbk
|
|
|
|
|
|
|
|
|
|
|
|
volume /mnt/btr_data
|
|
|
|
subvolume home
|
|
|
|
target send-receive /mnt/btr_backup/_btrbk
|
|
|
|
target send-receive ssh://backup.my-remote-host.com/mnt/btr_backup
|
|
|
|
|
|
|
|
|
|
|
|
volume /mnt/btr_ext
|
|
|
|
subvolume data
|
|
|
|
target send-receive /mnt/btr_backup/_btrbk
|
|
|
|
|
|
|
|
volume /mnt/btr_boot
|
|
|
|
incremental yes
|
|
|
|
|
|
|
|
subvolume boot
|
|
|
|
target send-receive /mnt/btr_ext/_btrbk
|
|
|
|
target send-receive /mnt/btr_backup/_btrbk
|
|
|
|
|
|
|
|
|
|
|
|
volume ssh://my-remote-host.com/mnt/btr_pool
|
|
|
|
subvolume system
|
|
|
|
target send-receive /mnt/btr_backup/_btrbk/my-remote-host.com
|