--tmpdir option has no effect as documented

Bug #1107543 reported by Ren Xiaolei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
New
Undecided
Unassigned

Bug Description

my command line:
/usr/bin/innobackupex --user=root --password=xxxx --stream=xbstream /opt/tmp/ | nc otherhost port
And I ran 'nc -l port' on the other host to receive backup data.

I noticed that space of root filesystem decrease quickly. So I ran
lsof -c xtrabackup|grep delete
I get this:
xtrabacku 25266 root 5u REG 8,1 586478592 1040448 /tmp/xtrabackup_logfileIrqJoG (deleted)
And, innobackupex said:
130128 14:11:06 innobackupex: Starting ibbackup with command: xtrabackup_51 --defaults-group="mysqld" --backup --suspend-at-end --target-dir=/tmp --stream=xbstream

I read the document and set --tmpdir=/opt/tmp option to enforce it write files into /opt filesystem ( actually the document said a path after --stream would be used as --tmpdir ), but whether I set --tmpdir or not, it still write temporary file in /tmp which is a part of root filesystem.
At last, I modified /etc/my.cnf and set "tmpdir=/opt/tmp" in it, innobackupex writes temporary files in the path I want after the modification.

I use CentOS 5 and below is the version of percona-xtrabackup:
$ rpm -qi percona-xtrabackup
Name : percona-xtrabackup Relocations: (not relocatable)
Version : 2.0.5 Vendor: (none)
Release : 499.rhel5 Build Date: Fri 18 Jan 2013 04:29:13 AM CST
Install Date: Mon 28 Jan 2013 01:44:41 PM CST Build Host: localhost.localdomain
Group : Server/Databases Source RPM: percona-xtrabackup-2.0.5-499.rhel5.src.rpm
Size : 11344684 License: GPLv2
Signature : DSA/SHA1, Fri 18 Jan 2013 08:13:26 AM CST, Key ID 1c4cbdcdcd2efd2a
Packager : Percona Development Team <email address hidden>
URL : http://www.percona.com/software/percona-xtrabackup/
Summary : XtraBackup online backup for MySQL / InnoDB
Description :
Percona XtraBackup is OpenSource online (non-blockable) backup solution for InnoDB and XtraDB engines.

btw, I tried to debug the perl script, but not good at perl.
I commented the line 1728~1730 out, like below:
   1728 #if(!$option_tmpdir) {
   1729 # $option_tmpdir = get_option(\%config, $option_defaults_group, 'tmpdir');
   1730 #}
the script said:
130128 14:14:41 innobackupex: Starting ibbackup with command: xtrabackup_51 --defaults-group="mysqld" --backup --suspend-at-end --target-dir= --stream=xbstream
the --target-dir become empty!! There would be some error in innobackupex script that cause the $option_tmpdir variable lost.

Tags: option
Revision history for this message
Alexey Kopytov (akopytov) wrote :

This has already been reported as bug #1085099.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.