Site icon New Generation Enterprise Linux

Stop journald from holding your logs hostage until a reboot

Logging & Journald

Stop journald from holding your logs hostage until a reboot

đź§© The Challenge

You ever tried to debug an issue that happened three days ago, only to realize the logs for that time frame just vanished into thin air? It turns out systemd defaults to keeping a tiny, volatile log buffer that disappears the second you cycle the power.

đź’ˇ The Fix

Just point the logs to persistent storage and give them a reasonable size limit so they actually stick around through reboots. You’ll stop flying blind whenever a server decides to bounce unexpectedly.

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

⚙️ Why It Works

Creating that directory manually signals to systemd that it needs to move away from volatile /run storage and start writing to the actual disk. Once the service restarts, it picks up the new path and begins spooling those logs where they won’t get wiped on the next reboot.

🚀 Pro-Tip: Check journalctl –disk-usage to make sure you aren’t about to blow up your root partition with a decade of logs.

Linux Tips & Tricks | © ngelinux.com | 10/7/2026

0 0 votes
Article Rating
Exit mobile version