[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Frage zu logrotate - macht nicht was es soll?



* Christian Knorr <debian-mailingliste@online.de> wrote:
> Oh wie blöd, hatte es mit sudo gemacht, aber ohne den Pfad. Also nochmal:
> 
> sudo /usr/sbin/logrotate -d /etc/logrotate.d/apache2
> reading config file /etc/logrotate.d/apache2
> reading config info for /var/log/apache2/*.log
> 
> Handling 1 logs
> 
> rotating pattern: /var/log/apache2/*.log  weekly (52 rotations)
> empty log files are not rotated, old logs are removed
> considering log /var/log/apache2/access.log
>   log does not need rotating
> considering log /var/log/apache2/error.log
>   log does not need rotating
> considering log /var/log/apache2/intranet_access.log
>   log does not need rotating
> considering log /var/log/apache2/intranet_error.log
>   log does not need rotating
> considering log /var/log/apache2/public_access.log
>   log does not need rotating
> considering log /var/log/apache2/public_error.log
>   log does not need rotating
> considering log /var/log/apache2/webcam_access.log
>   log does not need rotating
> considering log /var/log/apache2/webcam_error.log
>   log does not need rotating
> not running shared postrotate script, since no logs were rotated
 
Na das sieht doch schon ganz gut aus. Aber wo sind die pitchfork_*?

Da du ja 'weekly' angegeben hast wird auch erst nach einer Woche rotiert, 
egal wie groß das Log ist. 
,----
| weekly 
| Log files are rotated if the current weekday is less than the
| weekday of the last rotation or if more than a week has passed since
| the last rotation.
`----

Das'rotate 52' besagt auch nur das alte Logs 52 Wochen gespeichert werden.
Wenn du jetzt vorher rotieren willst musst du logrotate händisch mit -f 
aufrufen, oder aber deine conf umbauen von 'weekly'nach 'daily' oder 'size'.

Gruß
Jens


Reply to: