Squid Logs are not rotating

Preston Hagar prestonh at gmail.com
Thu Aug 13 20:25:28 UTC 2009


On Thu, Aug 13, 2009 at 1:37 PM, Chris Larson<chrislfxp at gmail.com> wrote:
> 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.
>

Logrotate will not rotate logs from one device (drive) to another.  To
see the error, try running

logrotate -f /etc/logrotate.d/squid

You should get an error that says something about different devices.

The only solution I have ever figured out to get around this is to
first have logrotate rotate the logs to a tmp directory somewhere on
the same device, then either have cron, or a logrotate postrotate
script move the rotated scripts from the tmp directory to the
directory on the other device using mv.

Hope this helps out.  Try the logrotate command I suggested above and
if it gives a different error (than the different devices one) post it
to the list and hopefully someone can figure out any other issues.


Preston




More information about the ubuntu-users mailing list