I am running Squid 3 on Ubuntu 10.04, with SARG for reports. It's mostly working quite well, but I'm running into problems with the server becoming totally full with the SARG reports.
I created this script, that tries to get rid of anything older than 45 days in the reports folder, but I think it caused some problems, because SARG hasn't run properly since then.
#!/bin/bash
find /var/www/squid-reports/* -type f -mtime +45 -exec rm -f {} \;
find /var/www/squid-reports/* -type d -mtime +45 -exec rmdir {} \;
What would be the recommended way to take care of this? Thank you!
There is a configuration option
lastlog
for/etc/squid/sarg.conf
that allows you to specify how many days worth of logs to keep e.g.to keep 45 days worth of logs. The default is 0 which means keep all logs.