Unison (file synchronizer)
Encyclopedia
Unison is a file synchronization
program. It is used for synchronizing files between two directories, either on one computer, or between a computer and another storage device (e.g. another computer, or a removable disc).
It runs on Unix-like
operating systems (including Linux
, Mac OS X
, and Solaris), as well as on Windows
.
File synchronization tools such as Unison are similar to version control tools (git
, CVS, Subversion, etc.), distributed filesystems (Coda
, Lustre
, etc.), and mirroring
utilities (rsync
, etc.), in that all these attempt to keep sets of files synchronized. However file synchronization tools can deal with modifications to both versions of the directory structure, without the overhead of version control.
Support for Unison is provided by third parties for specific operating systems.
The latest stable version, as of April 2011, is 2.40.61. It is available as source code and precompiled binaries for Linux, Win32 and Mac OS X.
The original developers began focusing on a project called 'Harmony', which they considered a natural progression from Unison, to synchronize any hierarchical structure expressed in XML. However, Harmony has been abandoned, and the developers are now focusing on the Boomerang
project which creates 'lenses' for transforming string data.
File synchronization
File synchronization in computing is the process of ensuring that computer files in two or more locations are updated via certain rules....
program. It is used for synchronizing files between two directories, either on one computer, or between a computer and another storage device (e.g. another computer, or a removable disc).
It runs on Unix-like
Unix-like
A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
operating systems (including Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
, Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
, and Solaris), as well as on Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
.
Details
Unison allows the same version of files to be maintained on multiple computing devices. In other words, when two devices are synchronized, the user can be sure that the most current version of a file is available on both devices, regardless of where it was last modified.- It runs on many operating systems, and can synchronize files across platforms, so that for instance a Windows laptop may be synchronized with a Unix server.
- It detects 'conflicts' where a file has been modified on both sources, and displays these to the user
- It communicates over the TCP/IP protocol so that any two machines with an internet connection can be synchronized. This also means that the data transferred can be secured by tunneling over an encrypted SSHSecure ShellSecure Shell is a network protocol for secure data communication, remote shell services or command execution and other secure network services between two networked computers that it connects via a secure channel over an insecure network: a server and a client...
connection. - It uses the rsyncRsyncrsync is a software application and network protocol for Unix-like and Windows systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar...
algorithm developed by Andrew TridgellAndrew TridgellAndrew "Tridge" Tridgell is an Australian computer programmer best known as the author of and contributor to the Samba file server, and co-inventor of the rsync algorithm....
. This algorithm transfers only the parts of a file that have changed, and so is faster than copying the whole file. - It is designed to be robust in the event of a program or system crash or a communication failure.
- It is open-source.
- It is written in the Objective CamlObjective CamlOCaml , originally known as Objective Caml, is the main implementation of the Caml programming language, created by Xavier Leroy, Jérôme Vouillon, Damien Doligez, Didier Rémy and others in 1996...
language.
File synchronization tools such as Unison are similar to version control tools (git
Git (software)
Git is a distributed revision control system with an emphasis on speed. Git was initially designed and developed by Linus Torvalds for Linux kernel development. Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on...
, CVS, Subversion, etc.), distributed filesystems (Coda
Coda (file system)
Coda is a distributed file system developed as a research project at Carnegie Mellon University since 1987 under the direction of Mahadev Satyanarayanan. It descended directly from an older version of AFS and offers many similar features. The InterMezzo file system was inspired by Coda...
, Lustre
Lustre (file system)
Lustre is a massively parallel distributed file system, generally used for large scale cluster computing. The name Lustre is a portmanteau word derived from Linux and cluster...
, etc.), and mirroring
Mirror (computing)
In computing, a mirror is an exact copy of a data set. On the Internet, a mirror site is an exact copy of another Internet site.Mirror sites are most commonly used to provide multiple sources of the same information, and are of particular value as a way of providing reliable access to large downloads...
utilities (rsync
Rsync
rsync is a software application and network protocol for Unix-like and Windows systems which synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate. An important feature of rsync not found in most similar...
, etc.), in that all these attempt to keep sets of files synchronized. However file synchronization tools can deal with modifications to both versions of the directory structure, without the overhead of version control.
Development status
Unison is no longer under active development. However as the original developers still use Unison, they occasionally release bug fixes, small improvements, and contribute patches.Support for Unison is provided by third parties for specific operating systems.
The latest stable version, as of April 2011, is 2.40.61. It is available as source code and precompiled binaries for Linux, Win32 and Mac OS X.
The original developers began focusing on a project called 'Harmony', which they considered a natural progression from Unison, to synchronize any hierarchical structure expressed in XML. However, Harmony has been abandoned, and the developers are now focusing on the Boomerang
Boomerang (programming language)
Boomerang is a programming language for writing lenses—well-behaved bidirectional transformations —that operate on ad-hoc, textual data formats.Boomerang grew out of the Harmony generic data synchronizer. It was used in open product Unison.-References:...
project which creates 'lenses' for transforming string data.
Known problem
- Unison may fail if the metadata about the files and folders to be replicated is larger than 16MB. This is normally only a problem for initial replications, when Unison transfers metadata about every single file and folder. On subsequent transfers, Unison only sends metadata about file and folder changes, which is normally relatively small.
External links
Advice on using Unison
- File synchronization
- Using Unison, by Philip Guo
- Setting up Unison for your mom (simplified setup guide), by Philip Guo
- All about Unison on one page - a page covering Unison, starting with theory and ending with many practical examples about its usage.