Squid Logs are not rotating

Chris Larson chrislfxp at gmail.com
Thu Aug 13 18:37:21 UTC 2009


I am running squid on a Ubuntu system and had to move my squid logs to
another drive which is mounted at /var/log/squid. The logs are not rotating
and the access.log and store.log are filling up the disk.

squidmin at squid:/var/log/squid# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
    missingok
    monthly
    create 0664 root utmp
    rotate 1
}

/var/log/btmp {
    missingok
    monthly
    create 0664 root utmp
    rotate 1
}

# system-specific logs may be configured here

And the logrotate squid file:

squidmin at squid:/etc/logrotate.d# cat squid
#
#       Logrotate fragment for squid.
#
/var/log/squid/*.log {
        daily
        compress
        delaycompress
        rotate 2
        missingok
        create 640 proxy proxy
        sharedscripts
        prerotate
                test ! -x /root/scripts/proxybackup.sh ||
/root/scripts/proxybackup.sh
                test ! -x /etc/srg/srg || /etc/srg/srg
                test ! -x /usr/sbin/sarg-maint || /usr/sbin/sarg-maint
        endscript
        postrotate
                test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
        endscript
}

squidmin at squid:/var/log/squid# ll
total 3085817
-rw-r----- 1 proxy proxy 1272614726 2009-08-13 13:25 access.log
-rw-r----- 1 proxy proxy   38036728 2009-06-03 09:29 access.log.1
-rw-r----- 1 proxy proxy      66266 2008-10-20 06:32 access.log.2.gz
-rw-r----- 1 proxy proxy     593572 2009-08-13 13:00 cache.log
-rw-r----- 1 proxy proxy       9370 2009-06-03 09:23 cache.log.1
-rw-r----- 1 proxy proxy        212 2008-10-19 06:35 cache.log.2.gz
-rw-r----- 1 proxy proxy     439397 2009-08-13 08:01 squidGuard.log
-rw-r----- 1 proxy proxy      28070 2009-06-03 09:29 squidGuard.log.1
-rw-r----- 1 proxy proxy       1589 2008-10-20 06:35 squidGuard.log.2.gz
-rw-r----- 1 proxy proxy 1791057805 2009-08-13 13:25 store.log
-rw-r----- 1 proxy proxy   53768036 2009-06-03 09:29 store.log.1
-rw-r----- 1 proxy proxy     158509 2008-10-20 06:32 store.log.2.gz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090813/c934e6c5/attachment.html>


More information about the ubuntu-users mailing list