# # Example btrbk configuration file # # # Please refer to the btrbk.conf(5) man-page for more details. # # Note that the options can be overridden in the # volume/subvolume/target sections. # # Directory in which the btrfs snapshots are created. Relative to # of the volume section. # If not set, the snapshots are created in . # # If you want to set a custom name for the snapshot (and backups), # use the "snapshot_name" option within the subvolume section. # # NOTE: btrbk does not autmatically create this directory, and the # snapshot creation will fail if it is not present. # snapshot_dir _btrbk_snap # Always create snapshots. Set this to "ondemand" to only create # snapshots if the target volume is reachable. Set this to "no" if # snapshot creation is done by another instance of btrbk. #snapshot_create always # Perform incremental backups (set to "strict" if you want to prevent # creation of non-incremental backups if no parent is found). #incremental yes # Resume missing backups (set to "no" if you don't want to resume # missing backups). #resume_missing yes # Specify on which day of week weekly/monthly backups are to be # preserved. #preserve_day_of_week sunday # Preserve matrix for source snapshots: #snapshot_preserve_daily all #snapshot_preserve_weekly 0 #snapshot_preserve_monthly all # Preserve matrix for backup targets: #target_preserve_daily all #target_preserve_weekly 0 #target_preserve_monthly all # Specify SSH private key for "ssh://" volumes / targets: #ssh_identity /etc/btrbk/ssh/id_ed25519 #ssh_user root #ssh_port default # Don't wait for transaction commit on deletion. Set this to "after" # or "each" to make sure the deletion of subvolumes is committed to # disk when btrbk terminates. #btrfs_commit_delete no # Set this to "yes" to enable btrfs-progs < 3.17 compatibility. # Set this either globally or in a specific "target" section. #btrfs_progs_compat no # # Volume section: "volume " # # 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) # # Subvolume section: "subvolume # # Subvolume to be backuped, relative to # in volume section. # # Target section: "target " # # Backup type, currently only "send-receive". # Directory of a btrfs volume (or subvolume) # receiving the backups. # # 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. # # # Example configuration: # snapshot_preserve_daily 14 snapshot_preserve_weekly 0 snapshot_preserve_monthly 0 target_preserve_daily 20 target_preserve_weekly 10 target_preserve_monthly all # Backup to external disk mounted on /mnt/btr_backup volume /mnt/btr_pool # no action if external disk is not attached snapshot_create ondemand subvolume root_gentoo target send-receive /mnt/btr_backup/_btrbk subvolume kvm # use different preserve matrix for kvm backups target_preserve_daily 7 target_preserve_weekly 4 target send-receive /mnt/btr_backup/_btrbk # Backup to external disk as well as some remote host volume /mnt/btr_data subvolume home # always create snapshot, even if targets are unreachable snapshot_create always target send-receive /mnt/btr_backup/_btrbk target send-receive ssh://backup.my-remote-host.com/mnt/btr_backup # Backup from remote host, with different naming volume ssh://my-remote-host.com/mnt/btr_pool subvolume data_0 snapshot_dir snapshots/btrbk snapshot_name data_main target send-receive /mnt/btr_backup/_btrbk/my-remote-host.com # Resume backups from remote host which runs its own btrbk instance # creating snapshots for "home" in "/mnt/btr_pool/btrbk_snapshots". volume ssh://my-remote-host.com/mnt/btr_pool subvolume home snapshot_dir btrbk_snapshots snapshot_preserve_daily all snapshot_create no resume_missing yes target send-receive /mnt/btr_backup/_btrbk/my-remote-host.com