Unison

Unison Download Binary to Dreamhost
Although the original instructions allow you to build unison from scratch, it's a bit of a faff. Thankfully, there is no need.

Create a local bin folder
mkdir ~/bin export PATH=~/bin:$PATH
 * Log in using SSH
 * Add  to your path in

Download the binary from the Debian Packages archive

 * Download the  file from Debian Packages
 * Search for unison
 * Download the version for the latest stable version of Debian (Lenny as at 2009-04)

Unpack the binary
$ ar vx unison_....deb x - debian-binary x - control.tar.gz x - data.tar.gz
 * Unpack the  file (on Windows, the IZArc tool will do this) on dreamhost, the   command will do this like so:
 * Look for  and unpack that, then unpack the   it contains
 * Drill down to  and extract the   file that is >0 bytes

Transfer to Dreamhost
chmod +x ~/bin/unison-* ln unison- unison
 * Transfer the  file to   on Dreamhost using SCP or similar
 * Change the permissions to allow it to run
 * Rename to  or
 * to make it easier to run (just press the tab key where it says )


 * Test that it works and enjoy 2-way, rdiff based syncronisation!

Unison Compile on Dreamhost
These instructions install ocaml and unison in your home directory in $HOME/sw/bin

Compiling Objective Caml
wget http://caml.inria.fr/pub/distrib/ocaml-3.12/ocaml-3.12.0.tar.gz tar xzvf ocaml-3.12.0.tar.gz  cd ocaml-3.12.0 chmod -R 0777 * ./configure -prefix $HOME/sw && make world && make bootstrap && make opt && make install
 * Check for the latest caml-version at http://caml.inria.fr/ and adjust the version-number

Add the directory to your path
I use bash so i edited my ~/.bash_profile to have the path include ~/sw/bin example: PATH=~/sw/bin:$PATH export PATH

Getting the updated path
you can either source ~/.bash_profile or just logout and log back in.

Get and compile Unison
wget http://www.seas.upenn.edu/~bcpierce/unison//download/releases/stable/unison-2.40.63.tar.gz tar xzvf unison-2.40.63.tar.gz  cd unison-2.40.63
 * Check for the latest Unison-version and adjust the version-number

INSTALLDIR = $(HOME)/sw/bin/
 * edit the Makefile on line 71 I changed the install directory to also be ~/sw/bin by making the line read:

make make install
 * Install Unison

There you have it unison is now installed in $(HOME)/sw/bin at this point delete the tarballs and the temporary directories that you compiled ocaml and unison in.

Using Unison
To synchronize a directory locally with a directory on your server here is a sample command.

~/ $unison ~/somefilesLocally ssh://YOURDOMAIN.com//home/USERNAME/somefilesRemotely -batch -servercmd ~/sw/bin/unison -times -terse

An issue you may find is that unison expects the unison command on the remote (Dreamhost) end to be in /usr/bin, if you've followed the instructions at the top, it will be in ~/bin. To fix that, add the parameter -servercmd ~/bin/unison

Another issue might be that your local version of unison is different to the servers version, they really need to be at a similar revision level. For example 2.27.43 and 2.27.57 would probably be OK but 2.26.99 and 2.27.57 would not.