From cce079c3ba5ae1c31e614edd4fd90c324d437a86 Mon Sep 17 00:00:00 2001 From: Guillaume CAMUS Date: Mon, 16 Jan 2017 12:09:10 +0100 Subject: [PATCH] :ambulance: Fix Mysl restore cmd --- bin/restore.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/restore.sh b/bin/restore.sh index 66a08da..83f3d1d 100755 --- a/bin/restore.sh +++ b/bin/restore.sh @@ -22,8 +22,9 @@ case "$1" in if [[ -n "$(dockerContainerId mysql)" ]]; then if [ -f "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" ]; then logMsg "Starting MySQL restore..." - bzcat "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" | dockerExec mysql - echo "FLUSH PRIVILEGES;" | dockerExec mysql + source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../etc/environment.yml" + bzcat "${BACKUP_DIR}/${BACKUP_MYSQL_FILE}" | dockerExec mysql -h mysql -u root -p"${MYSQL_ROOT_PASSWORD}" + echo "FLUSH PRIVILEGES;" | dockerExec mysql -h mysql -u root -p"${MYSQL_ROOT_PASSWORD}" logMsg "Finished" else errorMsg "MySQL backup file not found"