SST XtraDB Backup - Use a different tmp directory

Hi all,

Our current tmp directory is only 5GB and it’s not able to perform SST backup as the tmp directory gets filled up really quickly.

Setting tmpdir under [mysqld] or [xtrabackup] doesn’t work for me. I have also checked the permissions. It is still using /tmp for the SST.

We are using the following version:

Server version: 5.7.16-10-57-log Percona XtraDB Cluster (GPL), Release rel10, Revision bec0879, WSREP version 27.19, wsrep_27.19

Any ideas please?


Currently, in PXC 5.7, the tmpdir parameter doesn’t do very much for xtrabackup-v2 SST (changes the location of some temporary files used by the script)

To change the location of the backup files, as a workaround, you can manually edit the wsrep_sst_xtrabackup-v2 script

change the line (around line 1127)
itmpdir=$(mktemp -d)

Thanks, that works!

another option set the TMPDIR on the top of the script:

edit wsrep_sst_xtrabackup-v2 and add

export TMPDIR=/mysql/sst_ist_stage

later, you will se the change on the script:

WSREP_SST: [INFO] Streaming with xbstream (20170323 16:11:51.102)
WSREP_SST: [INFO] Using socat as streamer (20170323 16:11:51.105)
WSREP_SST: [INFO] Using /mysql/sst_ist_stage/tmp.LxzmCD7EUA as xtrabackup temporary directory (20170323 16:11:51.126)
WSREP_SST: [INFO] Using /mysql/sst_ist_stage/tmp.yPp4ONZAvD as innobackupex temporary directory (20170323 16:11:51.130)


The fixes for this has just been released for PXC 5.6 and 5.7:

PXC will now check for and use the tmpdir option.