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
We need your assistance to stay live
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 |
- Wow! Linux Foundation To Offer Free Linux Course This Summer Worth $2,400 on EdX : Wow! Early last week it was all over the internet, if you haven't heard it yet then this is the t...0 comments |
- Grive: An Unofficial, Open Source Linux Client For Google Drive : A couple of months before, we have featured a Linux client for Google Drive named Syncdrive, which w...0 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 |
- How To "Fix E: Could not open file /var/lib/dpkg/status" : QUESTION: I get the following error when I use sudo apt-get update: E: Could not open file /var/...0 comments |
- Install LAMP Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 13.10 : Updated January 12, 2014 LAMP is a combination of operating system and open-source software stack. ...0 comments |
- Install Sublime Text 3 In Fedora Easily With Fedy
- Grive: An Unofficial, Open Source Linux Client For Google Drive
- Install nSnake Game In Terminal
- How To “Fix E: Could not open file /var/lib/dpkg/status”
- Wow! Linux Foundation To Offer Free Linux Course This Summer Worth $2,400 on EdX
- Fedora 21 Scheduled For Release In October
- Install Uget Download Manager In Ubuntu, Fedora, Debian
- Download Elementary OS ‘Luna’ Official Wallpapers
- Install Power Commands 0.1.5 On Ubuntu 14.04/13.10/12.10/12.04
- 5 Android Apps that’s Going to Make Running Your Business Less Stressful
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .