aboutsummaryrefslogtreecommitdiff
path: root/handlers/mysql.in
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2009-12-25 02:33:13 +0100
committerintrigeri <intrigeri@boum.org>2009-12-25 02:33:13 +0100
commitf4ab3148f175f8ac415b01fea61d14a80f4de969 (patch)
tree016ed43a30dfd15ef6e2e3df26f4161e52e6c57b /handlers/mysql.in
parent5da707b309c08de3fa7d3792d98f337eb5169141 (diff)
downloadbackupninja-f4ab3148f175f8ac415b01fea61d14a80f4de969.tar.gz
backupninja-f4ab3148f175f8ac415b01fea61d14a80f4de969.tar.bz2
mysql, pgsql: Quote output filenames
... to support shell meta-characters in database names. Closes Redmine bug #617.
Diffstat (limited to 'handlers/mysql.in')
-rw-r--r--handlers/mysql.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/handlers/mysql.in b/handlers/mysql.in
index e1e89b0..0aa3abb 100644
--- a/handlers/mysql.in
+++ b/handlers/mysql.in
@@ -272,9 +272,9 @@ then
fatal "mysqld doesn't appear to be running!"
fi
if [ "$compress" == "yes" ]; then
- execstr="$VSERVER $vsname exec $DUMP | $GZIP --rsyncable > $vroot$dumpdir/${db}.sql.gz"
+ execstr="$VSERVER $vsname exec $DUMP | $GZIP --rsyncable > '$vroot$dumpdir/${db}.sql.gz'"
else
- execstr="$VSERVER $vsname exec $DUMP -r $vroot$dumpdir/${db}.sql"
+ execstr="$VSERVER $vsname exec $DUMP -r '$vroot$dumpdir/${db}.sql'"
fi
else
# Test to make sure mysqld is running, if it is not sqldump will not work
@@ -283,9 +283,9 @@ then
fatal "mysqld doesn't appear to be running!"
fi
if [ "$compress" == "yes" ]; then
- execstr="$DUMP | $GZIP --rsyncable > $dumpdir/${db}.sql.gz"
+ execstr="$DUMP | $GZIP --rsyncable > '$dumpdir/${db}.sql.gz'"
else
- execstr="$DUMP -r $dumpdir/${db}.sql"
+ execstr="$DUMP -r '$dumpdir/${db}.sql'"
fi
fi
debug "su $user -c \"$execstr\""