Emre He
Emre He

Reputation: 507

how to configure the interval of lsyncd monitoring files changes?

as you know, lsyncd can watching local file changes and trigger rsync to sync files chanages to remote server. my question is how to configure the interval of lsyncd monitoring files changes?
I have not found any paramters in lsyncd.conf, any clue will be appreciated.

thanks,
Emre

Upvotes: 6

Views: 8111

Answers (1)

bfloriang
bfloriang

Reputation: 536

I think it's not possible to configure the interval that lsyncd monitors file changes as lsyncd rather is event based, so the local directory tree is monitored through the event monitor interface (inotify or fsevents) which means in a sense it is always watching.

What you can influence is the time lsyncd aggregates changes before it spawns a rsync call (by default this is 15 seconds) by providing the delay parameter.

sync{default.rsync, source="dir", target="dir", delay=25}

Setting it to 0 will cause it to sync as early as possible.

Upvotes: 9

Related Questions