]> git.openstreetmap.org Git - chef.git/blob - cookbooks/planet/templates/default/logrotate.apache.erb
planet: switch to zstd for apache logrotate
[chef.git] / cookbooks / planet / templates / default / logrotate.apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 /var/log/apache2/*.log {
4         weekly
5         missingok
6         rotate 52
7         compress
8         delaycompress
9         compresscmd /usr/bin/zstd
10         compressext .zst
11         compressoptions -T0
12         uncompresscmd /usr/bin/unzstd
13         notifempty
14         create 640 root adm
15         sharedscripts
16         postrotate
17                 /bin/systemctl reload apache2
18                 /usr/bin/rsync --preallocate /var/log/apache2/planet.openstreetmap.org-access.log.2.zst backup.openstreetmap.org::logs/planet.openstreetmap.org/`date -d "-7 days" +%Y-%m-%d`.zst
19         endscript
20         prerotate
21                 if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
22                         run-parts /etc/logrotate.d/httpd-prerotate; \
23                 fi; \
24         endscript
25 }