From 708444b096c12c5e071c17e05fda92f12facdeec Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Wed, 17 Aug 2016 14:49:27 +0200 Subject: [PATCH] btrbk-mail, README.md: suggest using "rsync --inplace" When used without --inplace, rsync creates a new copy of the file and moves it into place when it is complete, having the effect that btrfs creates a new extent for the WHOLE file. With --inplace however, rsync writes the updated data directly to the destination file, having the effect that btrfs creates a new extent only for the differing part of the file. --- README.md | 2 +- contrib/cron/btrbk-mail | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b20af17..28c3ede 100644 --- a/README.md +++ b/README.md @@ -299,7 +299,7 @@ First create a btrfs subvolume on the backup server: In your daily cron script, prior to running btrbk, sync your source to `myhost_sync`, something like: - rsync -a --delete -e ssh myhost.mydomain.com://data/ /mnt/btr_backup/myhost_sync/ + rsync -a --inplace --delete -e ssh myhost.mydomain.com:/data/ /mnt/btr_backup/myhost_sync/ Then run btrbk, with myhost_sync configured *without any targets* as follows: diff --git a/contrib/cron/btrbk-mail b/contrib/cron/btrbk-mail index 60c940d..52f4852 100755 --- a/contrib/cron/btrbk-mail +++ b/contrib/cron/btrbk-mail @@ -32,7 +32,7 @@ rsync_src[example_data]=user@example.com:/data/ rsync_dst[example_data]=/mnt/backup/example.com/data/ rsync_log[example_data]=/mnt/backup/example.com/data-${now}.log rsync_key[example_data]=/mnt/backup/ssh_keys/id_rsa -rsync_opt[example_data]="-az --delete" +rsync_opt[example_data]="-az --inplace --delete" # Enabled rsync declarations (space separated list) #rsync_enable="example_data"