I have a home server running Ubuntu 14.04.3 LTS with an
ext4 file system, to which I regularly backup data from various devices.
Now I have set-up an external USB HDD with
ZFS file system and would like to backup all of the data from the home server onto that USB drive. And since I am using
ZFS on the external drive, I would also want to use
ZFS's snapshot abilities.
Because I would be copying files from
ZFS, I cannot use the
zfs send command. Therefore I am stuck with
I have been using
rsync for a while, so I am quite familiar with it. But, since I will be performing snapshots on the target file system, I want to waste as little space as possible.
I came across this blog post which uses the following command:
/usr/bin/rsync -axH --no-whole-file --inplace --delete / /$backup_target/root/
Aside from the usual flags like
--delete it also uses:
--no-whole-file(force enable delta-xfer algorithm), and
--inplace(update folder instead of making a new backup).
My question: are those flags sufficient or should I add or remove some?
The backup flow will be as follows:
- Backup with rsync to the same directory every time
- Create snapshot of that directory using
zfs snapshot backup@'date +%Y%m%d'
I am guessing that
--inplace is a must (because of backuping to the same directory every time). Same probably goes for
--no-whole-file since it only copies changed block of data. But what about
-H? Any other flags I should add?