How to Enable Persistent Logging for the Systemd Journal
in Linux
Applies to:
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
Goal
This document outlines the steps required to enable persistent logging for the systemd journal.
The systemd journal is configured by default to store logs only in a small ring-buffer in /run/log/journal
, which is not persistent.
Journal database logs do not survive a system reboot.
Solution
There are a number of ways to enable persistent systemd journal logs, this method is based on creating the /var/log/journal
directory.
1) Create the directory journal using the below command:
$ sudo mkdir -p /var/log/journal
Once the above directory is created the system will automatically start storing the logs at
Tagged:
0