I'm trying to compress the messages cause its growing huge in size and there is not much space. I tried all from - compress-messages - to compress the messages but its with
glob finding old rotated logs failed
My logrotate is similar to the one in the link
# cat logrotate-message; logrotate -d logrotate-message -f;ls -lrth /var/log/messages*
daily
rotate 7
create
dateext
dateformat .%Y%m%d
compress
notifempty
nomail
noolddir
/var/log/messages {
rotate 5
daily
postrotate
/bin/killall -HUP syslogd
endscript
}
reading config file logrotate-message
Allocating hash table for state file, size 15360 B
Handling 1 logs
rotating pattern: /var/log/messages forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/messages
log needs rotating
rotating log /var/log/messages, log->rotateCount is 5
Converted ' .%Y%m%d' -> '.%Y%m%d'
dateext suffix '.20191024'
glob pattern '.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
renaming /var/log/messages to /var/log/messages.20191024
creating new /var/log/messages mode = 0600 uid = 0 gid = 0
running postrotate script
running script with arg /var/log/messages: "
/bin/killall -HUP syslogd
"
compressing log with: /bin/gzip
-rw------- 1 root root 1016K Sep 29 03:13 /var/log/messages-20190929
-rw------- 1 root root 1020K Oct 6 03:34 /var/log/messages-20191006
-rw------- 1 root root 2.2G Oct 23 11:31 /var/log/messages.20191023
-rw------- 1 root root 735M Oct 24 15:41 /var/log/messages
Any help will be appreciated.
file /var/log/messages.20191023
return?# file /var/log/messages.20191023 /var/log/messages.20191023: ASCII text, with very long lines
.gz
suffix.glob finding old rotated logs failed