squid access.log backup

Taking care of your Linux box.
Posts: 118
Joined: Thu Jan 13, 2005 2:35 pm
Location: qatar

squid access.log backup

Postby venky145 » Fri May 15, 2009 8:51 pm


i want to take my squid access.log backup automatic and keep that daily file on that server in another place. every date the file copy to another place with adding date like this access.log --- > 15-May-2009 like. how can i do that.

Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore

Postby lambda » Sat May 16, 2009 9:53 am

write a cron job to do "squid -k rotate" at midnight. then your script can rename the old log file to whatever name you want (hint: read the man page for date, and do something like date +"%Y-%m-%d"). and then, to save space, compress it using 7zip or bzip2.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?

Return to “Administration”

Who is online

Users browsing this forum: No registered users and 1 guest