Ubuntu – How to sync files/data between two PCs on a home network

10.10sync

I have a desktop and a laptop with almost the same files within their home directory. Sometimes I make changes in ~/Music, ~/Documents, etc. But these changes of course don't affect the other machine.

So I want to have a solution to sync all the data in the home folders of my laptop and desktop. I can connect them with cross cable once in a while.

I don't want to use Ubuntu One or Dropbox (the files are big, and there's no need to use the Internet when both are on a home network).

Best Answer

For a small set of files I'd suggest Dropbox or Ubuntu One, but it seems like you want to sync your music collection between computers, and neither of these are particularly suitable for that for two reasons:

  • They both synchronise to the internet, meaning that large collections of files will take a long time to down- and upload
  • They offer a limited amount of space (with the ability to purchase more), meaning that for a large collection of files you may end up having to fork out a lot of money

Unison, which is what I use for local replication, has neither of these limitations (inherently). You can sync over your local network, meaning that it's fast (you can also sync over the internet if you wish), and can sync as much as you want — only limited by your available disc space and bandwidth. Unison has both a GUI and a terminal interface, meaning that you can use it on your desktop and server equally. There is a good guide on the Ubuntu wiki that you may wish to refer to if you choose to use Unison.