tecrahul / mydumpadmin

Advance MySQL Database Backup Script
96 stars 55 forks source link

Added the --single-transaction flag to mysqldump #4

Closed opmat closed 3 years ago

opmat commented 3 years ago

The --single-transaction flag was added to mysqldump command. Without this option, the database becomes unusable for the period of the backup, which is not ideal in a Live environment The --single-transaction flag will start a transaction before running. Rather than lock the entire database, this will let mysqldump read the database in the current state at the time of the transaction, making for a consistent data dump.