352 Inc. / Digital Marketing / October 20th, 2007

File Synchronization

As a web developer and administrator I have come to rely on a tool, Unison.  It’s perhaps the most innocent looking school project out there, but it is extremely useful and free.  In their own words:

“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.”

One of the best features of Unison is its support for the SSH protocol.  This can be used to launch files to nearly any location and platform.  The actual merging of two replicas is remarkably fast.  It uses timestamps and file sizes along with a database of previous changes to ‘guess’ the right directions to push changes.  You simply confirm/change the direction and it will perform the mechanics of the synchronization. 

Natively it’s a unix application without a user interface, however there are some implementations on top of the code to run it in a GTK environment.  If you want to host the SSH service on your windows environment I would recommend a cygwin instance with a SSH Damien bound to a windows service. 

Aside from using Unison to manage large scale web applications across various platforms, it works out amazingly well for laptop to desktop synchronization.  Because typically only one user is making changes to the documents on either computer, unison is able to very accurate know the direction of the changes and makes synchronization practically hands off. 

http://www.cis.upenn.edu/~bcpierce/unison/

http://www.cygwin.com/

http://pigtail.net/LRP/printsrv/cygwin-sshd.html