mysql handler should quote filenames
The mysql handler doesn't deal well with shell metacharacters in database names.
Therefore, we are having errors like this:
jan 20 04:19:04 Warning: bash: 1: ambiguous redirect jan 20 04:19:04 Warning: Failed to dump mysql databases foo?blog
Here's a simple patch to the mysql handler:
--- mysql.orig 2009-01-20 10:31:17.000000000 -0500 +++ mysql 2009-01-20 10:32:09.000000000 -0500 @@ -281,9 +281,9 @@ fatal "Either you have an authentication problem, or mysqld doesn't appear to be running!" fi if [ "$compress" == "yes" ]; then - execstr="$DUMP | $GZIP > $dumpdir/${db}.sql.gz" + execstr="$DUMP | $GZIP > '$dumpdir/${db}.sql.gz'" else - execstr="$DUMP -r $dumpdir/${db}.sql" + execstr="$DUMP -r '$dumpdir/${db}.sql'" fi fi debug "su $user -c \"$execstr\""
(from redmine: created on 2009-01-20, closed on 2009-12-25)