tmp dir confusion

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
innobackupex --xbstream /nfs > /nfs/backup.xbstream

The command should be


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

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?

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.

thx, I guess it just seems odd that you need to specify a temp dir to stream to stdout