Hi Valdis! The method you recommend would completely wipe out my logs, I wish to rotate them and keep at least N days worth. .vp PS Does anyone know if I must restart syslog-ng after or before a logrotate?
From: Valdis.Kletnieks@vt.edu
On Wed, 19 Jul 2006 18:34:25 -0000, Vadim Pushkin said:
The problem that I am having is rotating under syslog-ng, *NOT* MySql. Can anyone please provide me with a good method for rotating logs, where my logs are kept under various subdirs, depending on source address?
What I do is something along the lines of:
1) destination foo { file("/var/logs/whatever/messages-$MONTH$DAY"); };
so syslog-ng creates a seperate output file for each day.
2) A cronjob that then does 'find /var/logs/whatever -mtime +30 -exec rm {}\;' is all that's needed to clean up. Add salt, pepper, and documentation to taste.