diff options
author | Sergei Golubchik <serg@mariadb.org> | 2021-07-06 16:49:58 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2021-07-07 18:55:09 +0200 |
commit | d88b4434463d4942e5f8a15bf98fa5797d738e63 (patch) | |
tree | bb320ea9a8d9e50429a5771a74b9ed1d9c3dfff2 /debian/mariadb-server-10.7.mysql-server.logrotate | |
parent | b836f84b31c58de4e1522f0596666656ec05daab (diff) | |
download | mariadb-git-d88b4434463d4942e5f8a15bf98fa5797d738e63.tar.gz |
debian update for 10.7
Diffstat (limited to 'debian/mariadb-server-10.7.mysql-server.logrotate')
-rw-r--r-- | debian/mariadb-server-10.7.mysql-server.logrotate | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/mariadb-server-10.7.mysql-server.logrotate b/debian/mariadb-server-10.7.mysql-server.logrotate new file mode 100644 index 00000000000..4111a276dc3 --- /dev/null +++ b/debian/mariadb-server-10.7.mysql-server.logrotate @@ -0,0 +1,20 @@ +# - I put everything in one block and added sharedscripts, so that mysql gets +# flush-logs'd only once. +# Else the binary logs would automatically increase by n times every day. +# - The error log is obsolete, messages go to syslog now. +/var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log { + daily + rotate 7 + missingok + create 640 mysql adm + compress + sharedscripts + postrotate + test -x /usr/bin/mysqladmin || exit 0 + if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ]; then + # If this fails, check debian.conf! + mysqladmin --defaults-file=/etc/mysql/debian.cnf --local flush-error-log \ + flush-engine-log flush-general-log flush-slow-log + fi + endscript +} |