In this tutorial we will show you how to install and configuration Unison on Ubuntu 16.04 LTS server. For those of you who didn’t know, Unison is an cross-platform, open-source file synchronization software that permits the users to store the copies of files and folders on two different hosts. When two files are merged with each other, the difference gets copied from one replica to another.
This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Unison on a Ubuntu 16.04 (Xenial Xerus) server.
- Unlike simple mirroring or backup utilities, Unison can deal with updates to both replicas of a distributed directory structure. Updates that do not conflict are propagated automatically. Conflicting updates are detected and displayed.
- Unlike a distributed filesystem, Unison is a user-level program: there is no need to modify the kernel or to have superuser privileges on either host.
- Unison works between any pair of machines connected to the internet, communicating over either a direct socket link or tunneling over an encrypted ssh connection. It is careful with network bandwidth, and runs well over slow links such as PPP connections. Transfers of small updates to large files are optimized using a compression protocol similar to rsync.
- Unison is resilient to failure. It is careful to leave the replicas and its own private structures in a sensible state at all times, even in case of abnormal termination or communication failures.
- Unison has a clear and precise specification.
Install Unison on Ubuntu 16.04 LTS
Step 1. First make sure that all your system packages are up-to-date by running these following apt-get commands in the terminal.
sudo apt-get update sudo apt-get upgrade
Step 2. Installing Unison.
Add the PPA repository to your system, update the local repository index and install the unison package:
sudo add-apt-repository ppa:eugenesan/ppa sudo apt-get update
After updating the apt sources-list, run the following command to install the package:
sudo apt-get install unison
Once it is done, use the following command to view the Basic and Advanced options:
firstname.lastname@example.org:~# unison -help Usage: unison [options] or unison root1 root2 [options] or unison profilename [options] Basic options: -auto automatically accept default (nonconflicting) actions -batch batch mode: ask no questions at all -doc xxx show documentation ('-doc topics' lists topics) -fat use appropriate options for FAT filesystems -group synchronize group attributes -ignore xxx add a pattern to the ignore list -ignorenot xxx add a pattern to the ignorenot list . . watch when set, use a file watcher process to detect changes (default true) -xferbycopying optimize transfers using local copies (default true)
Check the version of Unison:
Congratulation’s! You have successfully installed Unison. Thanks for using this tutorial for installing Unison on Ubuntu 16.04 LTS (Xenial Xerus) system. For additional help or useful information, we recommend you to check the official Unison web site.