Lsyncd taking time to sync files

lsyncdmirroringreplication

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 🙂

Best Answer

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/

Related Topic