diff --git a/README.md b/README.md index 5d2f653..23e35db 100644 --- a/README.md +++ b/README.md @@ -123,11 +123,10 @@ Retention policy: snapshot_dir btrbk_snapshots volume /mnt/btr_pool + target /mnt/btr_backup/mylaptop subvolume rootfs - target send-receive /mnt/btr_backup/mylaptop - subvolume home - target send-receive /mnt/btr_backup/mylaptop + [...] /etc/cron.daily/btrbk: @@ -164,8 +163,8 @@ this: volume /mnt/btr_pool subvolume rootfs - target send-receive /mnt/btr_backup/mylaptop - target send-receive ssh://myserver.mydomain.com/mnt/btr_backup/mylaptop + target /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 `/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 volume ssh://alpha.mydomain.com/mnt/btr_pool + target /mnt/btr_backup/alpha subvolume rootfs - target send-receive /mnt/btr_backup/alpha - subvolume home - target send-receive /mnt/btr_backup/alpha volume ssh://beta.mydomain.com/mnt/btr_pool + target /mnt/btr_backup/beta subvolume rootfs - target send-receive /mnt/btr_backup/beta - subvolume dbdata - target send-receive /mnt/btr_backup/beta This will pull backups from alpha/beta.mydomain.com and locally create: @@ -247,7 +242,7 @@ to only fetch the snapshots. snapshot_preserve_min all 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 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: # This propagates to all subvolume sections: - target send-receive /mnt/btr_backup/ + target /mnt/btr_backup/ volume ssh://localhost:2201/mnt/btr_pool group vm vm01 diff --git a/btrbk.conf.example b/btrbk.conf.example index 6b2a42f..94e336c 100644 --- a/btrbk.conf.example +++ b/btrbk.conf.example @@ -67,7 +67,6 @@ snapshot_dir _btrbk_snap # Specify SSH private key for "ssh://" volumes / targets: #ssh_identity /etc/btrbk/ssh/id_ed25519 #ssh_user root -#ssh_port default #ssh_compression no #ssh_cipher_spec default @@ -94,14 +93,14 @@ snapshot_dir _btrbk_snap # (usually the mount-point of a btrfs filesystem # mounted with subvolid=5 option) # -# Subvolume section: "subvolume +# Subvolume section: "subvolume " # # Subvolume to be backuped, relative to # in volume section. # # Target section: "target " # -# Backup type, currently only "send-receive". +# (optional) type, defaults to "send-receive". # Directory of a btrfs volume (or subvolume) # receiving the backups. # @@ -130,13 +129,13 @@ 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 + # propagates to all subvolume sections: + target /mnt/btr_backup/_btrbk + subvolume root_gentoo subvolume kvm # use different retention policy for kvm backups - target_preserve 7d 4w - target send-receive /mnt/btr_backup/_btrbk + target_preserve 7d 4w # Backup to external disk as well as some remote host @@ -144,23 +143,23 @@ 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 + target /mnt/btr_backup/_btrbk + target 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 + snapshot_dir snapshots/btrbk + snapshot_name data_main + target /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 + snapshot_dir btrbk_snapshots + snapshot_create no + snapshot_preserve_min all subvolume home - snapshot_dir btrbk_snapshots - snapshot_preserve_min all - snapshot_create no - target send-receive /mnt/btr_backup/_btrbk/my-remote-host.com + target /mnt/btr_backup/_btrbk/my-remote-host.com