Syncronize your files

One of the major hurdels in all systems and now more than often is the ability to keep a set of files either synchronized over multiple computers. The way to do this depends on what you need it to do. If you have a home network with a central file server and don't need any external access to them, it's the simplest case. You create a folder on your server, connect to it using either samba or nfs and just start to edit the files in place. So no matter which computer you logon to, you have instant access to your files.

Lets go beyond simple and look at a scenario that I have, and probably more than me have to deal with. I have two main computers (one stationary and one laptop). These are mine. I also have one work computer and more than often I use both thin clients in laboratories and for presentations. With this array of computers where I only can administer two of them fully and the others are on separate networks inaccessible to each other, how do I always have a fully operating document tree with the latest files? The answer is simple: external hard drive. Store everything on that drive and you are set. Then what is the reason for this article? Well. Storing everything on a external drive that you carry with you without any backup, is quite insane. Say you loose it, then what do you do? All work and personal files are gone. Here is where file synchronization come in. Using tools to have multiple trees in multiple places.

Through this tutorial we will create the following:

  • A single external backup just for safe keeping
  • A synchronization between your internal drive and an external drive

So where do we start?

First, we take a bit of a survey of what software do exists for this purpose. Most automatic backup systems that exists are in the enterprise scale(company not star ship), and cost a boat load of money and require a large infrastructure. This is far beyond our current needs. So lets have a look at some cheaper alternatives. There exists quite a bundle of shareware programs for windows that do automatic file synchronization, but for my part at least I need something that can work on multiple operating systems. Plus shareware is far from a stable source of software.

Now before we get any further let's define what the goal is. We want to synchronize files from two different sources so that they match, nothing more. The goal is not to have a revision system or in case there is a difference between the files how to merge them. The newest file will always have priority. That's it.

The contenders.

Not all synchronization programs do a very good job. Some barely make it out of beta status, but the few ones that do make it all the way are usually good. So here is the list of evaluated synchronization programs.

  1. JFileSync
  2. FreeFileSync
  3. DirSync Pro
  4. Synkron

All these program exist and can be run in both Windows, OSX and Linux(and other unicies), which is one of the most important part. It might not seem like a big thing, but the possibility to work in a mixed environment usually brings a functionality and user interface that is more aimed at getting things done that keeping you happy and generally bloated. So among these, which to choose

Java on the chopping block

JFileSync and DirSync Pro are build in Java, which is may look good on paper and would be very good if all your files and folders would be in pure US ASCII format and in the ISO format(iso-8859-1). Well. That's a rather big assumption these days. If you only use all your programs and files under these preferences these are rather good. The main advantage is that they don't need to be compiled or installed. All they need is a local java VM, and almost all operating systems have java installed today. Of these two JFileSync is the more mature and functional(although a bit old), as DirSync Pro has a tendency to forget the different setups and defined. This fact that the programs them self don't handle different encodings barely well makes them the first ones to gets eliminated. These programs fail purely on bad programming as Java has no problem managing different locales and encodings, you just have to actually use them.

Only one survives

Soo... Of the two who are left, only Synkron makes the cut. FreeFileSync is working properly and do handle different locales and encodings quite well, but it's not close to complete. The good thing is that it is actively developed and release a new minor version every other month or so. Synkron isn't updated that often, but feels like it has a more mature code base. It was a tight race between them, but the main option that gave Synkron my blessing is that it is available from the debian archives.

In short Synkron is a easy, simple program that does it's job quite nicely. It has a intuitive interface and simple view of all your synchronization pairs, with the option for filters, scheduling, blacklisting files and so on. If you are looking for a synchronization tool on a non windows platform, I would start by evaluating this one.

Honorable mention

I do have one honorable mention and that is Microsoft SyncToy. Now before you get your panties in a twist, it is freeware that is available under the Microsoft banner of PowerToys. These are some very handy toys like SyncToy, Virtual Desktop Manager and Tweak UI. If you are using windows, have a look on the PowerToys page and you might find something that is useful. The ones mentioned I use on a daily basis, and I'm very glad they do exist.