Hi all,
Sorry for being way off target but I have tried to get this answered
everywhere else with no luck (including the cobalt forum and too many
websites to list)
I have a problem with the logrotate cron task on a virtual site hosted on a
Cobalt Raq4. Please bear with me on this as I am on an extremely steep
learning curve.
I have just discovered that the web.log file on a virtual site we have setup
is being compressed when it reaches 20Mb. This in itself is not a problem
except that the zipped version is then overwritten the next time that the
web.log file reaches 20Mb in the daily cron task. This is a problem as I am
losing log data every couple of days. I have searched this forum and read
through the logrotate manual on the server in order to find a way to resolve
this. I think I know how to do it but would like to check with people who
know what they doing.
The current daily web.log logrotate task for the site is:
/home/sites/site3/logs/web.log {
missingok
compress
size 20M }
As I understand it this is basically saying compress web.log if it's size
exceeds 20Mb, and obviously the next time it exceeds 20Mb compress the file
again. Hence I'm losing data as the zipped file is being overwritten almost
on a daily basis.
What I want it to do is compress the file and not write over itself, either
by giving the compressed file a sequential (numerical/date) name, or some
other solution. This is where I am a little hazy on the exact nature of
logrotate. What I think I need to do is something along the lines of the
following:
/home/sites/site3/logs/web.log {
rotate 4
missingok
compress
size 20M }
I think that this will check the web.log file size. If it is more than 20Mb
then it will compress it. Does the rotate function then mean that the zipped
file will be created and then the next time the process is conducted (ie
file size exceeds 20Mb) a NEW zipped file will be created. Will this then
happen for four iterations before the zipped file #1 is overwritten? Is
there a limit to the number of rotations you can set, apart from the obvious
incrementing file size issues.
Can somebody please tell me whether I'm barking up the wrong tree or not?
any help is much appreciated,
thanks,
Gareth
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.381 / Virus Database: 214 - Release Date: 02/08/2002
____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
http://wdvl.internet.com/WDVL/Forum/#sub
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]