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

tmp dir confusion

boogerbooger EntrantCurrent User Role Beginner
Hi, If I am using innobackup with xbstream to backup to an nfs mount is it better to use a local temp dir or a dir on the nfs mount? ie if
/nfs is destination nfs mount should I use

innobackupex --xbstream /tmp > /nfs/backup.xbstream
or
innobackupex --xbstream /nfs > /nfs/backup.xbstream

Comments

  • jriverajrivera Percona Support Engineer Percona Staff Role
    The command should be
    --stream=xbstream
    
    https://www.percona.com/doc/percona-xtrabackup/2.4/howtos/recipes_ibkx_stream.html

    But to avoid problems when you hit connection issues with your NFS at the time of a backup, we tend to recommend to backup to your local drive and the cp the backup to the NFS after
    innobackupex --stream=xbstream ./ > /path/to/local/backup_dir/backup.xbstream
    

    Once backup completes, mv or cp the file to the NFS mount
  • boogerbooger Entrant Current User Role Beginner
    thanks, so with the command you provided the backup is initially written to ./ and then "tarred" and moved to /path/to/local/backup_dir/backup.xbstream?
  • jriverajrivera Percona Support Engineer Percona Staff Role
    Yes, if you want you can specify it:
    innobackupex --stream=xbstream /tmp > /path/to/local/backup_dir/backup.xbstream
    

    This way temporary files are created in the /tmp directory.
  • boogerbooger Entrant Current User Role Beginner
    thx, I guess it just seems odd that you need to specify a temp dir to stream to stdout
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.