Skip to main content
Topic: Logrotate not working? (Read 447 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Logrotate not working?

OK, I noticed on my two Artix servers (shell-only, used for BTRFS-protected shares for Windows PCs) that the logs were not being zipped and rotated. I have months of logs on one. I installed system/logrotate, but cannot figure out how to add it to the default runlevel with rc-update. What am I missing here?
-The Great Sephiroth

Re: Logrotate not working?

Reply #1
You need to have a crond(8 ) service installed, enabled and running. Without systemd service, logrotate uses crond to work.

You could deduce this from doing
Code: [Select]
pacman -Ql logrotate

One implementation of crond is cronie. As with all services, you will need cronie and cronie-<your_init> packages installed.

Re: Logrotate not working?

Reply #2
Code: [Select]
# root crontab
# DO NOT EDIT THIS FILE MANUALLY! USE crontab -e INSTEAD

# man 1 crontab for acceptable formats:
#    <minute> <hour> <day> <month> <dow> <tags and command>
#    <@freq> <tags and command>

# SYSTEM DAILY/WEEKLY/... FOLDERS
@hourly ID=sys-hourly   /usr/sbin/run-parts /etc/cron.hourly
@daily ID=sys-daily    /usr/sbin/run-parts /etc/cron.daily
@weekly ID=sys-weekly    /usr/sbin/run-parts /etc/cron.daily
@weekly ID=sys-weekly   /usr/sbin/run-parts /etc/cron.weekly
@monthly ID=sys-monthly  /usr/sbin/run-parts /etc/cron.monthly