Reputation: 11
I have used Lsyncd before, but it just works for one-way sync, so only the Master can copy files to the Slave server. I have found another solution for two-way sync between Master and Slave with Unison, but Unison doesn't watch for changes in real-time like Lsyncd does.
Is it possible to combine the functionality of Lsyncd and Unison? What I want is for Lsyncd to watch for changes, then notify Unison to do the syncing.
Upvotes: 1
Views: 1714
Reputation: 1534
But Unison CAN watch for file changes in real-time. Just add the line
repeat = watch
to your Unison profile. Unison will detect changes with its own (external) file-watcher utility unison-fsmonitor that communicates directly with Unison. For some more information, check out the changelog for unison 2.48.3 with major changes to unison-fsmonitor.
But if you really want something to watch for changes and then tell Unison to run, you should look at inotify-tools, although I don't recommend doing that.
Upvotes: 3