2

As a recent adopter of ZFS (via Ubuntu) I am now looking for good off-site backup solutions and came across this article on the subject (7 years old!).

For many years I have been using rsync to back up file systems over the 'net to avoid redundant copies and avoiding copying multi-terabytes daily over WAN links. I use rsync for either WAN or local USB storage.

Being able to use ZFS snapshots as a backup source is a big improvement, but I am wondering if rsync is still the way to avoid copying the full file system over to the target with every backup. At first I thought the ZFS send/receive feature might do the trick but a quick reading shows this is not the case.

Is there a widely adopted "best practice" for this for ZFS or should I just stick with rsync?

AlanObject
  • 662
  • 2
  • 9
  • 20
  • Think this kind of depends upon how often your data gets modified / cycled out and replaced. – kilrainebc Dec 05 '17 at 16:41
  • 1
    How about using software that support incremental backups? I use [Borg Backup](https://borgbackup.readthedocs.io/en/stable/) on my Linux server, it does deduplicated, rotated, block level incremental backups, but there are many choices. – Tim Dec 05 '17 at 18:39

3 Answers3

3

Send/Receive is sort of rsync on steroids, because there is no scanning for changed files involved. ZFS just knows which blocks to send. You create a snapshot of your zfs fileset, and then send the snapshot over to your backup server. If you have to successive snapshots, and the first one is already on the backup server, you can simply send the difference to the backup server. This all happens at block-level, so it is super efficient.

You could do it by hand, using the zfs and ssh commands, but my favorite tool for organizing this is znapzend.

http://znapzend.org

It will take care of creating AND deleting the snapshots and it has an elaborate mechanism where you can configure how long you want to keep your backups.

Tobi Oetiker
  • 1,842
  • 13
  • 12
2

If you have a ZFS target, I definitely suggest using a solution that can leverage the built-in ZFS transport features..

The best solution for me is Syncoid/Sanoid, since it can automate snapshot creation and data transfers.

See: https://github.com/jimsalterjrs/sanoid

ewwhite
  • 197,159
  • 92
  • 443
  • 809
1

I would agree with the previous two answers that suggest using ZFS send/receive.

After looking at both Syncoid/Sanoid and znapzend we now use a combination of zfsnap for snapshot creation/deletion and zxfer for send/receive.

The choice was qualitative. zfsnap/zxfer were easier to get working (in our environment anyway) and followed the Unix philosophy better i.e. tools do one thing, and are silent unless they have useful output.

hillsy
  • 231
  • 2
  • 4