I want to synchronize my personal document repository between my different computers in my home. Today this folder is under a dedicated partition of the hard drive of a dual boot workstation.

My configuration is the following one:

  1. Dual boot Workstation running Ubuntu 11 and windows Xp (the documents are simply shared using the dedicated partition)
  2. Laptop running Ubuntu 12.04 (Today no access to the documents)
  3. A freebox with an external hard drive pluged to it

What I want is to be able to synchronize this document folder also with the laptop and in addition to have a "backup" of this on the hard drive attached to the freebox.

What tools should I use for this (rsync, unison, others?)

  • Should the backup encompass also deleted files? I.e. you want to be able to recover files that you deleted? Commented Jul 17, 2012 at 18:01
  • @danielkullmann No Commented Jul 17, 2012 at 21:06

3 Answers 3


If you're always synchronizing in the same direction, use rsync. If you're synchronizing in both directions, use unison. Unison supports both Linux and windows; the documentation explains how to set it up under Windows (you'll need an SSH client as well).

To synchronize between more than two locations, choose one as the master and synchronize every other location with the master. Here, set up both the workstation and the laptop to synchronize with the Freebox.

You'll need to have a unison binary on the Freebox. Since it runs Linux and has an x86 processor, if it doesn't have unison already, you can copy the binary from any 32-bit Linux installation.

  • Thanks for the answer. I am not accessing the Freebox over ssh but using Samba (I think) and as a consequence I have my Freebox hard drive mounted on /media. Thus I don't need to install unison on the freebox because I am running it from the Workstation or laptop as if it is operating on 2 local folders. Is it true ? Commented Jul 18, 2012 at 7:23
  • @ManuelSelva Right, if you're using Samba, you'll be using Unison locally on the workstation and on the laptop (with files that happen to be stored not on a local disk but on another machine). Commented Jul 18, 2012 at 7:31
  • Perfect ! I'll start with this solution, it should feet my needs. Commented Jul 18, 2012 at 7:33
  • I confirm that this solution is PERFECT !! Thanks. only little troubles with Linux symbolic links ;-) Commented Aug 10, 2012 at 7:48

I don't think rsync fits your bill, because it won't automatically handle updates to the same document in multiple locations. The same is true for file deletions. You can do this manually, but this is bound to become problematic at some point.

I have never used unison, but it seems to be the right tool for your use case.

That said, I'd also like to mention distributed version control systems like Mercurial, Git, Bazaar, etc. They have the additional benefit that you don't lose old versions of your documents. They are, however, best suited for dealing with text files; binaries like LibreOffice documents and such will require more work when the same document is changed on several machines.

Update: If you want to have a real backup on the third machine, you should consider using a separate backup solution, because that will keep old files. rsync can do that as well (if you omit the --delete option), but this will again be problematic at some point: old files will fill up your document folders, and new files that have the same name as old, deleted files will overwrite them.

A simple backup system like dejadup, duplicity, rsnapshot, or rdiff-backup could be used for that.

  • I'll never (or rarely) modified a given file in several different place. The use case is adding a file on a given PC and getting every where. Commented Jul 17, 2012 at 17:45
  • @ManuelSelva - based on that description, you really want a configuration management solution such as puppet or cfengine.
    – jordanm
    Commented Jul 17, 2012 at 17:57
  • 1
    @ManuelSelva unison looks like the right tool for you, then. Commented Jul 17, 2012 at 18:00
  • @jordanm How would that work? You should put that into an answer. Commented Jul 17, 2012 at 18:02
  • @danielkullmann I am trying unison. I'll just have to run it quite often on each of my computer in the following way unison local/documents freebox/documents Commented Jul 17, 2012 at 21:04

I use rsync over ssh. For backups you can do this trick:


Basically, I have rsync set up with ssh keys and cron jobs. The link above covers most (or all) of that.

I also use duplicity for backups, but I hesitate to recommend it. It works, but it's unwieldy.

  • Rsync is a good tool for backups.
    – Tim
    Commented Jul 17, 2012 at 20:34
  • Yes but what I want is to rsync from my workstation to the freebox AND rsync from my laptop to the freebox. I can add simulmtaneously 2 files from each computer and as a result I want all the computers AND the freebox having the 2 files. rsync is not the right tool for that, isn't it ? Commented Jul 17, 2012 at 20:50
  • If the files never conflict between the two sources, then rsync will work just fine. If there are conflicts between the workstation and the laptop, what do you want it to do? In that case, you need a versioning system (eg git) more than rsync or similar.
    – pileofrogs
    Commented Aug 2, 2012 at 23:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .