0

I'm using lsync for incremental backup. After 6 month it generated about 6GB log file in /var/log/lsyncd/lsyncd.log.

I decide to change log level to reduce log generation. there is an option '-log' in lsync man file and there is a config file in 'nano /etc/lsyncd.lua'.

I want know how set '-log' option in 'lsyncd.lua' file to disable or change log level?

Mohammad Ali Akbari
  • 1,763
  • 5
  • 20
  • 24

1 Answers1

2

I'm not that familiar with lsyncd, but judging from the man file -log scarce should be added to the start-up script /etc/init.d/lsyncd

daemon $lsyncd -log scarce -pidfile $pidfile $config

I would also recommend adding /var/log/lsyncd/lsyncd.log to logrotate.

Create /etc/logrotate.d/lsyncd with following:

/var/log/lsyncd/*log {
missingok
notifempty
sharedscripts
postrotate

/sbin/service lsyncd restart > /dev/null 2>/dev/null || true

endscript
}
Deeh
  • 581
  • 3
  • 9