[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] Free up space on /var
- Subject: RE: [cobalt-users] Free up space on /var
- From: "Colin J. Raven" <cjraven@xxxxxxxxxxx>
- Date: Mon Mar 26 22:27:10 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
>OK, I've discovered it's a 170 MB log in the /var/lib/mysql
>directory. How do I archive it and start a new one?
If you can move your logfile out of /var/lib to /var/log it might be
better I think. /var/log is a good standardized place to stash logs
(self explanatory name). Personally I think it's good practice to stash
*all* logfiles in one place.
[Sidebar question to list] Does anyone have any idea why Apache (et al)
doesn't follow the /var/log standard "out-of-the-box"?
OK, your next step IMHO is to begin investigating logrotate. man
logrotate is a good start point. This is gonna keep happening otherwise.
/etc/logrotate.conf is where logrotate gets it's instructions from. The
man page is fairly decent and clearer than many I've read.
Another alternative is to whip up a small tarball/gzip script and cron
it. If logrotate looks too industrial-strength or you don't have the
time to slog through figuring out all the steps, tarballing and gzipping
the logfile (AND creating another one with apropriate perms, lest ye
forget this is kinda important!!) might be an inelegant but functional
way to achieve a similar end result.
However, you're really reinventing the wheel since logrotate basically
does exactly the same thing.
Anyone got a better approach to this???
Regards,
-Colin
--
Colin J. Raven