X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=handlers%2Fmysql.in;h=39c1fb9c2729819b5d80f86873d910f0f808917c;hb=cde6d7f672aa62f5e6f42be343b0299f2e3d4cbf;hp=d22ef26c99d4cd926bffd3c7f32297664f08702f;hpb=e8db349a5b2af6ffb9004ef6eed9cb9d3aa57231;p=matthijs%2Fupstream%2Fbackupninja.git diff --git a/handlers/mysql.in b/handlers/mysql.in index d22ef26..39c1fb9 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -161,7 +161,11 @@ else debug "User home set to: $userhome" [ -f $userhome/.my.cnf ] || fatal "Can't find config file in $userhome/.my.cnf" - defaultsfile="--defaults-extra-file=$userhome/.my.cnf" + if [ $usevserver = yes ]; then + defaultsfile="--defaults-extra-file=$vuserhome/.my.cnf" + else + defaultsfile="--defaults-extra-file=$userhome/.my.cnf" + fi debug "using $defaultsfile" fi @@ -178,7 +182,7 @@ then info "dbhost: $dbhost" execstr="$VSERVER $vsname exec $MYSQLHOTCOPY -h $dbhost --quiet --allowold --regexp /.\*/./.\*/ $hotdir" else - execstr="$MYSQLHOTCOPY --quiet --allowold --regexp /.\*/./.\*/ $hotdir" + execstr="$MYSQLHOTCOPY -h $dbhost --quiet --allowold --regexp /.\*/./.\*/ $hotdir" fi debug "su $user -c \"$execstr\"" if [ ! $test ] @@ -199,9 +203,9 @@ then do if [ $usevserver = yes ] then - execstr="$VSERVER $vsname exec $MYSQLHOTCOPY --allowold $db $hotdir" + execstr="$VSERVER $vsname exec $MYSQLHOTCOPY -h $dbhost --allowold $db $hotdir" else - execstr="$MYSQLHOTCOPY --allowold $db $hotdir" + execstr="$MYSQLHOTCOPY -h $dbhost --allowold $db $hotdir" fi debug 'su $user -c \"$execstr\"' if [ ! $test ]