Syncronization

Using a desktop pc @ work and my laptop here and there syncronisation of data is always a problem. This is the solutions used here

Ever wondered on which machine you actually have the all important document you need right now? In general chances are high you won’t find it on your machine that 🙁

If this sound familiar it might be prime time for the installation and configuration of a syncronization tool.

What do you need to syncronize?

For me the following I would like to have a concurrent access to the following items:

  • emails
  • calendar
  • files

Emails

Some time ago I migrated to a completely imap based mail setup. So this issue is resolved.

Calendar

Because I use an old-fashioned paper based calendar right now I don’t need to syncronize calendar data. I mighth report back when I do get a new cellphone with advanced calendar functions.

Files

Currently, here I use the Unison File Syncronizer

Installation

Installation is a breeze. Just download the executable file and copy it to /usr/local/bin or somewhere else in your path.

Configuration and Setup

What I did was to create a special backup / syncronisation directory .backupDir. In this directory I symlinked all relevant folders and files. This gives a very flexible setup where you can add files or directories on the fly even if you do have different drive layouts, directory structures or even operating systems on the two machines.

The configuration file ~/.unison/default.prf looks as follows :

      root = <path/to/local/root>    # here /home/mz
      root = <path/to/remote/root>  # here ssh://mz@server//home/mz

      path = .backupDir
      auto = true
      batch = true
      fastcheck = true 
      follow = Path *
      follow = Path .backupDir/*

This configures unison to treat all symlinks in .backupDir transparently and to assume the default action for syncronisation. Further information can be found in the really excellent documentation.

The syncronization process is started with :

      unison -ui text