From 9638832f824a4002eda075c48d14c9e7e548ccd4 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Sun, 18 Aug 2024 19:35:23 -0400 Subject: [PATCH] switch back to MaxRetentionSec now that it's fixed The fix for this causing excessive log rotation was backported to systemd 256.5. --- systemd/journald.conf | 2 +- systemd/system/systemd-journald-vacuum.service | 9 --------- systemd/system/systemd-journald-vacuum.timer | 8 -------- 3 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 systemd/system/systemd-journald-vacuum.service delete mode 100644 systemd/system/systemd-journald-vacuum.timer diff --git a/systemd/journald.conf b/systemd/journald.conf index 62f2cc8..6a5e393 100644 --- a/systemd/journald.conf +++ b/systemd/journald.conf @@ -32,7 +32,7 @@ SystemMaxFiles=10000 #RuntimeKeepFree= #RuntimeMaxFileSize= #RuntimeMaxFiles=100 -#MaxRetentionSec=0 +MaxRetentionSec={{journald_max_retention_sec}} MaxFileSec=1day #ForwardToSyslog=no #ForwardToKMsg=no diff --git a/systemd/system/systemd-journald-vacuum.service b/systemd/system/systemd-journald-vacuum.service deleted file mode 100644 index ce32e38..0000000 --- a/systemd/system/systemd-journald-vacuum.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Vacuum journald logs -After=systemd-journald.service - -[Service] -Type=oneshot -User=root -Group=root -ExecStart=/usr/bin/journalctl --vacuum-time={{journald_max_retention_sec}} diff --git a/systemd/system/systemd-journald-vacuum.timer b/systemd/system/systemd-journald-vacuum.timer deleted file mode 100644 index 0190bdf..0000000 --- a/systemd/system/systemd-journald-vacuum.timer +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Run systemd-journald-vacuum hourly - -[Timer] -OnCalendar=hourly - -[Install] -WantedBy=timers.target