fix issue with multiple dump extra options

mysqldump will fail if the env variable has multiple options, 

issue: https://github.com/fradelg/docker-mysql-cron-backup/issues/72
This commit is contained in:
Motaz Abuthiab 2022-02-22 08:49:54 +01:00 committed by GitHub
parent 42312b94a3
commit db6014ab1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ do
echo "==> Dumping database: $db"
FILENAME=/backup/$DATE.$db.sql
LATEST=/backup/latest.$db.sql
if mysqldump --single-transaction "$MYSQLDUMP_OPTS" -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" "$db" > "$FILENAME"
if mysqldump --single-transaction $MYSQLDUMP_OPTS -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" "$db" > "$FILENAME"
then
EXT=
if [ -z "${USE_PLAIN_SQL}" ]