It works fine here. Tim - moores.homeip.net wrote:
Has anyone else had any trouble with the logrotate script working? My files are getting quite large and I don't have one compressed archive of older files. I did collapse my syslog server to write to only /var/log/messages and /var/log/mail. The script runs, but never rotates the files. Any ideas why? Here is some of my files:
*ns1:/var/named/pz # cat /etc/logrotate.d/syslog * /var/log/messages { compress dateext maxage 365 rotate 99 missingok notifempty size +4096k create 640 root root sharedscripts postrotate /etc/init.d/syslog reload endscript }
/var/log/mail { compress dateext maxage 365 rotate 99 missingok notifempty size +4096k create 640 root root sharedscripts postrotate /etc/init.d/syslog reload endscript }
/var/log/clamd.log { compress dateext maxage 365 rotate 99 missingok notifempty size +2048k create 640 root root sharedscripts postrotate /etc/init.d/syslog reload endscript }
*ns1:/var/named/pz # cat /etc/cron.daily/logrotate * #!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf /usr/bin/reswatch
*ns1:/var/named/pz # cat /etc/logrotate.conf * # see "man logrotate" for details # rotate log files weekly weekly
# keep 4 weeks worth of backlogs rotate 4
# create new (empty) log files after rotating old ones create
# uncomment this if you want your log files compressed compress
# uncomment these to switch compression to bzip2 #compresscmd /usr/bin/bzip2 #uncompresscmd /usr/bin/bunzip2
# RPM packages drop log rotation information into this directory include /etc/logrotate.d
# no packages own wtmp -- we'll rotate them here #/var/log/wtmp { # monthly # create 0664 root utmp # rotate 1 #}
# system-specific logs may be also be configured here.
Thanks, Tim