On September 9th I updated my home server running on a Pi2 from Stretch to Buster, except some minor things everything went ok.
Today I noticed that the daily log rotation time has changed from 06:25 to 00:00.
Digging more deeply I found that logrotate is now launched by systemd.
So there is a systemd logrotate.timer launching logrotate.service everyday at 00:00.
Code: Select all
root@NewBox:/ # systemctl status logrotate.service ● logrotate.service - Rotate log files Loaded: loaded (/lib/systemd/system/logrotate.service; static; vendor preset: enabled) Active: inactive (dead) since Mon 2019-10-07 00:00:03 CEST; 16h ago Docs: man:logrotate(8) man:logrotate.conf(5) Process: 13978 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=0/SUCCESS) Main PID: 13978 (code=exited, status=0/SUCCESS) Oct 07 00:00:01 NewBox systemd: Starting Rotate log files... Oct 07 00:00:03 NewBox logrotate: error: Compressing program wrote following message to stder Oct 07 00:00:03 NewBox logrotate: gzip: stdin: file size changed while zipping Oct 07 00:00:03 NewBox systemd: logrotate.service: Succeeded. Oct 07 00:00:03 NewBox systemd: Started Rotate log files. root@NewBox:/ # systemctl status logrotate.timer ● logrotate.timer - Daily rotation of log files Loaded: loaded (/lib/systemd/system/logrotate.timer; enabled; vendor preset: enabled) Active: active (waiting) since Tue 2019-09-10 17:36:03 CEST; 3 weeks 5 days ago Trigger: Tue 2019-10-08 00:00:00 CEST; 7h left Docs: man:logrotate(8) man:logrotate.conf(5)
Before logrotate was launched by cron, /etc/cron.daily/logrotate
There is now a comment in this script saying “skip in favour of systemd timer”
This isn’t a big issue but it’s not well documented and in this case why have changed the time?
Also the logrotate man page still says it’s launched by cron.
I log some sensors values, mainly temperatures, in /var/log/mysensors and use logrotate to rotate the logs. I create graphs from the logs. I now have some weird graphs because supposed to start at 06:25 and actually start at 00:00.
Again this is a minor issue and can easily change it but I’m just surprised: why have changed the log rotation time?
I believe it’s more Debian related than Raspbian but anyway I didn’t found many comment about this on the web.