summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJulius Goryavsky <sysprg@gmail.com>2018-07-26 15:42:06 +0200
committerJulius Goryavsky <sysprg@gmail.com>2018-07-26 15:44:28 +0200
commit46d5e1f2fddbb4589a8763508cea8589941a2b2f (patch)
tree7fdd7149e30f146e2f8259c49cdc44356878a86b /scripts
parent1fde449f1d4e8ebe12e989754bfdc84b123cf0b2 (diff)
downloadmariadb-git-46d5e1f2fddbb4589a8763508cea8589941a2b2f.tar.gz
MDEV-10754 wsrep_sst_rsync does not support innodb_data_home_dir
If innodb_data_home_dir path specified in the configuration file then rsync IST/SST will fail because the wsrep_sst_rsync.sh script does not read this parameter from the configuration file and then tries to find the data files in the default directory. To fix this error, we need to add reading of the innodb_data_home_dir configuration parameter to the rsync-related SST script.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/wsrep_sst_rsync.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh
index 81120b66d5a..3659a60832c 100644
--- a/scripts/wsrep_sst_rsync.sh
+++ b/scripts/wsrep_sst_rsync.sh
@@ -113,6 +113,12 @@ else
WSREP_LOG_DIR=$(cd $WSREP_SST_OPT_DATA; pwd -P)
fi
+INNODB_DATA_HOME_DIR=${INNODB_DATA_HOME_DIR:-""}
+# if INNODB_DATA_HOME_DIR env. variable is not set, try to get it from my.cnf
+if [ -z "INNODB_DATA_HOME_DIR" ]; then
+ INNODB_DATA_HOME_DIR=$(parse_cnf --mysqld innodb-data-home-dir '')
+fi
+
# Old filter - include everything except selected
# FILTER=(--exclude '*.err' --exclude '*.pid' --exclude '*.sock' \
# --exclude '*.conf' --exclude core --exclude 'galera.*' \
@@ -121,7 +127,8 @@ fi
# New filter - exclude everything except dirs (schemas) and innodb files
FILTER=(-f '- /lost+found' -f '- /.fseventsd' -f '- /.Trashes'
- -f '+ /wsrep_sst_binlog.tar' -f '+ /ib_lru_dump' -f '+ /ibdata*' -f '+ /*/' -f '- /*')
+ -f '+ /wsrep_sst_binlog.tar' -f '+ $INNODB_DATA_HOME_DIR/ib_lru_dump'
+ -f '+ $INNODB_DATA_HOME_DIR/ibdata*' -f '+ /*/' -f '- /*')
if [ "$WSREP_SST_OPT_ROLE" = "donor" ]
then