Re: [squid-users] Re: logrotate/squid -k rotate relationship

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Wed, 04 Oct 2006 10:30:17 +0200

tis 2006-10-03 klockan 22:50 +0200 skrev Joost de Heer:

> > The script will work a bit better if you
> >
> > 1. Set "log_rotate 0" in squid.conf.
> >
> > 2. Have the script rename the log files before it issues "squid -k
> > rotate". Just dont move them to another partition until Squid has
> > completed the log rotation..
>
> What's the gain if the backup is on a different disk?

If you still leave the built-in log rotation then should someone ever
run "squid -k rotate" manually then those log files will be lost (or
perhaps stuck in the Squid log directory).

You also can't use the logrotate rules on when to rotate the logs
differently for the different Squid log files.

By disabling the builtin log rotation and having logrotate (or another
log rotation tool) do all the renaming, moving etc then you ensure that
the log rotation tool knows what is going on att all time.

If the final backup is on a different disk then log rotation should be
done in three steps

1. Rename the logs within the log directory
2. squid -k rotate, and wait a little to have Squid finish the log
rotation. It's not crucial to wait very long, but if you wait too shoort
you may loose some cache.log lines about log rotation when the logs gets
copied from the Squid log directory to the archival/backup directory..
3. Move the renamed logs to the final archival/backup directory

Regards
Henrik

Received on Wed Oct 04 2006 - 02:30:27 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Nov 01 2006 - 12:00:04 MST