Skip to main content
2 of 3
added 30 characters in body
balki
  • 4.7k
  • 6
  • 32
  • 47

How to keep systemd journal for one year?

By default my system had about ~500MB max size which had about 1 month of logs.

System Journal (/var/log/journal/dd35c7606a5645c5acc9908470c45159) is 483.2M, max 491.5M, 8.2M free.

No idea how the 491.5M limit was decided. I changed the below setting and restarted the system

└──> grep SystemMaxUse /etc/systemd/journald.conf
SystemMaxUse=25G

Now the max journal size is 1.0G. Why is it not 25G?

System Journal (/var/log/journal/dd35c7606a5645c5acc9908470c45159) is 568.6M, max 1.0G, 455.3M free.

I do have enough free space (94%) in the disk

└──> df -h /var/log/journal
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       885G   50G  791G   6% /var

How to increase max journal size even further?

If possible, I would like to keep the default limit for 1 month but instead of deleting old journal files, save it some where where in can be queried on demand.

balki
  • 4.7k
  • 6
  • 32
  • 47