Unison

From ArchWiki
Revision as of 10:45, 10 November 2009 by Jelly (Talk | contribs) (Created page with '== Summary == 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 dif…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Summary

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.

Unison works on Windows, Unix ( OSX, Solaris, Linux etc.) systems and you can sync with all platforms, like Windows laptop with Unix server.

Installation

pacman -S unison

This provides the unsison-gtk(2) package.

Configuration

In order to use unison you need to create an profile, you can do this the gui way or by creating an profile in .unison.

If you want to use the gui, run:

unison-gtk2

Else edit the default config file

vi(m) ~/.unison/default.perf

First we define the root of what you want to sync

root = /home/user/

Then we define the root where we sync it too

root = ssh://example.com//path/to/server/storage

Optional you can give arguments to ssh

sshargs = -p 4000

Now we are going to define with dirs and files we want to include in the sync

# dirs
path = Documents
path = Photos
path = Study
# files
path = .bashrc
path = .vimrc

You can also define ignores

ignore = Name temp.*
ignore = Name .*~
ignore = Name *.tmp

For further references check the unison documentation

Usage

When your profile is setup you can start syncing:

unsion <profilename>

Or:

unision-gtk2

And select the profile, unison has a nice interface where you can view the progress and changes.

Other Resources

manual howto