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
|
||||
|
||||
# perform database dump with optimized settings for minimal locking
|
||||
# --single-transaction: Uses consistent read for InnoDB tables
|
||||
# --routines: Include stored procedures and functions
|
||||
# --triggers: Include triggers
|
||||
# --extended-insert: Use multiple-row INSERT syntax for faster restores
|
||||
# --lock-tables=false: Don't lock tables (relies on single-transaction)
|
||||
# --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 \
|
||||
-h "$MYSQL_HOST" \
|
||||
-P "$MYSQL_PORT" \
|
||||
-u "$MYSQL_USER" \
|
||||
-p"$MYSQL_PASS" \
|
||||
--single-transaction \
|
||||
--routines \
|
||||
--triggers \
|
||||
--lock-tables=false \
|
||||
--quick \
|
||||
--extended-insert \
|
||||
--no-tablespaces \
|
||||
--default-character-set=utf8mb4 \
|
||||
--extended-insert \
|
||||
--lock-tables=false \
|
||||
--no-tablespaces \
|
||||
--quick \
|
||||
--routines \
|
||||
--single-transaction \
|
||||
--triggers \
|
||||
"$DATABASE_NAME" > "$TEMP_BACKUP_FILE"
|
||||
|
||||
# check if mysqldump completed successfully
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue