mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2025-01-18 16:22:33 +01:00
Merge pull request #6 from sevenval/fix_missing_use_statement
Fixes missing USE statement in SQL dump
This commit is contained in:
commit
6a7ecda5fe
1 changed files with 1 additions and 1 deletions
2
backup.sh
Normal file → Executable file
2
backup.sh
Normal file → Executable file
|
@ -11,7 +11,7 @@ do
|
||||||
then
|
then
|
||||||
echo "Dumping database: $db"
|
echo "Dumping database: $db"
|
||||||
FILENAME=/backup/$DATE.$db.sql
|
FILENAME=/backup/$DATE.$db.sql
|
||||||
if mysqldump -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" "$db" > "$FILENAME"
|
if mysqldump -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" --databases "$db" > "$FILENAME"
|
||||||
then
|
then
|
||||||
gzip -f "$FILENAME"
|
gzip -f "$FILENAME"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue