Because of that bug, TMPDIR may be still required for the other parts of that script.
So,
=== modified file 'Percona-Server/scripts/wsrep_sst_xtrabackup.sh' --- Percona-Server/scripts/wsrep_sst_xtrabackup.sh 2012-12-06 13:26:02 +0000 +++ Percona-Server/scripts/wsrep_sst_xtrabackup.sh 2013-04-08 04:26:06 +0000 @@ -101,13 +101,13 @@ TMPDIR=${TMPDIR:-""} if [ -z "${TMPDIR}" ]; then # try to get it from my.cnf - TMPDIR=$(grep -E '^\s*tmpdir' $WSREP_SST_OPT_CONF | \ - awk -F = '{ print $2 }' | sed 's/^\s//g' | sed 's/\s.*//g' ) + TMPDIR=$(xtrabackup --print-param \ + | awk -F"=" '/tmpdir/ { print $2 }' | tr -d '"') # if failed default to /tmp [ -z "${TMPDIR}" ] && TMPDIR="/tmp" fi
- INNOBACKUPEX_ARGS="--galera-info --tmpdir=${TMPDIR} --stream=tar + INNOBACKUPEX_ARGS="--galera-info --stream=tar --defaults-file=${WSREP_SST_OPT_CONF} --socket=${WSREP_SST_OPT_SOCKET}"
looks good.
Also, note that, to pass a tmpdir to xtrabackup, pass tmpdir under [xtrabackup] and place it AFTER the [mysqld] section. This will ensure that it is passed to both the target as well as tmpdir options of xtrabackup.
Because of that bug, TMPDIR may be still required for the other parts of that script.
So,
=== modified file 'Percona- Server/ scripts/ wsrep_sst_ xtrabackup. sh' Server/ scripts/ wsrep_sst_ xtrabackup. sh 2012-12-06 13:26:02 +0000 Server/ scripts/ wsrep_sst_ xtrabackup. sh 2013-04-08 04:26:06 +0000
TMPDIR= ${TMPDIR: -""}
--- Percona-
+++ Percona-
@@ -101,13 +101,13 @@
if [ -z "${TMPDIR}" ]; then
# try to get it from my.cnf
- TMPDIR=$(grep -E '^\s*tmpdir' $WSREP_SST_OPT_CONF | \
- awk -F = '{ print $2 }' | sed 's/^\s//g' | sed 's/\s.*//g' )
+ TMPDIR=$(xtrabackup --print-param \
+ | awk -F"=" '/tmpdir/ { print $2 }' | tr -d '"')
# if failed default to /tmp
[ -z "${TMPDIR}" ] && TMPDIR="/tmp"
fi
- INNOBACKUPEX_ ARGS="- -galera- info --tmpdir=${TMPDIR} --stream=tar ARGS="- -galera- info --stream=tar
--defaults- file=${ WSREP_SST_ OPT_CONF}
--socket= ${WSREP_ SST_OPT_ SOCKET} "
+ INNOBACKUPEX_
looks good.
Also, note that, to pass a tmpdir to xtrabackup, pass tmpdir under [xtrabackup] and place it AFTER the [mysqld] section. This will ensure that it is passed to both the target as well as tmpdir options of xtrabackup.