diff --git a/mariadb/Chart.yaml b/mariadb/Chart.yaml index 447253f19..fab1083c0 100644 --- a/mariadb/Chart.yaml +++ b/mariadb/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v10.2.31 description: OpenStack-Helm MariaDB name: mariadb -version: 0.2.22 +version: 0.2.23 home: https://mariadb.com/kb/en/ icon: http://badges.mariadb.org/mariadb-badge-180x60.png sources: diff --git a/mariadb/templates/bin/_backup_mariadb.sh.tpl b/mariadb/templates/bin/_backup_mariadb.sh.tpl index dc44a2631..499337595 100644 --- a/mariadb/templates/bin/_backup_mariadb.sh.tpl +++ b/mariadb/templates/bin/_backup_mariadb.sh.tpl @@ -44,9 +44,9 @@ dump_databases_to_directory() { if [[ "${SCOPE}" == "all" ]]; then MYSQL_DBNAMES=( $($MYSQL --silent --skip-column-names -e \ "show databases;" | \ - egrep -vi 'information_schema|performance_schema|mysql') ) + grep -ivE 'information_schema|performance_schema|mysql|sys') ) else - if [[ "${SCOPE}" != "information_schema" && "${SCOPE}" != "performance_schema" && "${SCOPE}" != "mysql" ]]; then + if [[ "${SCOPE}" != "information_schema" && "${SCOPE}" != "performance_schema" && "${SCOPE}" != "mysql" && "${SCOPE}" != "sys" ]]; then MYSQL_DBNAMES=( ${SCOPE} ) else log ERROR "It is not allowed to backup database ${SCOPE}." diff --git a/mariadb/templates/bin/_restore_mariadb.sh.tpl b/mariadb/templates/bin/_restore_mariadb.sh.tpl index f8b6c8c1c..334ba85bc 100755 --- a/mariadb/templates/bin/_restore_mariadb.sh.tpl +++ b/mariadb/templates/bin/_restore_mariadb.sh.tpl @@ -68,7 +68,8 @@ get_databases() { if [[ -e ${TMP_DIR}/db.list ]] then - DBS=$(cat ${TMP_DIR}/db.list ) + DBS=$(cat ${TMP_DIR}/db.list | \ + grep -ivE 'information_schema|performance_schema|mysql|sys' ) else DBS=" " fi diff --git a/releasenotes/notes/mariadb.yaml b/releasenotes/notes/mariadb.yaml index 807def1a5..629df207d 100644 --- a/releasenotes/notes/mariadb.yaml +++ b/releasenotes/notes/mariadb.yaml @@ -38,4 +38,5 @@ mariadb: - 0.2.20 Migrated CronJob resource to batch/v1 API version & PodDisruptionBudget to policy/v1; Uplift Mariadb-ingress to 1.1.3 - 0.2.21 Fix mysql exporter user privileges - 0.2.22 Fix ingress cluster role privileges + - 0.2.23 Fix backup script by ignoring sys database for MariaDB 10.6 compartibility ...