Merge pull request #6 from sevenval/fix_missing_use_statement

Fixes missing USE statement in SQL dump
This commit is contained in:
Fco. Javier Delgado del Hoyo 2017-09-11 09:48:56 +02:00 committed by GitHub
commit 6a7ecda5fe

2
backup.sh Normal file → Executable file
View 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