From: Matthijs Kooijman Date: Thu, 1 Jan 2009 19:07:35 +0000 (+0100) Subject: mysql: Pass -h $dbhost to mysqlhotcopy consistently. X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=commitdiff_plain;h=cde6d7f672aa62f5e6f42be343b0299f2e3d4cbf mysql: Pass -h $dbhost to mysqlhotcopy consistently. r281 introduced the -h $dbhost option, but only when dumping all databases in a vserver. This change also uses -h when running mysqlhotcopy on the host and on individual databases. --- diff --git a/handlers/mysql.in b/handlers/mysql.in index 3a908f6..39c1fb9 100644 --- a/handlers/mysql.in +++ b/handlers/mysql.in @@ -182,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 ] @@ -203,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 ]