From 1f06ea747b5939a1083c436dd7dae97b37bedee7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 4 Apr 2023 14:19:51 +0900 Subject: sd-journal: allow to specify compression algorithm through env Fixes RHBZ#2183546 (https://bugzilla.redhat.com/show_bug.cgi?id=2183546). Previously, journal file is always compressed with the default algorithm set at compile time. So, if a newer algorithm is used, journal files cannot be read by older version of journalctl that does not support the algorithm. Co-authored-by: Colin Walters --- docs/ENVIRONMENT.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/ENVIRONMENT.md') diff --git a/docs/ENVIRONMENT.md b/docs/ENVIRONMENT.md index 3ec5573ff9..a77992d2be 100644 --- a/docs/ENVIRONMENT.md +++ b/docs/ENVIRONMENT.md @@ -513,6 +513,14 @@ SYSTEMD_HOME_DEBUG_SUFFIX=foo \ journal. Note that journal files in compact mode are limited to 4G to allow use of 32-bit offsets. Enabled by default. +* `$SYSTEMD_JOURNAL_COMPRESS` – Takes a boolean, or one of the compression + algorithms "XZ", "LZ4", and "ZSTD". If enabled, the default compression + algorithm set at compile time will be used when opening a new journal file. + If disabled, the journal file compression will be disabled. Note that the + compression mode of existing journal files are not changed. To make the + specified algorithm takes an effect immediately, you need to explicitly run + `journalctl --rotate`. + `systemd-pcrphase`, `systemd-cryptsetup`: * `$SYSTEMD_FORCE_MEASURE=1` — If set, force measuring of resources (which are -- cgit v1.2.1