"rotate 2" means rotate 2 logs and delete anything older, so this is
equivalent to 2 days.
With my job, most of our servers, we use rotate 7 or rotate 14 for 1 or
2 weeks worth. Without drive scrubbing software, there is no easy way to
get those files back.
Also it may help to put the prerotate entry above "daily" so it runs
each line in proper order, sometimes the prerotate further down on
certain systems works more like a "delay rotate".
Mike
On 11/13/2014 12:39 PM, santosh wrote:
Hello Team ,
I have a doubt with squid log file rotation ,my squid log file rotation is
configured this way in /etc/logrotate.d/squid3
/var/log/squid3/*.log {
daily
compress
delaycompress
rotate 2
missingok
nocreate
sharedscripts
prerotate
test ! -x /usr/sbin/sarg-reports || /usr/sbin/sarg-reports
endscript
postrotate
test ! -e /var/run/squid3.pid || /usr/sbin/squid3 -k rotate
endscript
}
by this i can understand that the the log is rotated daily and once the log
is rotated Old log files are renamed with numeric extensions. For example,
when a log rotates , Squid renames log.6 to log.7, then log.5 to log.6, and
so on and it compresses too .
earlier i had logs from Oct 25 th to Oct 27th and i didnt use the server for
long and started using it from 7th november till today ie Nov 13th , i have
log files only from 7th till today where did the old log files go ? .
As per my understanding they should be archived in the squid log directory
itself rite ? . how to archive and keep the old log files ?
--
View this message in context: http://squid-web-proxy-cache.1019090.n4.nabble.com/Squid-Log-file-rotation-tp4668374.html
Sent from the Squid - Users mailing list archive at Nabble.com.
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users
_______________________________________________
squid-users mailing list
squid-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.squid-cache.org/listinfo/squid-users