Maintenance Task: Log Rotation Verification¶
Description¶
Ensure system logs are being rotated properly to prevent uncontrolled disk usage.
Frequency¶
Weekly or as part of monthly server checkup.
Checklist¶
- Is
logrotateinstalled and active? - Are system and app logs rotating as expected?
- Are old logs compressed or deleted?
Verification Steps¶
- Test logrotate configuration:
logrotate --debug /etc/logrotate.conf - Check status of rotated logs:
ls -lh /var/log/*.gz - Review systemd journal size (if using
journald):journalctl --disk-usage
Preventive Actions¶
- Configure
logrotatefor custom apps - Use compression and date-based rotations
- Vacuum
journaldlogs:journalctl --vacuum-time=7d
Tools & Commands¶
logrotate,journalctl,ls,du, cron or systemd timers