1

我以前用过Lsyncd,但它只适用于单向同步,所以只有Master可以将文件复制到Slave服务器。我找到了另一种使用 Unison 在 Master 和 Slave 之间进行双向同步的解决方案,但 Unison 不像 Lsyncd 那样实时观察变化。

是否可以结合 Lsyncd 和 Unison 的功能?我想要的是让 Lsyncd 观察变化,然后通知 Unison 进行同步。

4

1 回答 1

2

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.

于 2017-03-04T01:54:08.480 回答