Date Tags Linux

I have a laptop, a workstation, and a server at home that I use daily. I also have a collection of code, documents, and music that are useful to have locally on all three -- especially the laptop when traveling. For a while I would just copy files over the network (NFS and CIFS), or use the server but this has gotten tedious as the amount of data has grown. So I went looking for a syncing app.

I had two requirements:

  • It must not run as a service - I don't want yet another program loading at boot time or hogging RAM. Transfers should use NFS. Preferable since I am already running it and for speed.
  • It must be initiated from the client side - I don't want to SSH into computer X to push or pull an update


Unison has received a lot of hype. It certainly shows a lot of potential. Amongst notable features, it supports bi-directional syncing. You can have changes in the local and remote directories and interactively merge them. It also has a GUI for simplifying this and handling collisions. During my test, performance was terrible and it crashed during the merge. I read somewhere in the FAQ that using Unison with NFS isn't ideal. It prefers to use SSH or a socket, which goes against one of my requirements. In short, this is a program to watch and it may be suitable for smaller file sets -- but it simply did not work well here. The final strike is that it is no longer a research project and only lightly maintained.


rsync is a very powerful program. Its method of file transfer minimizes I/O and is fast. It is essentially unidirectional, so it lacks the power that Unison has in this regard. For my use case, this won't be a problem since updates happen on one system at a time and are usually pushed to the server. Gentoo users will be all to familiar with rsync when updating portage with 'emerge --sync'.

Using rsync is simple. 'rsync -av SOURCE DESTINATION' will be suitable for most jobs. A quick view of the man page will give a rundown on the options. Using a hub and spoke topology, I can sync all three in any direction: laptop <--> server <--> workstation.

I'm not sure why I waited so long to do this. It is incredibly efficient and easy and I recommend a similar setup if you have two or more computers. It nicely complements a version control system for things that don't need to be tracked over time.


comments powered by Disqus