1

lsyncd sometimes takes more than 15 minutes to sync file from remote server to local server. Latency is fine, probably process to. What could be the further reasons for late syncing ?

My lsyncd config:

settings{
 logfile = "/var/log/lsyncd.log",
 statusFile = "/var/log/lsyncd.stat",
 statusInterval = 2,
}
sync{
 default.rsync,
 source="/home/test/",
 target="server.test.local:/home/test",
 rsync={archive = true, perms = true, owner = true, _extra = {"-a"}, rsh ="/usr/bin/ssh -l root -i /root/.ssh/id_rsa",}
}

Any kind of help is highly appreciated. Thank you :-)

Thomas
  • 4,155
  • 5
  • 21
  • 28
Anand Shrestha
  • 41
  • 4
  • 12

2 Answers2

1

The 'default.rsync' configuration will aggregate events up to delay seconds (default: 15) or maxDelays separate uncollapsible events (i.e. number of changed files, default: 1000), whichever occurs first.

  • To change the synchronization delay, add a delay = N parameter to your sync{} call.
  • To change the number-of-file-changes threshold, add a maxDelays = N parameter to your settings{} call. NB: 'delayis per-sync whilemaxDelays` is global (for all syncs).

lsyncd documentation and variable names are atrocious. delay is semi-documented in the 'default.rsync' section at https://axkibe.github.io/lsyncd/manual/config/layer4/ maxDelays is documented at https://axkibe.github.io/lsyncd/manual/config/file/

0

I meet this problem too, and I want to known the value of delay should be bigger or less? Now,I used 15 seconds with 1000 event

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://serverfault.com/help/whats-reputation) you will be able to [comment on any post](https://serverfault.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/505059) – Dave M Dec 11 '21 at 14:41