Logration does not work
Hi,
MariaDB run on RedHat 9. I have configured the log rotation but that does not work. The error log file grow each day without made rotation.
[root@svx-mdb-04t 10.11]# ls -hl svx-mdb-04t.log -rw-rw----. 1 mysql mysql 1.2G Jul 22 07:27 svx-mdb-04t.log [root@svx-mdb-04t 10.11]#
[root@svx-mdb-04t 10.11]# cat /etc/logrotate.d/mariadb
- This is the MariaDB configuration for the logrotate utility
- Note that on most Linux systems logs are written to journald, which has its
- own rotation scheme.
- Read https://mariadb.com/kb/en/error-log/ to learn more about logging and
- https://mariadb.com/kb/en/rotating-logs-on-unix-and-linux/ about rotating logs.
/database/logs/10.11/*.log {
su mysql mysql
missingok
notifempty
daily
rotate 30
maxsize 500M
minsize 50M
compress
delaycompress
sharedscripts
postrotate
- just if mysqld is really running if test -x /usr/bin/mariadb-admin && \ /usr/bin/mysqladmin ping &>/dev/null then /usr/bin/mariadb-admin --local flush-error-log \ flush-engine-log flush-general-log flush-slow-log fi endscript }
Regards and thanks for your help. Olivier
Comments
Comments loading...
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.