PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Logrotate rotiert nicht sondern



nieselfriem
19.07.13, 11:10
Hallo ich versuche gerade Logrotete zu etablieren. Dabei teste ich es mit dem Befehl


/usr/sbin/logrotate -dv /etc/logrotate.d/mysql
Dabei kommt es zu folgender Meldung:


/usr/sbin/logrotate -dv /etc/logrotate.d/mysql
reading config file /etc/logrotate.d/mysql
reading config info for /var/log/mysql/mysql-error.err
reading config info for /var/log/mysql/query.log

Handling 2 logs

rotating pattern: /var/log/mysql/mysql-error.err after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/mysql/mysql-error.err
log does not need rotating

rotating pattern: /var/log/mysql/query.log after 1 days (52 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/mysql/query.log
log does not need rotating


Was ich nicht ganz verstehe, warum er die query.log nicht rotiert. Diese ist 12 MB groß. Beide Dateien sind nicht leer.
Konfiguration /etc/logrotate.d/mysql


/var/log/mysql/mysql-error.err {
# create 600 mysql mysql
notifempty
daily
rotate 7
missingok
compress
}
/var/log/mysql/query.log {
notifempty
size = 10M
rotate 52
missingok
compress
}


VG niesel

TheDarkRose
19.07.13, 21:15
Na weils noch nicht nötig ist (Datei zu jung)? Versuch es mal mit -f