From e50755f702c531cb156b3fb668f6d9caf9d1485e Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Mon, 21 Jul 2025 19:34:38 +0100 Subject: [PATCH] web: use zstd for apache log compression --- cookbooks/web/templates/default/logrotate.apache.erb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cookbooks/web/templates/default/logrotate.apache.erb b/cookbooks/web/templates/default/logrotate.apache.erb index e2870c3b9..d0b2aaa59 100644 --- a/cookbooks/web/templates/default/logrotate.apache.erb +++ b/cookbooks/web/templates/default/logrotate.apache.erb @@ -6,11 +6,15 @@ rotate 28 compress delaycompress + compresscmd /usr/bin/zstd + compressext .zst + compressoptions -T0 + uncompresscmd /usr/bin/unzstd notifempty create 640 root adm sharedscripts postrotate - /etc/init.d/apache2 reload > /dev/null - /usr/bin/rsync --preallocate /var/log/apache2/access.log.2.gz backup.openstreetmap.org::logs/www.openstreetmap.org/<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.gz + /bin/systemctl reload apache2 + /usr/bin/rsync --preallocate /var/log/apache2/access.log.2.zst backup.openstreetmap.org::logs/www.openstreetmap.org/<%= node[:hostname] %>-`date -d "-2 days" +%Y-%m-%d`.zst endscript } -- 2.39.5