Mailinglist Archive: opensuse (3337 mails)

< Previous Next >
Re: [SLE] logrotate question
  • From: Till Wimmer <suse-e@xxxxxxxxxxxx>
  • Date: Sat, 29 Apr 2006 01:42:11 +0200
  • Message-id: <4452A853.1010908@xxxxxxxxxxxx>
Patrick Shanahan wrote:

* Till Wimmer <suse-e@xxxxxxxxxxxx> [04-28-06 00:11]:

I want my apache log files to be rotated when they're bigger then 50M and ONLY when they're bigger.

But my /etc/logrotate.conf says:
# rotate log files weekly
weekly

I added a file /etc/logrotate.d/apache:
/var/log/apache2/*.log {
size=20M
...
}

What's gonna happen? Are the files rotated even when they're smaller than 50M?


yes, you have size=20M

My config: size=+10M

Ah yes, of course - the 20M was a typo :)

I was wondering because of the "weekly" in the global logrotate.conf. So what's more crucial: The weekly or the size=50M directive... and why? The man pages don't answer this.

My /etc/logrotate.de/apache looks like this:
/vhosts/substring/log/*.log /vhosts/tonarchiv/log/*.log /vhosts/safoso/log/*.log {
size 50M
rotate 9999
dateext
compress
delaycompress
nocreate
nocopy
sharedscripts
postrotate
apachectl graceful
endscript
}

Thanx - Till


< Previous Next >
Follow Ups