I have on my server more file rotate, but when I want to compress it, i Have an extension 1.gz
, but I just want .gz
These files are automatically rotate by the application:
server.log.2023-03-16
server.log.2023-03-15
server.log.2023-03-14
My result:
server.log.2023-03-16.1.gz
server.log.2023-03-15.1.gz
server.log.2023-03-14.1.gz
I want:
server.log.2023-03-16.gz
server.log.2023-03-15.gz
server.log.2023-03-14.gz
My logrotate file:
#/var/log/application/*/server*.log.* {
daily
rotate 14
compress
delaycompress
missingok
}
How can I fix this?
logrotate
? You could just rungzip
on all the relevant log files.