Syncing Data between Laptop and Desktop

I frequently flit between using a laptop and a desktop for work (both Ubuntu),

and I use a lot of files on the go. I’ve always just copied the files across from the

laptop when I returned to the office, but it’s not really efficient, as I had to either

a) copy all data – which could be several GB

b) select individual files, of which there were often loads.

I just stumbled across a small application called Unison though, and it’s pretty easy toinstall and configure. Potentially using this method, you could even sync securely over the web, as it uses SSH :)

First install OpenSSH server

$sudo apt-get install openssh-server

Then install unison :

$ sudo apt-get install unison unison-gtk

You then need to modify the profile (you can either set up a new one or modify the default) in ~/.unison

$sudo pico default.prf

Under the profile, you should have the local root path, remote (SSH) root path, and then any paths that you want to include, followed by any paths to exclude:

# Unison preferences file

root = /home/roachy/ root = ssh://roachy@10.204.4.35/ path = work/ path = Music/ ignore = Path work/archive/*

Save the file and either run the GUI version

$unison-gtk

or the command line version

$unison

:)