Unison

Jump to: navigation, search
Unison is a synchronization tool that is very similar to rysnc. In fact, it uses the rsync algorithm, so it works just as efficiently. The advantage that unison has is that it is designed for two way synchronization of data. This is very useful for synchronizing content between load balanced servers or for synchronizing files between personal computers. Unison provides a GUI-based interface or can be executed via the command terminal. Unison is available from the default openSUSE repositories.

Usage

Usage is similar to rsync. By default, it will prompt for confirmation of any changes to be made.

Note: if unison is launched in a terminal emulator (e.g. konsole, GNOME Terminal, etc.), to have unison running straight in text mode the commando should be launched with the -ui text option (not needed if running in a real console).

Local (e.g. from home directory to flash drive)

$ unison /home/user /media/X

Remote (e.g. between servers)

$ unison /localdir ssh://user@host//remotedir

It is important to note that the same version of unison should be used on both machines when synchronizing remotely.


Common Options

  • auto - Do not prompt for confirmation of each change
  • batch - Do not prompt before committing changes
  • prefer - If there are any file conflicts, prefer the listed directory instead of asking
  • version - Prints the version number of the unison binary
  • testServer - Tests a remote connection without actually making any changes

A complete list of options can be found in the unison documentation at http://www.cis.upenn.edu/~bcpierce/unison/, or locally in /usr/share/doc/packages/unison/unison-manual.html.


Screenshots

Unison showing up possible actions for a subsequent synchronization