About
From the [http://www.cis.upenn.edu/~bcpierce/unison/ Unison website]: Unison is a file-synchronization tool for 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.
Installation
Unison can be found in Ubuntu's Universe software repository, in the unison package. See InstallingSoftware for information about installing software, and ["Repositories"] if you need help enabling Universe.
In order to use Unison with Ubuntu and Microsoft Windows, you will need to have Samba installed and setup. For instructions on setting up Samba in Ubuntu, visit the SettingUpSamba wiki page.
Post Installation / Configuration
Unison uses Profiles, this refers to the two directories (root1 and root2) that are to be synchronized. On starting the Unison via the menus you will be presented with a window that allows you to select an existing profile or create a new one.
On selecting Create New Profile you will be asked to enter a Profile name, such as "USB Stick". Once named the Profile can be select.
As the profile is new Unison will guide you though the steps of setting the directories (roots) * Enter the Profile name, such as "USB Stick" *
Example usage
The following is a simple example to syncronize a music directory between two PC's.
- On the PC with Unison installed, connect the music drive from the remote PC.
- Then enter the following command:
# unison /location_of_local_directory /location_of_samba_directory
Depending on the size of the directories and the amount of files, a good amount of time may be needed.
Unison can be setup to run on a schedule. This can be done by utilizing the "cron" scheduler. Further information regarding cron can be found at the CronHowto wiki page.