Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Initially Ubuntu One looked perfect but it only seems to be able to sync folders in my home directory. I want a way to sync any folder of my choosing on one system with any folder on another system.

share|improve this question
    
Any reason why a network file system (like NFS) wouldn't be a good choice for your environment? Avoids the synchronization complexity in exchange for "Always has to be on the network") –  voretaq7 Aug 25 '12 at 3:07
    
I don't think an NFS is what I'm looking for because my understanding is that NFS lets you mount a remote volume, not sync two folders. I want to have two copies of the data - one local, the other remote. Rather like Dropbox. –  Nigel Alderton Sep 9 '12 at 11:27

1 Answer 1

You can use a utility called unison to do this. Unison is basically a 2-way rsync.
For basic usage, the command is pretty simple:

unison /path/to/local/directory/. ssh://remote-server/path/to/remote/directory/.

(note the dots on the end, these are deliberate, and are used in case the directory names aren't the same on both systems)

However it might be good idea to consult the documentation as there are a lot of important arguments to consider, like how to handle when a file has been updated on both systems since the last sync (which one should be kept).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.