How to install Unison

Unison is a file-synchronization tool for OSX, Unix, and Windows. It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.

The main difference between Unison and Rsync is

  • Unison is bidirectional
  • Rsync goes in one direction only

Install Unison both local and remote

Using apt-get

$ sudo add-apt-repository ppa:eugenesan/ppa
$ sudo apt-get update
$ sudo apt-get install unison

Optional, to remove unison, do:

$ sudo apt-get remove unison

Using curl

$ curl -L -o unison
$ curl -L -o unison-fsmonitor

Common errors and solutions

Fatal error: Server: No file monitoring helper program found

$ curl -L -o unison-fsmonitor

Fatal error: Server: Filesystem watcher error: cannot add a watcher: system limit reached

If you see this error, It means you have a lot of files to sync so tell your system how many files you have

$ echo 524288 > /proc/sys/fs/inotify/max_user_watches