feat: order mysql arguments
This commit is contained in:
parent
c477fb7544
commit
237b2e786e
1 changed files with 10 additions and 10 deletions
|
|
@ -47,25 +47,25 @@ if [ -f "$BACKUP_FILE" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# perform database dump with optimized settings for minimal locking
|
# perform database dump with optimized settings for minimal locking
|
||||||
# --single-transaction: Uses consistent read for InnoDB tables
|
# --extended-insert: Use multiple-row INSERT syntax for faster restores
|
||||||
# --routines: Include stored procedures and functions
|
|
||||||
# --triggers: Include triggers
|
|
||||||
# --lock-tables=false: Don't lock tables (relies on single-transaction)
|
# --lock-tables=false: Don't lock tables (relies on single-transaction)
|
||||||
# --quick: Retrieve rows one at a time rather than buffering entire result set
|
# --quick: Retrieve rows one at a time rather than buffering entire result set
|
||||||
# --extended-insert: Use multiple-row INSERT syntax for faster restores
|
# --routines: Include stored procedures and functions
|
||||||
|
# --single-transaction: Uses consistent read for InnoDB tables
|
||||||
|
# --triggers: Include triggers
|
||||||
mysqldump \
|
mysqldump \
|
||||||
-h "$MYSQL_HOST" \
|
-h "$MYSQL_HOST" \
|
||||||
-P "$MYSQL_PORT" \
|
-P "$MYSQL_PORT" \
|
||||||
-u "$MYSQL_USER" \
|
-u "$MYSQL_USER" \
|
||||||
-p"$MYSQL_PASS" \
|
-p"$MYSQL_PASS" \
|
||||||
--single-transaction \
|
|
||||||
--routines \
|
|
||||||
--triggers \
|
|
||||||
--lock-tables=false \
|
|
||||||
--quick \
|
|
||||||
--extended-insert \
|
|
||||||
--no-tablespaces \
|
|
||||||
--default-character-set=utf8mb4 \
|
--default-character-set=utf8mb4 \
|
||||||
|
--extended-insert \
|
||||||
|
--lock-tables=false \
|
||||||
|
--no-tablespaces \
|
||||||
|
--quick \
|
||||||
|
--routines \
|
||||||
|
--single-transaction \
|
||||||
|
--triggers \
|
||||||
"$DATABASE_NAME" > "$TEMP_BACKUP_FILE"
|
"$DATABASE_NAME" > "$TEMP_BACKUP_FILE"
|
||||||
|
|
||||||
# check if mysqldump completed successfully
|
# check if mysqldump completed successfully
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue