Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I care only about the same file stored in two different machines. I would like to keep changes in sync and as fast as possible. Would rsync as a daemon be up to it? Or is there something else I can use.

share|improve this question

migrated from Mar 23 '13 at 3:11

This question came from our site for professional and enthusiast programmers.

Unidirectional or bidirectional sync? – cdhowie Mar 22 '13 at 21:20
@cdhowie: bi-directional. I would rather not have one side pushing and polling changes due to speed considerations. – Micy Bart Mar 22 '13 at 21:22
@MicyBart I mean will the file only ever change on one side, or do both sides need to sync changes to the opposite server? (Is one side a read-only copy?) – cdhowie Mar 22 '13 at 21:22
@cdhowie: Ahh. The file will change on both sides. – Micy Bart Mar 22 '13 at 21:23
@MicyBart: what if files were changed on both sides at exact same time (to nanosecond)? In general, this problem does NOT have simple solution. – mvp Mar 23 '13 at 5:33

You can use unison ( with the --batch option. This will make a bidirectional sync over ssh or ftp.

share|improve this answer

You should check out lsyncd here :

This is a daemon which keeps monitoring particular folders, and as soon as something changes in one of the folders, it spawns rsync for synchronization. It is pretty cool and robust. I've been using it without fail.


In case the files reside over network on 2 different systems, syncthing would be a better option.

share|improve this answer

You must log in to answer this question.