Replaced my Syncthing replicating my backups with Unison over VPN 1000x less CPU...
AutumnOut Boy @feld@friedcheese.us
Replaced my Syncthing replicating my backups with Unison over VPN
1000x less CPU and memory usage, actually transfers files faster (idk why, but Syncthing would randomly try to use relays instead)
"Why not just use ZFS snapshots and something like Zelta?"
I already have the data replicated, and to switch this to ZFS snapshots I'd have to wipe and start over on the other end.
I don't want to replicate a couple terabytes from scratch. Also it's not fun if you do something silly and you fall out of sync to the point where there are no common snapshot ancestors. Then you have to start over again.
"Why not just rsync?"
Unison uses the rsync protocol, can also be configured to be one-way instead of bidirectional, and has built-in support for watching for filesystem changes and replicating automatically. It also has good enough log output that I can trigger alerts based on that.
Also on FreeBSD we don't have lsyncd (though actually... we might soon because we have inotify natively in FreeBSD so Linux software doesn't have to be rewritten to use kqueue)
Additionally, each rsync execution requires a full check of the paths to see what changed. Unison has a database (kinda like Syncthing) which it uses to compare against last known state very quickly. This speeds up syncs a lot.
I think lsyncd will be targeted when it executes the sync and not have to walk the tree, but it has zero ability to do periodic full syncs in case it missed a filesystem event -- like if it was not running for a period of time and changes happened. Unison handles all of that automagically.
Really starting to love Unison even though its configuration can be confusing at first which is why most people probably don't bother trying to use it.
1000x less CPU and memory usage, actually transfers files faster (idk why, but Syncthing would randomly try to use relays instead)
"Why not just use ZFS snapshots and something like Zelta?"
I already have the data replicated, and to switch this to ZFS snapshots I'd have to wipe and start over on the other end.
I don't want to replicate a couple terabytes from scratch. Also it's not fun if you do something silly and you fall out of sync to the point where there are no common snapshot ancestors. Then you have to start over again.
"Why not just rsync?"
Unison uses the rsync protocol, can also be configured to be one-way instead of bidirectional, and has built-in support for watching for filesystem changes and replicating automatically. It also has good enough log output that I can trigger alerts based on that.
Also on FreeBSD we don't have lsyncd (though actually... we might soon because we have inotify natively in FreeBSD so Linux software doesn't have to be rewritten to use kqueue)
Additionally, each rsync execution requires a full check of the paths to see what changed. Unison has a database (kinda like Syncthing) which it uses to compare against last known state very quickly. This speeds up syncs a lot.
I think lsyncd will be targeted when it executes the sync and not have to walk the tree, but it has zero ability to do periodic full syncs in case it missed a filesystem event -- like if it was not running for a period of time and changes happened. Unison handles all of that automagically.
Really starting to love Unison even though its configuration can be confusing at first which is why most people probably don't bother trying to use it.