else
info "No vserver name specified, actions will be performed on the host."
fi
+else
+ [ -z "$vsname" ] || warning 'vservers support disabled in backupninja.conf, vsname configuration line will be ignored'
fi
## Prepare ignore part of the command
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
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 ]
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 ]