Re: [squid-users] SQUID Logrotate problem

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 30 Jul 2011 00:32:44 +1200

On 29/07/11 23:36, Railic Njegos wrote:
> Hi all,
> definetly problem is with permission.
>

I see a different answer.

Follow...

<snip>
>
> [root_at_proxy01 ~]# logrotate -d -v -f /etc/logrotate.d/squid
<snip>
> considering log /var/log/squid/access.log
> log needs rotating
<snip>
> considering log /var/log/squid/cache.log
> log needs rotating
<snip>
>
> rotating pattern: /var/log/squid/store.log forced from command line
> (5 rotations)
> empty log files are not rotated, old logs are removed
> considering log /var/log/squid/store.log
> log does not need rotating
> not running postrotate script, since no logs were rotated

BINGO!!!

You have configured logrotated to only run squid -k rotate IF store.log
had changes. It did not. Therefore no rotation.

I think server1 is not caching => empty store.log => no rotate.
I think server2 is caching => data in store.log => rotates.

Use this logrotate.d config instead:

/var/log/squid/store.log /var/log/squid/cache.log
/var/log/squid/access.log {
     weekly
     rotate 5
     copytruncate
     compress
     notifempty
     missingok
     sharedscripts
     postrotate
       /usr/sbin/squid -k rotate
     endscript
}

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.14
   Beta testers wanted for 3.2.0.10
Received on Fri Jul 29 2011 - 12:32:52 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 29 2011 - 12:00:03 MDT