lsyncd - some extra pointers.

home | blog | Terrible people and places | Covid-19 links | Teh Internet | guest blog |rants | placeholder | political | projects | Gwen and Liam | Citadel patched | Tools | Scouts

If you are using lsyncd to keep a hot copy of some directories:
/proc/sys/fs/inotify/max_user_watches >= The number of files (and guesstimated future file count)

Log rotate (if you are not using init scripts):
modify your log file name and binary location and inotify max files tuning.
Kill seems harsh, but lsyncd only understands kill and hup currently. If you do a TERM, it logs an error to the log file.
If you do a HUP (with the version I am running, it just silently dies off).
Only Hup and Kill

/var/log/lsyncd {
        rotate 5
        create 640 root adm
                /usr/bin/killall -s KILL lsyncd
                /bin/echo  1000000 > /proc/sys/fs/inotify/max_user_watches

To force the logrotate in future:
logrotate -f /etc/logrotate.d/lsyncd.conf

Consider using:
su user group

if you are running and writing logs as non root user.
assuming that is where you put it for a daily run.