Comment 8 for bug 1160047

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

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.