ZFS Relication Solutions

Can everyone share their scripts/solutions or how they do backups using zfs replication? And why the solution was chosen?

I’ll start. I use a modified version of a script called zfs-replicate, found at GitHub - tschettervictor/xync: POSIX compliant shell script to manage ZFS snapshot replication locally, or between hosts. Created with XigmaNAS in mind.

I use this because I need a single script that can be loaded in an appliance like zVault or XigmaNAS, then run via cron.

I would use sanoid/syncoid if I would run stock BSD. Probably…

I use zrepl, and have been very happy with it although I need to implement one of the requested features (transport tcp: allow client to specify its `client_identity` to enable dynamic IPs · Issue #832 · zrepl/zrepl · GitHub).

I have a script that gets the last snapshot of the source dataset and using the last snapshot of the destination (changes to bookmark on source, as I do not delete these on the dataset) runs the ZFS send / recv command. To retain all daily snapshots, I cycle through them one-by-one, otherwise I would be stuck with hourly and every 15 mins. Looks cleaner on backup destination. Then the script creates bookmarks for next time. If anyone interested I could share, but you’d be better of using sanoid / syncoid.

I have been using ZFS send for a year or so and very happy with it. Restores and tests have worked great, and I have peace of mind knowing that each block’s checksum is checked after sending to ensure no blocks have become damaged.

Nothing fancy.