From 909cd1a6ba52b28a705190d7576a15cd38ebea9e Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Tue, 24 Mar 2020 14:55:07 +0100 Subject: MDEV-21951: mariabackup SST fail if data-directory have lost+found directory To fix this, it is necessary to add an option to exclude the database with the name "lost+found" from processing (the database name will be checked by the check_if_skip_database_by_path() or by the check_if_skip_database() function, and as a result "lost+found" will be skipped). In addition, it is necessary to slightly modify the verification logic in the check_if_skip_database() function. --- extra/mariabackup/xtrabackup.cc | 2 +- scripts/wsrep_sst_mariabackup.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 6896205238b..c0f76f43b4a 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2270,7 +2270,7 @@ check_if_skip_database( if (databases_exclude_hash && find_filter_in_hashtable(name, databases_exclude_hash, &database) && - !database->has_tables) { + (!database->has_tables || !databases_include_hash)) { /* Database is found and there are no tables specified, skip entire db. */ return DATABASE_SKIP; diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index 799276258f2..8bd3ef9d10b 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -699,9 +699,11 @@ if ${INNOBACKUPEX_BIN} /tmp --help 2>/dev/null | grep -q -- '--version-check'; t disver="--no-version-check" fi +iopts+=" --databases-exclude=\"lost+found\"" + if [[ ${FORCE_FTWRL:-0} -eq 1 ]];then wsrep_log_info "Forcing FTWRL due to environment variable FORCE_FTWRL equal to $FORCE_FTWRL" - iopts+=" --no-backup-locks " + iopts+=" --no-backup-locks" fi INNOEXTRA=$WSREP_SST_OPT_MYSQLD -- cgit v1.2.1