documentation: simplify examples, remove optional "send-receive" on "target" declarations

pull/286/head
Axel Burri 2019-04-24 13:52:12 +02:00
parent cb1c12a6c1
commit f5c7c74108
2 changed files with 23 additions and 29 deletions

View File

@ -123,11 +123,10 @@ Retention policy:
snapshot_dir btrbk_snapshots snapshot_dir btrbk_snapshots
volume /mnt/btr_pool volume /mnt/btr_pool
target /mnt/btr_backup/mylaptop
subvolume rootfs subvolume rootfs
target send-receive /mnt/btr_backup/mylaptop
subvolume home subvolume home
target send-receive /mnt/btr_backup/mylaptop [...]
/etc/cron.daily/btrbk: /etc/cron.daily/btrbk:
@ -164,8 +163,8 @@ this:
volume /mnt/btr_pool volume /mnt/btr_pool
subvolume rootfs subvolume rootfs
target send-receive /mnt/btr_backup/mylaptop target /mnt/btr_backup/mylaptop
target send-receive ssh://myserver.mydomain.com/mnt/btr_backup/mylaptop target ssh://myserver.mydomain.com/mnt/btr_backup/mylaptop
In addition to the backups on your local usb-disk mounted at In addition to the backups on your local usb-disk mounted at
`/mnt/btr_backup/mylaptop`, incremental backups would also be pushed `/mnt/btr_backup/mylaptop`, incremental backups would also be pushed
@ -181,18 +180,14 @@ fileserver, the config would be something like:
ssh_identity /etc/btrbk/ssh/id_rsa ssh_identity /etc/btrbk/ssh/id_rsa
volume ssh://alpha.mydomain.com/mnt/btr_pool volume ssh://alpha.mydomain.com/mnt/btr_pool
target /mnt/btr_backup/alpha
subvolume rootfs subvolume rootfs
target send-receive /mnt/btr_backup/alpha
subvolume home subvolume home
target send-receive /mnt/btr_backup/alpha
volume ssh://beta.mydomain.com/mnt/btr_pool volume ssh://beta.mydomain.com/mnt/btr_pool
target /mnt/btr_backup/beta
subvolume rootfs subvolume rootfs
target send-receive /mnt/btr_backup/beta
subvolume dbdata subvolume dbdata
target send-receive /mnt/btr_backup/beta
This will pull backups from alpha/beta.mydomain.com and locally This will pull backups from alpha/beta.mydomain.com and locally
create: create:
@ -247,7 +242,7 @@ to only fetch the snapshots.
snapshot_preserve_min all snapshot_preserve_min all
snapshot_create no snapshot_create no
target send-receive /mnt/btr_backup/my-laptop.com target /mnt/btr_backup/my-laptop.com
If the server runs btrbk with this config, 10 weeklies and all If the server runs btrbk with this config, 10 weeklies and all
monthlies are received from 192.168.0.42. The source filesystem is monthlies are received from 192.168.0.42. The source filesystem is
@ -263,7 +258,7 @@ host, but distinct port numbers for each machine.
/etc/btrbk/btrbk.conf: /etc/btrbk/btrbk.conf:
# This propagates to all subvolume sections: # This propagates to all subvolume sections:
target send-receive /mnt/btr_backup/ target /mnt/btr_backup/
volume ssh://localhost:2201/mnt/btr_pool volume ssh://localhost:2201/mnt/btr_pool
group vm vm01 group vm vm01

View File

@ -67,7 +67,6 @@ snapshot_dir _btrbk_snap
# Specify SSH private key for "ssh://" volumes / targets: # Specify SSH private key for "ssh://" volumes / targets:
#ssh_identity /etc/btrbk/ssh/id_ed25519 #ssh_identity /etc/btrbk/ssh/id_ed25519
#ssh_user root #ssh_user root
#ssh_port default
#ssh_compression no #ssh_compression no
#ssh_cipher_spec default #ssh_cipher_spec default
@ -94,14 +93,14 @@ snapshot_dir _btrbk_snap
# (usually the mount-point of a btrfs filesystem # (usually the mount-point of a btrfs filesystem
# mounted with subvolid=5 option) # mounted with subvolid=5 option)
# #
# Subvolume section: "subvolume <subvolume-name> # Subvolume section: "subvolume <subvolume-name>"
# #
# <subvolume-name> Subvolume to be backuped, relative to # <subvolume-name> Subvolume to be backuped, relative to
# <volume-directory> in volume section. # <volume-directory> in volume section.
# #
# Target section: "target <type> <volume-directory>" # Target section: "target <type> <volume-directory>"
# #
# <type> Backup type, currently only "send-receive". # <type> (optional) type, defaults to "send-receive".
# <volume-directory> Directory of a btrfs volume (or subvolume) # <volume-directory> Directory of a btrfs volume (or subvolume)
# receiving the backups. # receiving the backups.
# #
@ -130,13 +129,13 @@ volume /mnt/btr_pool
# no action if external disk is not attached # no action if external disk is not attached
snapshot_create ondemand snapshot_create ondemand
subvolume root_gentoo # propagates to all subvolume sections:
target send-receive /mnt/btr_backup/_btrbk target /mnt/btr_backup/_btrbk
subvolume root_gentoo
subvolume kvm subvolume kvm
# use different retention policy for kvm backups # use different retention policy for kvm backups
target_preserve 7d 4w target_preserve 7d 4w
target send-receive /mnt/btr_backup/_btrbk
# Backup to external disk as well as some remote host # Backup to external disk as well as some remote host
@ -144,8 +143,8 @@ volume /mnt/btr_data
subvolume home subvolume home
# always create snapshot, even if targets are unreachable # always create snapshot, even if targets are unreachable
snapshot_create always snapshot_create always
target send-receive /mnt/btr_backup/_btrbk target /mnt/btr_backup/_btrbk
target send-receive ssh://backup.my-remote-host.com/mnt/btr_backup target ssh://backup.my-remote-host.com/mnt/btr_backup
# Backup from remote host, with different naming # Backup from remote host, with different naming
@ -153,14 +152,14 @@ volume ssh://my-remote-host.com/mnt/btr_pool
subvolume data_0 subvolume data_0
snapshot_dir snapshots/btrbk snapshot_dir snapshots/btrbk
snapshot_name data_main snapshot_name data_main
target send-receive /mnt/btr_backup/_btrbk/my-remote-host.com target /mnt/btr_backup/_btrbk/my-remote-host.com
# Resume backups from remote host which runs its own btrbk instance # Resume backups from remote host which runs its own btrbk instance
# creating snapshots for "home" in "/mnt/btr_pool/btrbk_snapshots". # creating snapshots for "home" in "/mnt/btr_pool/btrbk_snapshots".
volume ssh://my-remote-host.com/mnt/btr_pool volume ssh://my-remote-host.com/mnt/btr_pool
subvolume home
snapshot_dir btrbk_snapshots snapshot_dir btrbk_snapshots
snapshot_preserve_min all
snapshot_create no snapshot_create no
target send-receive /mnt/btr_backup/_btrbk/my-remote-host.com snapshot_preserve_min all
subvolume home
target /mnt/btr_backup/_btrbk/my-remote-host.com