Not the answer you need?
Register and ask your own question!

SST XtraDB Backup - Use a different tmp directory

weishanweishan EntrantCurrent User Role Beginner
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?



  • Kenn TakaraKenn Takara Percona Percona Staff Role
    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)
  • weishanweishan Entrant Current User Role Beginner
    Thanks, that works!
  • marianourrozmarianourroz Entrant Current User Role Beginner
    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)

  • Kenn TakaraKenn Takara Percona Percona Staff Role
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.