Search code examples
rsysloglogrotate

Rsyslog writing to old file after logrotate


My rsyslog logrotate config file is -

/home/user/logs/*.l {

   daily
   postrotate
     reload rsyslog >/dev/null 2>&1 || true
   endscript


}

The file is rotating properly but the logs are going into the old log file. The issue gets resolved when I manually restart rsyslog.

I'm running this on CentOS.


Solution

  • In the end it was resolved with compress daily instead of rotate. For some reason, it wasn't working on CentOS6.4