He configurado logrotate para que rote diariamente, pero no lo hace.
En cambio cuando lo roto manualmente si que funciona.
Este es mi fichero de logs a rotar. /mislogs/log (-rwxrwxrwx 1 admin admin)
Esta es la configuración del sistema.
/etc/logrotate.conf (-rw-r–r– 1 root root)
/mislogs/log { create 0640 root utmp missingok daily copytruncate rotate 10 dateext }
/etc/logrotate.d/syslog (-rw-r–r– 1 root root)
/var/log/cron /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler { missingok sharedscripts postrotate /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true endscript }
/etc/cron.daily/logrotate (-rwx—— 1 root root)
#!/bin/sh /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf EXITVALUE=$ ? if [ $ EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$ EXITVALUE]" fi exit 0
/etc/crontab (-rw-r–r–. 1 root root)
SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root # For details see man 4 crontabs # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | .------- month (1 - 12) OR jan,feb,mar,apr ... # | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # | | | | | # * * * * * user-name command to be executed
Información adicional.
Sistema operativo CentOS
Por favor alguien me puede ayudar a conseguir que rote correctamente.
Saludos.