]> Opensuse 13.2 logrotate timer 🌐:aligrant.com

Opensuse 13.2 logrotate timer

Alastair Grant | Thursday 26 March 2015

I was slightly surprised to notice that my /var/log directory has bloomed in recent months. Clearly logs weren't being rotated. logrotate is a program that will archive, compress and prune old log entries. It's a must if you have logging enabled on your system to avoid unlimited growth.

Traditionally a cron-job was used to run logrotate daily, but it seems in Opensuse 13.2 that this has vanished. Instead it has been replaced by a Systemd timer, which works just as well, but you may not have it enabled by default. In order to do this run:

systemctl enable logrotate.timer
systemctl start logrotate.timer

You may also want to kick off a manual rotation instead of waiting for a day to tick over:

logrotate /etc/logrotate.conf


Breaking from the voyeuristic norms of the Internet, any comments can be made in private by contacting me.