Page 1 of 1

Persistent Logging

Posted: 20 Mar 2024, 11:30
by RiSpa
Hello,


On my RevPi, I want to enable persistent logging by systemd and journald.
Hardware: RevolutionPi Core SE
Image: 2023-09-26-revpi-bullseye-armhf

Attempt 1:
Change the appropriate configuration.

Code: Select all

Storage=persistent
in /etc/systemd/journald.conf

Code: Select all

systemctl restart systemd-journald

This creates /var/log/journal (for group 'root') but logs do not persist after reboot.

Code: Select all

systemd-tmpfiles --create --prefix /var/log/journal

This changes the group to 'systemd-journal' but logs do not persist after reboot.

Code: Select all

systemctl restart systemd-journald


Attempt 2:
Create persistent logging directory manually without changing configuration.

Code: Select all

mkdir -p /var/log/journal

Code: Select all

systemctl restart systemd-journald

This creates /var/log/journal for group 'root' but logs do not persist after reboot.

Code: Select all

systemd-tmpfiles --create --prefix /var/log/journal

Code: Select all

systemctl restart systemd-journald

This changes the group to 'systemd-journal' but logs do not persist after reboot.
Also, /var/log/journal is removed after reboot.

How do I succesfully make the systemd logs persistent across system reboots?


Kind regards,
rispa

Re: Persistent Logging

Posted: 05 Apr 2024, 10:48
by dirk
Hello rispa, with the current bullseye I can work with

Code: Select all

journalctl
and see that the journal entries are retained for several days:
journalctl
journalctl
So please check if your system is up-to-date. You can use the steps from here:
Revolution Pi Checklist