Site icon New Generation Enterprise Linux

Stop journald from losing your log history after every reboot

Logging & Journald

Stop journald from losing your log history after every reboot

🧩 The Challenge

Everyone thinks journal logs are persistent by default, but half the time they just vanish the second the server cycles power. I spent an entire morning looking for a boot-time crash dump only to find an empty directory because the logs were only writing to volatile memory.

💡 The Fix

You need to manually tell journald to stop being lazy and actually commit those logs to the disk. It’s a simple config change that turns your ephemeral logs into a reliable audit trail.

mkdir -p /var/log/journal && systemd-tmpfiles --create --prefix /var/log/journal && systemctl restart systemd-journald

⚙️ Why It Works

Creating that directory signals to systemd that it has a permanent home for the binary log files instead of just dumping everything into a tmpfs buffer that gets nuked on shutdown. Since journald checks for the existence of that path to determine persistence, this forces its hand.

🚀 Pro-Tip: Check /etc/systemd/journald.conf and set Storage=persistent if the directory creation alone doesn’t stick for your specific distro.

Linux Tips & Tricks | © ngelinux.com | 8/31/2026

0 0 votes
Article Rating
Exit mobile version