Firas A. Mubarak wrote:
this is a very good idea i likd it thank you very much, but once it
rotate it just overwrite the previous log file.
i want to keep all the access.log files stored for 6 momths .
any ideas ?
I run this script every night, to gzip yesterdays access.log into an
archive dir, and put the date in the filename.
Of course you have to make sure there is disk space available, and some
sort of cleanup after 6 months.
#!/bin/sh
/usr/local/sbin/squid -k rotate
sleep 15
gzip -c -9 /usr/local/squid/logs/access.log.0 >
/usr/local/squid/logs/archive/access.log.`date -v -1d +%F`.gz
--
Andreas