Fix minor errors.

This commit is contained in:
Christoph 2018-01-23 03:58:02 +01:00
parent ca6f2e18a2
commit 62e29d5100
2 changed files with 12 additions and 7 deletions

View File

@ -74,7 +74,11 @@ err_Log=${LOCK_DIR}/mysql.err.log
# -------------------- Variable --------------------- #
#
_backupDestArchiveDir="${script_backup_dir}/MySQL-${mysql_version}"
if [[ -n ${mysql_version} ]]; then
_backupDestArchiveDir="${script_backup_dir}/MySQL-${mysql_version}"
else
_backupDestArchiveDir="${script_backup_dir}/MySQL"
fi
if [ $srcHost != "localhost" ] || $_via_ssh_tunnel ;then
@ -329,6 +333,12 @@ if $ARCHIVE ;then
## -
for i in $DATABASES ; do
if [ "$destHost" = "localhost" ]; then
if [ ! -d ${_backupDestArchiveDir}/${i} ] ; then
$mkdir -p ${_backupDestArchiveDir}/${i}
fi
fi
## ------------------------------------
## - Save Functions seperatly if exists
## -
@ -495,12 +505,6 @@ if $ARCHIVE ;then
mysqldump_flags="$mysqldump_flags --events"
fi
if [ "$destHost" = "localhost" ]; then
if [ ! -d ${_backupDestArchiveDir}/${i} ] ; then
$mkdir -p ${_backupDestArchiveDir}/${i}
fi
fi
info_msg="save database $i.."
echononl "\t$info_msg"
if [ $srcHost != "localhost" ] || $_via_ssh_tunnel ;then

View File

@ -198,6 +198,7 @@ fi
## -
if $manual ; then
host_scripts="${hosts_base_dir}/localhost.sh"
host_scripts="${hosts_base_dir}/www2.oopen.de.sh"
else
host_scripts=`$find $hosts_base_dir -maxdepth 1 -type f -perm -700 | $sort`
fi