I have a logrotate config on ubuntu 16.04 which is meant to rotate my logs to gz daily. The config is like so:
/opt/dcm4chee/server/default/log/*.log {
daily
missingok
rotate 5
compress
notifempty
create 0640 dcm4chee dcm4chee
sharedscripts
copytruncate
}
It produces correctly the gzipped logs:
server.log.1.gz
...
server.log.5.gz
However it also produces a bunch of unwanted "backups" rather sporadically which are causing runaway disk usage over time - we are operating on limited disk space VMs:
server.log.1-2018063006.backup
...
server.log.1-2018081406.backup
This completely defeats my original purpose of capping disk usage by rotating and compressing a finite number of logs in the first place.
How do I stop logrotate from generating these 'backups' completely? If this means losing a few lines of logging, so be it.
I am unable to find documentation on the matter. Currently I have a crontab setup which deletes these files periodically, but it doesn't seem like the 'right' way to do things.
dateext
directive or similar? – Devland/etc/logrotate.conf
. – Devland