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) ormaxDelays
separate uncollapsible events (i.e. number of changed files, default: 1000), whichever occurs first.delay = N
parameter to yoursync{}
call.maxDelays = N
parameter to yoursettings{}
call. NB: 'delayis per-sync while
maxDelays` 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/