I have the following configuration that is not working:
1) Using rsyslog with Centos 5.
2) Inside /etc/logrotate.d I have the file sj-piers-logs.
SJ-PIERS-LOGS:
/syslogrep/sjpiers-logs/0* {
weekly
missingok
notifempty
dateext
copytruncate
compress
olddir /syslogbackup/sjpiers-logs/backup
rotate 96
}
4) logrotate.conf have the default configuration:
LOGROTATE.CONF
weekly
rotate 4
create
include /etc/logrotate.d
/var/log/wtmp {
monthly
minsize 1M
create 0664 root utmp
rotate 1
}
5) Syslogs are sent by network devices to /syslogrep. I want to rotate the log file, compress and move it to /syslogbackup.
I was told that the error reside in the use of wildcards in sj-piers-logs file but it seems that I can use them according the the man page. What I'm doing wrong?
Best Answer
Try a test run with
It will provide you with an error message, or you can further investigate the logrotate configuration.