Unison File Synchronizer
github.com
github.com
Unison is easy and consumes 0 resources in the background. It won't drain your battery scanning your folders for changes because there's more files and folders than you can get notified for by your OS.
`unison -auto` on the command line is all you need to get a convenient list of changed files and whether you want to sync them.
I have all my systems set up to sync with a low power mini PC that runs some other services.
Hasn't ever failed and deals with lots of small files and big files and everything in between without hickups or surprises.
Here is command summary: http://borg.uu3.net/~borg/?dot
I'd also recommend setting up some ignore rules for build artifacts, etc, which definitely increases complexity but avoids constantly syncing build artifacts you don't care about or with erroneous symlinks etc. IDK at that point I figured rsync was easier, as it's a more commonly used tool for other purposes, and I'd rather learn fewer things with huge functional overlap if given the choice.
I used Unison at Amazon, and it was the most seamless of all the options I tried. The two way sync was especially useful for being able to open up test results in a browser locally
Wasn't very difficult to setup, on Linux at least.
That said I was definitely in the minority, but eh
This ends up being a hassle unless you are using exactly the same OS on both sides, since you need to either have the right version in ports/apt/pacman/whatever or manage the Unison builds yourself.
https://github.com/bcpierce00/unison/releases
But I have seen problems when one version was far ahead of the other
> Unison 2.53.3 (ocaml 4.12.1): Contacting server...
> Unison 2.51.5 (ocaml 4.14.0): Contacting server...
restic is specialised for backups and offers uni-directional backup and uni-directional restore from backup.
unison implements bi-directional sync.
if you don't want bi-directional sync and don't want specialised backup support, rsync will get the job done.
if you want bi-directional sync (unifying changes made on both sides), that's something that neither rsync nor restic can handle.
tangentially, re: using restic for offsite backups, one storage provider that pairs quite nicely with restic is rsync.net -- they have a lower-rate pricing offer specifically for use with restic (by default rsync.net filesystems have ZFS snapshots available, they disable ZFS snapshots for these "restic accounts" -- the restic application is then responsible for managing backup snapshots, not the filesystem).
Nowadays I use syncthing, which works quietly in the background and is really good at what I need. New pictures on my phone get synced to the laptop and backup server, while new pdfs on the laptop get synced with the phone and pinenote.
Syncthing has no practical limit in terms of number of replicas as far as I am aware. It does not support replicas on the same host though I believe.
It seems like this must already exist but I don't know how to find it.
I used unison regularly for a few years around a decade ago to do bidirectional sync between a linux VM filesystem and a host windows filesystem, for a weird dev workflow where i would pig-headedly use linux tools to develop an application that would be built and shipped to windows.
I never had any trouble with unison, it was great.
That said, for that particular niche use case these days maybe I'd use WSL to get a similar job done -- or just do all development in Windows if that's the platform we were shipping to.