Synchronize Files with Unison on Ubuntu/Debian
Unison is a free, cross platform file synchronization tool that enables us to keep two set of file replicas (instances) on two different systems or on different disks of the same system. Unlike simple mirroring or backup utilities, it updates both replicas of a distributed directory structure. It detects and displays the conflicting updates. Unlike a distributed filesystem, Unison is a user-level program; there is no need to modify the kernel or to have root user 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.
In this how-to i am using two systems running with Ubuntu. The local system is running with Ubuntu Desktop and its ip address is 192.168.1.100/24 and remote one is running with Ubuntu Server and its ip address is 192.168.1.201/24. And i am going to synchronize the directory /home/sk/Unixmen between two systems. Change the values as per your scenario.
On Local & Remote Server System:
Update and Upgrade the both systems with following commands.
sudo apt-get update sudo apt-get upgrade
Install Unison on both systems.
sudo apt-get install unison unison-gtk
Now on your local system, launch the Unison GUI tool from Menu or Dash. It should look like below.
Here you will be prompted for Synchronization method. I want to synchronize the files between my local desktop to remote server using SSH. So here i choose Using SSH from the Synchronization Kind drop-down box. Enter the remote host server ip address and user name as below and click Forward.
Now we have to mention the local and remote folders to be replicated. Enter the local folder path in the Local Directory (i.e in my case its /home/sk/Unixmen) box and Enter remote folder path in the Remote Directory box. Click Forward.
Now check for the files in your remote system. They certainly should be there. If you added a new file or directory click Rescan, after that click Go to start the sync.
sk@server1:~$ ls /home/sk/Unixmen/ New1 New2 New3
Thats it. Enjoy. Here what you have just read is a basic concept of Unison. You can do lot of things using Unison. I suggest you read the official documentation for more information.
Like us on Facebook
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- Configure Your Browser To Use Tor On Ubuntu/Debian/Linux Mint : Tor, The Onion Router, is a network of Virtual Tunnels that allows users to communicate securely and...2 comments |
- Setup A Full Featured ITIL Management System Using Integria IMS On CentOS 6 : Integria IMS is a fully featured ITIL management system, featuring a ticketing system, inventory/C...4 comments |
- How To Upgrade From Ubuntu 13.04 Raring To Ubuntu 13.10 Saucy Salamander : Ubuntu 13.10 Saucy will be released on October 17th. Hope it will come with lot of improvements and ...0 comments |
- Install lamp with 1 command in Ubuntu 12.10, 13.04 Raring Ringtail & LinuxMint13 : Updated: 10/09/2012 :LAMP (Linux, Apache, MySQL and PHP) is an open source Web development platform ...0 comments |
- OpenLDAP Installation and Configuration in Ubuntu 12.10/13.04/13.10 And Debian 6/7 : OpenLDAP is a free open source Light Weight Directory Access protocol developed by the OpenLDAP proj...0 comments |
- OpenLDAP Installation and Configuration in Ubuntu 12.10/13.04/13.10 And Debian 6/7
- Configure Your Browser To Use Tor On Ubuntu/Debian/Linux Mint
- Setup A Full Featured ITIL Management System Using Integria IMS On CentOS 6
- Install LibreOffice 4.1.3 in Elementary OS ‘Luna’
- How To Install Simple Scan in Crunchbang ‘Waldorf’
- Selene Media Encoder: Convert Audio, Video Files To Most Popular Formats
- Linux Kernel 3.12.2 Is Available For Download! Install / Upgrade Instructions
- CentOS 6.5 Has Been Officially Released!
- Format Junkie: Convert Media Files To All Popular Formats
- Setup Squid Proxy Server On openSUSE 13.1
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .