[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] configuring log rotation



> after reading some of the posts on log rotation and after reading "man
> logrotate", I've decided to try the following unless or until I hear
> differently from one of you.   I have a Cobalt RAQ4 dedicated server at Verio.
> It seems to be configured oddly or at least it doesn't seem to match up
> exactly with what I'm reading
> 
> as i said in a previous message, I want to capture log information for my site
> in web.log month by month and compress and save 3 months of logs.  the current
> "web.log" for the site runs from Feb. 9 to today.  The gz'd log runs from Jan
> 16 to Feb. 9 (25 days?).
> 
> I found the directory logrotate.d in etc with a site1 (www.boone.org) file in
> it. I also found files logrotate.conf and logrotate.conf.master in etc.

<snip log configurations>

Hey Tim,

Basically, everything looks fine the way you've got it set up. The only
thing I wanted to say is that I wouldn't worry about the logrotate.conf. It
gets overridden by the local config files for each site in logrotate.d and
logrotate.onboot. BTW, logrotate.onboot has the config files for logrotation
when the server boots up. What I did was make the changes to each site
config in logrotate.d and copy them over to logrotate.onboot.

After you get everything setup the way you want it, I would backup the
config files to your admin directory or wherever you like. The GUI sometimes
overwrites your logrotate config files and it's a real bummer at the end of
the month to find out that you lost half of your monthly stats. What I did
to protect against this is schedule a little cron job that copies over my
new set of config files on a daily basis. It's kind of a clumsy solution,
but it *works*. ;)

HTH,
Jay