mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2025-01-18 16:22:33 +01:00
Merge pull request #43 from hasechris/master
Add --single-transaction argument to mysqldump
This commit is contained in:
commit
ad684b3008
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ do
|
|||
echo "==> Dumping database: $db"
|
||||
FILENAME=/backup/$DATE.$db.sql
|
||||
LATEST=/backup/latest.$db.sql.gz
|
||||
if mysqldump -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" $db $MYSQLDUMP_OPTS > "$FILENAME"
|
||||
if mysqldump --single-transaction -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" $db $MYSQLDUMP_OPTS > "$FILENAME"
|
||||
then
|
||||
gzip "-$GZIP_LEVEL" -f "$FILENAME"
|
||||
echo "==> Creating symlink to latest backup: $(basename "$FILENAME".gz)"
|
||||
|
|
Loading…
Reference in a new issue