Persistent Logging

Topics about the Software of Revolution Pi
Post Reply
RiSpa
Posts: 4
Joined: 24 Mar 2022, 11:14
Answers: 0

Persistent Logging

Post 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
User avatar
dirk
KUNBUS
Posts: 1948
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Persistent Logging

Post 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
Post Reply