[olug] Log Retention

Brian Roberson roberson at bstc.net
Mon Dec 12 06:07:40 UTC 2011


Logrotate is what you need to familiarize yourself with. Pretty sure
it's installed on fedora by default. I usually dont say rtfm, but I
know that the man pages for it is really intuitive. If you don't have
man pages installed just google it.

Usually puts its configs for each log file in /etc/logrotate.d/application



On Dec 11, 2011, at 7:11 PM, "T. J. Brumfield" <enderandrew at gmail.com> wrote:

> I feel stupid asking what should be a fairly elementary question, but it is
> something I've never had to do on a Linux Apache box before. Log retention
> policies were always in place before I got there, or we had enough storage
> that we've never had to worry about it. (Not to mention that everyplace
> I've worked has been predominately a Microsoft-only shop). But I have a VPS
> with limited disk space and need a way to manage log retention.
>
> I need to make sure I've got something in place to keep log files in check.
> I don't want to turn off logging, but I need to rotate logs at file size X
> and then delete logs when I get over Y number of logs so I keep my overall
> log storage at a fairly constant number.
>
> I need to do this for MySQL, Apache, PHP, Murmur and local system logs
> because I can't afford to let any logs run me out of disk space.
>
> I'm running Fedora 16 (because I wanted to familiarize myself with systemd).
>
> -- T. J. Brumfield
> "I'm questioning my education
> Rewind and what does it show?
> Could be, the truth it becomes you
> I'm a seed, wondering why it grows"
> -- Pearl Jam, Education
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug



More information about the OLUG mailing list