Search squid archive

Re: squid rotate command

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

 



Hi Wennie,

On Wednesday 22 June 2005 13:10, Wennie V. Lagmay wrote:
> Ok this is clear with me, now I can do let say 2 script for a day script 1 
> will do squid -k rotate  and script 2 will do copying of accees.log into a 
> different file.
> Now I will do this daily but the squid rotate will be done first 30 mins 
> ahead then the copying of file will follow. How can I do this in a daily 
> cron.

Are you running squid on a Linux system? Then go for logrotate which will 
rotate the logfile access.log and rename the old one with a date information. 
The configuration is done via /etc/logrotate.d/squid:

/var/log/squid/access.log {
    compress
    dateext
    maxage 365
    rotate 99
    daily
    notifempty
    missingok
    create 640 squid root
    postrotate
     /etc/init.d/squid reload
    endscript
}

This file is from SUSE LINUX Enterprise Server 9, it should look similar on 
any other Linux system. logrotate is executed daily by using 
/etc/cron.daily/logrotate (at least on SUSE LINUX and Red Hat).

Regards,

Peter

-- 
Peter Albrecht, Novell, peter.albrecht@xxxxxxxxxx

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux