Re: [squid-users] Daily log rotate

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 27 Feb 2009 19:53:51 +1300

Bora Özden wrote:
> Hi,
> I would like to make the squid logs to be rotated and looking at the
> /etc/logrotate.d/squid file but not sure about all the parameters (what
> they mean) written there. I need then make them archived (send to a
> server via ftp, have an old script doing this at the old server , will
> look at it and copy it to the production one) .And also when i give the
> command
> squid -k rotate command to rotate the log files i get " No running copy"
> , but the proxy is working and still giving service, also can see on
> the tail -f access.log.
>
> So for doing this logrotate smoothly (not to fail) i wanted also to ask
> to the list.
>
> Regards
>
> Bora Ozden
>

Something like this:

set squid.conf:
   logfile_rotate 0

Then in logrotate.d/squid (this is just off the top of my head, check
the docs for corrections):

   postrotate {
     squid -k rotate
     /script/to/process/logfile /var/logs/suid/access.log.1
   }

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE6 or 3.0.STABLE13
   Current Beta Squid 3.1.0.5
Received on Fri Feb 27 2009 - 06:53:30 MST

This archive was generated by hypermail 2.2.0 : Fri Feb 27 2009 - 12:00:01 MST