diff --git a/backup.sh b/backup.sh old mode 100644 new mode 100755 index 62bfaa0..20b74fc --- a/backup.sh +++ b/backup.sh @@ -10,7 +10,7 @@ for db in $databases; do then echo "Dumping database: $db" 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 gzip -f "$FILENAME" else