Readit News logoReadit News
lizknope · 2 years ago
I've been using Unison for over 15 years. I have my main desktop and 3 laptops. It has a simple GUI that shows which direction the file update will happen and lets me decide any conflicts if the same file has been modified in both places.
sspiff · 2 years ago
Same. I tried a bunch of alternatives over the years. Dropbox, Syncthing,...

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.

stavros · 2 years ago
I, too, thought that Unison Cloud was somehow a backend for this.
Tade0 · 2 years ago
I thought it was something related to the Unison language:

https://www.unison-lang.org/

bradhe · 2 years ago
Came here to say this!
geerlingguy · 2 years ago
Heh, when both are in the top 5 spots on HN, it's funny that they're completely unrelated.
Borg3 · 2 years ago
Unison was one of the top tools to check for me. Unfortunately, its written in weird egghead language called Ocaml. It also support replicas, while I needed more p2p and VFS like aproach. So I wrote my simple DVFS repo manager in C instead. Very happy with the outcome. Maybe one day I will be brave enough to share it with the world ;)

Here is command summary: http://borg.uu3.net/~borg/?dot

hughesjj · 2 years ago
Unison was huge while I was at Amazon, but I always preferred rsync for the control (sshfs too but you had to ensure to set some flags for when you de-docked or changed wifi ap). One of the biggest gripes I had with it is thankfully fixed though (used to need same client and server version, nowadays they permit some drift assuming no breaking contractual changes).

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.

vamega · 2 years ago
Did you rsync in a loop? Or on demand?

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

frfl · 2 years ago
You can write a script that uses the OS's native file watching system and triggers rsync. That's an approach I used and eventually everyone else on my team, not Amazon, also ended up using.

Wasn't very difficult to setup, on Linux at least.

hughesjj · 2 years ago
On demand, which for me was a big reason to use rsync over unison. I preferred the control.

That said I was definitely in the minority, but eh

bdcravens · 2 years ago
Performance has improved to the point where I no longer use it, but I know Unison was a critical part of docker-sync (at one point, file performance for Docker on Mac was absolutely terrible without it)
jesuslop · 2 years ago
For what I tried is like rclone bisync but without cloud awareness. Useful in a LAN context and with all maturity one can ask for. Rare it hasn't got more good rap.
aidenn0 · 2 years ago
I haven't used Unison in a while, so maybe this isn't true anymore, but what always ended being the hangup for me was that both sides needed to use exactly the same version of Unison (IIRC at least down to the minor version number).

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.

lizknope · 2 years ago
If you look at the release notes you can see that some versions say they are protocol compatible with prior X.Y version release

https://github.com/bcpierce00/unison/releases

But I have seen problems when one version was far ahead of the other

mcguire · 2 years ago
This was the reason I've mostly stopped using it. Still the best file sync tool I have seen.
jxy · 2 years ago
It's been relaxed a bit. I have a few end points and currently they are on two different versions.

> Unison 2.53.3 (ocaml 4.12.1): Contacting server...

> Unison 2.51.5 (ocaml 4.14.0): Contacting server...

Filligree · 2 years ago
You might like Restic as an alternative. It's a bit higher performance, and there's no server component needed.
shoo · 2 years ago
i've used both restic and unison, they're both good tools but they're focused on different jobs, they're not really comparable.

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).

https://www.rsync.net/products/restic.html

perryh2 · 2 years ago
I notice the same issue with rsync between different systems.
exe34 · 2 years ago
Used this over ten years ago, for a few months. Absolutely loved it, but it was a pain to get the right version installed on different devices, and I think I once lost some data with it due to my own mistake.

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.