diff --git a/bin/restore.sh b/bin/restore.sh index ac74277..75d2ef3 100644 --- a/bin/restore.sh +++ b/bin/restore.sh @@ -225,8 +225,9 @@ function restore_logical() BACKUP_MODUMP_DIRNAME=`dirname "${BACKUP_MOBR_PATH}"` add_log "I" "Restore begins, please wait" - if MYSQL_PWD="${M_PW}" mysql -h"${MO_HOST}" -P"${MO_PORT}" -u"${MO_USER}" "${dbname_option}" < ${} - cmd="mysql -u$}" + #todo + #if MYSQL_PWD="${M_PW}" mysql -h"${MO_HOST}" -P"${MO_PORT}" -u"${MO_USER}" "${dbname_option}" < ${} + #cmd="mysql -u$}" add_log "D" "cmd: cd ${BACKUP_MOBR_DIRNAME} && ${cmd}" diff --git a/bin/set_conf.sh b/bin/set_conf.sh index 479eef6..ea22712 100644 --- a/bin/set_conf.sh +++ b/bin/set_conf.sh @@ -44,7 +44,7 @@ function set_kv() case "${key}" in # 2.1 enum list #"TOOL_LOG_LEVEL"| "MO_DEPLOY_MODE"| "MO_SERVER_TYPE"| "MO_CONTAINER_AUTO_RESTART"| "CSV_CONVERT_TYPE"| "CSV_CONVERT_TN_TYPE"| "CSV_CONVERT_INSERT_ADD_QUOTE"| "BACKUP_TYPE"| "BACKUP_S3_IS_MINIO"| "BACKUP_LOGICAL_DATA_TYPE"| "BACKUP_LOGICAL_ONEBYONE") - #"TOOL_LOG_LEVEL"| "MO_DEPLOY_MODE" | "MO_CONTAINER_AUTO_RESTART"| "CSV_CONVERT_TYPE"| "CSV_CONVERT_TN_TYPE"| "CSV_CONVERT_INSERT_ADD_QUOTE"| "BACKUP_TYPE"| "BACKUP_S3_IS_MINIO"| "BACKUP_LOGICAL_DATA_TYPE"| "BACKUP_LOGICAL_ONEBYONE") + "TOOL_LOG_LEVEL"| "MO_DEPLOY_MODE" | "MO_CONTAINER_AUTO_RESTART"| "CSV_CONVERT_TYPE"| "CSV_CONVERT_TN_TYPE"| "CSV_CONVERT_INSERT_ADD_QUOTE"| "BACKUP_TYPE"| "BACKUP_S3_IS_MINIO"| "BACKUP_LOGICAL_DATA_TYPE"| "BACKUP_LOGICAL_ONEBYONE") enum_list=`eval echo '$'"ENUM_$key"` enum_list_2=`echo "${enum_list}" | sed "s/,/\|/g"` diff --git a/install.sh b/install.sh index 2381eb5..cf0bdd3 100644 --- a/install.sh +++ b/install.sh @@ -150,8 +150,9 @@ function install() #fi fi - add_log "I" "Try to install mo_ctl from file ${pkg}" - if unzip -o mo_ctl.zip && mv ./mo_ctl_standalone-main/ ${mo_ctl_local_path} && chmod +x ${mo_ctl_local_path}/mo_ctl.sh; then + add_log "I" "Try to install mo_ctl from file ${pkg}" + pkg_prefix=`echo "mo_ctl_standalone_dev.zip" | awk -F '.' '{print $1}'` + if unzip -o ${pkg} && mv ./${pkg_prefix} ${mo_ctl_local_path} && chmod +x ${mo_ctl_local_path}/mo_ctl.sh; then add_log "I" "Successfully extracted mo_ctl file to ${mo_ctl_local_path}" else add_log "E" "Failed to extract file, please check if 'unzip' is installed or file is complete"