Why use Replication instead of Syncthing for backup?

I drew a comparison chart so my question is more clear, I don’t understand the advantage of using Replication. Thanks!

Mod note: Removed external image link

You should have posted as a text or table so we can quote items.

Basically the answer is that you do not understand replication, snapshots and clones and you’re wrong on almost all items of the table. Replication is a lot faster and more efficient than rsync or Syncthings, and proceeds at whatever speed the network provides, locally or remotely.
Turning a backup into the new primary takes one click as adminsitrator to remove the read-only attribute on the replication target. Can’t be faster than this! There’s no need to clone, and even if you do it this way, creating and promoting a clone of a read-only dataset takes no space at all (save for a negligeable amount of metadata); only subsequent changes will require additional storage space.

2 Likes

Thank you for the correction on needing to clone, I was told by a redditor that’s the case.

Syncthing does have some distinct benefits, though. Among the bigger ones for me are:

  • Multi-way sync–I can change a file on any system that shares that directory, and the change is propagated to all of them.
  • Doesn’t need ZFS–while ZFS is available on most non-Windows OSs, Syncthing doesn’t need it and can work with any filesystem.
  • It handles its own network connection, NAT traversal, etc., while TLS-encrypting all data in transit
    • and while I don’t use this feature, you can sync data that would be encrypted on the remote system and not available to users of that system.

OTOH, a few major points in ZFS replication’s favor:

  • As already noted, it’s much faster
  • Because it operates on snapshots, it preserves them–your target system has a defined set of snapshots (i.e., history), not just the last state of the source system
  • It preserves ZFS attributes, which Syncthing is unable to do.

For some further reading on snapshots:

3 Likes

Thank you. The link you have provided is also very helpful. I will continue to read more into it.

The performance is not comparable.

Once replication knows what snapshot the receiver has, it can stream the snapshot delta at full speed without any backwards-forwards chit-chat between sender and receiver.

Syncthing by comparison operates at a file level and it needs to check the filename / size / dates (and possibly a hash) for each file at each end - and this leads to a lot of chit-chat between sender and receiver.

Syncthing (or Rsync) is going to be much slower as a consequence.

You don’t need to keep the full set of snapshots at the receiver either - just the most recent one (or as many more as you wish).

I know Rsync suffers from this, due to the nature of comparing entire directory trees on both ends.

But doesn’t Syncthing operate as “transfer on demand”? It does not compare the directory trees, but rather will transfer to one end or the other when a new file is added or modified or deleted?

E.g, If the user drops a 4-MiB photo named “hiking.jpg” into the Syncthing directory, then only that 4-MiB file will be transferred to the other clients. There is no need to compare directory trees. (I assume there is a daemon that runs in the background which “keeps track” of changes since the last “sync up” between two clients.)

But isn’t Syncthing is block-based?

https://docs.syncthing.net/users/syncing.html

It creates its own “blocks” from the file itself. This is similar to how Rsync does “verification” when it reaches the destination. The difference is that Rsync does not keep a history of these blocks and checksums.

These “blocks” have nothing to do with ZFS or the underlying filesystem for that matter.

So the easiest answer is both work. ZFS replication is AWESOME for disaster recover, easy transfer from one server to another, very fast due to copying blocks instead of files (especially if you are like me and have 1mm files)

I use ZFS to my backup server, Nextcloud for files I want to be shared to all my devices (but syncthing works here, I just dont want a 3rd party app for iOS which is required for syncthing on iPad/iPhone). I also use rsync to move important files to an old synology I have laying around, because, you can’t have too many backups. :smiley: