File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ case "$1" in
2626 fi
2727
2828 logMsg " Starting MySQL backup..."
29- MYSQL_ROOT_PASSWORD=$( dockerExecMySQL bash -c ' printf $ MYSQL_ROOT_PASSWORD' )
29+ MYSQL_ROOT_PASSWORD=$( dockerExecMySQL printenv MYSQL_ROOT_PASSWORD)
3030 dockerExecMySQL mysqldump -h mysql -u root -p" ${MYSQL_ROOT_PASSWORD} " --opt --single-transaction --events --all-databases --routines --comments | bzip2 > " ${BACKUP_DIR} /${BACKUP_MYSQL_FILE} "
3131 logMsg " Finished"
3232 else
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ case "$1" in
2222 if [[ -n " $( dockerContainerId mysql) " ]]; then
2323 if [ -f " ${BACKUP_DIR} /${BACKUP_MYSQL_FILE} " ]; then
2424 logMsg " Starting MySQL restore..."
25- MYSQL_ROOT_PASSWORD=$( dockerExecMySQL bash -c ' printf $ MYSQL_ROOT_PASSWORD' )
25+ MYSQL_ROOT_PASSWORD=$( dockerExecMySQL printenv MYSQL_ROOT_PASSWORD)
2626 bzcat " ${BACKUP_DIR} /${BACKUP_MYSQL_FILE} " | dockerExecMySQL mysql -h mysql -u root -p" ${MYSQL_ROOT_PASSWORD} "
2727 echo " FLUSH PRIVILEGES;" | dockerExec mysql -h mysql -u root -p" ${MYSQL_ROOT_PASSWORD} "
2828 logMsg " Finished"
You can’t perform that action at this time.
0 commit comments