diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh
|
index 59d2e12817b..134c250a515 100644
|
--- a/scripts/wsrep_sst_mariabackup.sh
|
+++ b/scripts/wsrep_sst_mariabackup.sh
|
@@ -283,6 +283,21 @@ parse_cnf()
|
echo $reval
|
}
|
|
+parse_cnf_all()
|
+{
|
+ local group=$1
|
+ local var=$2
|
+ # print the default settings for given group using my_print_default.
|
+ # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin)
|
+ # then grep for needed variable
|
+ # finally get the variable value (if variables has been specified multiple time return all values separated by space)
|
+ reval=$($MY_PRINT_DEFAULTS $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | sed -e's/"/\\"/g' -e's/^/"/g' -e's/$/"/g')
|
+ if [[ -z $reval ]];then
|
+ [[ -n $3 ]] && reval=$3
|
+ fi
|
+ echo $reval
|
+}
|
+
|
get_footprint()
|
{
|
pushd $WSREP_SST_OPT_DATA 1>/dev/null
|
@@ -340,6 +355,15 @@ read_cnf()
|
ttime=$(parse_cnf sst time 0)
|
cpat=$(parse_cnf sst cpat '.*galera\.cache$\|.*sst_in_progress$\|.*\.sst$\|.*gvwstate\.dat$\|.*grastate\.dat$\|.*\.err$\|.*\.log$\|.*RPM_UPGRADE_MARKER$\|.*RPM_UPGRADE_HISTORY$')
|
[[ $OS == "FreeBSD" ]] && cpat=$(parse_cnf sst cpat '.*galera\.cache$|.*sst_in_progress$|.*\.sst$|.*gvwstate\.dat$|.*grastate\.dat$|.*\.err$|.*\.log$|.*RPM_UPGRADE_MARKER$|.*RPM_UPGRADE_HISTORY$')
|
+ for ignore_dir in $(parse_cnf_all mysqld ignore-db-dir '')
|
+ do
|
+ ignore_dir=$(echo $ignore_dir | sed 's/[.[\*^$()+?{|]/\\&/g')
|
+ if [ "$OS" = "FreeBSD" ];then
|
+ cpat=$cpat'|.*/'$ignore_dir'$'
|
+ else
|
+ cpat=$cpat'\|.*/'$ignore_dir'$'
|
+ fi
|
+ done
|
ealgo=$(parse_cnf xtrabackup encrypt "")
|
ekey=$(parse_cnf xtrabackup encrypt-key "")
|
ekeyfile=$(parse_cnf xtrabackup encrypt-key-file "")
|