I am using journalctl for logging, it appears to be only keeping logs for 1 hour, how can I force it to keep 30 days of logs?
Asked
Active
Viewed 2,498 times
1 Answers
3
Double check your journald.conf file. Probably you are not using defaults values for SystemMaxUse or MaxFileSec. If you want 30 days of logs, use MaxFileSec=30day. Then restart the journal with systemctl restart systemd-journald
Also check how much space you are using for logs at the moment with journalctl --disk-usage and how much free space you have in your disk df -lh. Perhaps if you have little free space, that is triggering a vacuuming operation.
Iyán
- 78
- 5