Hi All, How can it be done it logrotate configuration that I wanted to have the logs in six (6) month retention period? I have the following logs and directories of mysql. [hostname]# ls /var/log/mysql/ 2010.05.01/general.log 2010.05.01/error.log 2010.05.02/general.log 2010.05.02/error.log 2010.05.03/general.log 2010.05.03/error.log Is it possible that the output after doing logrotate could be like the below sample. All compressed logs will be keep until 6 months only. I know there is man page / docs in internet but I can't get the exact configuration to use. [hostname]# ls /var/log/mysql/ 2010.05.01.gz 2010.05.02.gz 2010.05.03.gz 2010.05.27/general.log 2010.05.27/report.log Thank you. Regards, James -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20100527/feca652c/attachment.html>
On Thu, May 27, 2010 at 7:37 AM, James Corteciano <james at linux-source.org> wrote:> Is it possible that the output after doing logrotate could be like the below > sample. All compressed logs will be keep until 6 months only. I know there > is man page / docs in internet but I can't get the exact configuration to > use.(a) "man logrotate" is available on your in installed system and try to follow the examples in the man page. The cycles are daily/monthly/yearly. For 6 month rotation you can choose monthly and make rotate >= 6 or higher (also allow size large enough to avoid log rotation overwrite).> [hostname]# ls /var/log/mysql/ > 2010.05.01.gz > 2010.05.02.gz > 2010.05.03.gz > 2010.05.27/general.log > 2010.05.27/report.log-- Arun Khan
Seemingly Similar Threads
- /var/spool/samba retention period
- After logrotation Dovecot still writes to old log file
- Dovecot logrotation - old journal files are still in use (second attempt)
- Dovecot stops logging of imap logins after logrotation
- After logrotation Dovecot still writes to old log file