can't backup tables with $ in name
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
Medium
|
Aleksandr Kuzminsky |
Bug Description
innobackupex-1.5.1 is not able to backup tables with $ in the names as it results in this error:
tar: ea/reptmptbl14b
tar: Error exit delayed from previous errors
innobackupex: tar returned with exit code 2.
innobackupex: Error: Failed to stream 'ea/reptmptbl14
The problem appears to be becuase the system() call it causing the shell to interpret the $1 above as a shell variable.
I attempted to work around the issue below:
--- innobackupex-1.5.1 2009-08-21 15:49:32.878463000 -0700
+++ /usr/bin/
@@ -5,6 +5,7 @@
#
# Copyright 2003, 2009 Innobase Oy. All Rights Reserved.
#
+$ENV{'PATH'} = '/usr/local/
use strict;
use Getopt::Long;
@@ -882,6 +883,7 @@
+ $path=~s/\$/\\\$/g;
@@ -950,6 +952,7 @@
+ $file_name=
@@ -1555,6 +1558,7 @@
if ($option_stream) {
my $filename_dir = substr($filename, 0, rindex($filename, '/') - 1);
my $filename_name = substr($filename, rindex($filename, '/') + 1);
+ $filename_
if ($option_stream eq 'tar') {
@@ -1867,6 +1871,7 @@
} elsif($
my $ret = 0;
my $file_name = substr($file, rindex($file, '/') + 1);
+ $file_name=
if ($ret == 1) {
You should consider escaping anything that may be interpreted by the shel but in our case it's only $. Seems that you may have issue with # though.
thanks,
-Ryan
Related branches
- Yasufumi Kinoshita (community): Approve
- Diff: None lines
Changed in percona-xtrabackup: | |
assignee: | nobody → Aleksandr Kuzminsky (akuzminsky) |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in percona-xtrabackup: | |
status: | Confirmed → Triaged |
Changed in percona-xtrabackup: | |
status: | Triaged → In Progress |
status: | In Progress → Fix Committed |
Changed in percona-xtrabackup: | |
status: | Fix Committed → Fix Released |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PXB-537