From the documentation I know that I can configure
- the time after which journal files are deleted via
MaxRetentionSec
. - the time after which journal files are rotated via
MaxFileSec
.
However my goal is to configure journald in a way such that all journal entries are stored within one file for a time span of one year. Older entries should be discarded.
My current workaround is that I have
MaxRetentionSec=1year
MaxFileSec=1month
This has, however, two major disadvantages.
- The journal is rotated after every month such that accessing older entries is a hassle.
- Journald will discard a whole month every time the year expires instead of just, let's say, one day.
Is it possible to configure the journal to behave as described in the goal?