Hello All,
I'm trying to assist a customer with automating log compression. Currently we use the following to rotate the access logs on a daily basis.
CustomLog "| bin/rotatelogs.exe Logs/access.log%d-%b-%Y-%H-%M 86400" common
I understand that compression needs to happen outside the IHS config. I'm now hoping that someone has this automated. I'm expecting some kind of batch script that invokes a compression tool and then a scheduled task to kick it off. In this particular case I'm running on a Windows platform.
What we want then is a way to compress the logs using the following criteria:
1. Create a zip file in an alternate location (on the same physical server)
2. Perform a simple check to select log files based on date
- either using the modified date OR using the file names
- example file name -> "access.log17-Sep-2013-00-00"
3. If log file is older then 10 days, append the file into a compressed zip file
I don't mind if the solution is complex if it gives more flexibility - above is really just a starting point to get this discussion moving forward.
Thanks!