# Large MySQL database backup consistency

What will happen for example I start mysqldump 04:00 and 04:05 somebody adds some data to that database?

The backup process works in transactions. Meaning that at the start of a backup transaction that snapshot of data will be included. These transaction are very small ones that do not include the whole database - which means that, the data added in the 5th minute may be included in the running dump and it is not necessarily limited to everything before 04:00.

What you can expect however, that, each four hours (since that is the schedule you set) you will have a database dump that includes 100% of the data at the time the backup was started.

If you want to decrease this window, you may have more frequent backups.

Note that exporting a large MySQL database does not necessarily need a lot of time as this depends on the machine that you use to dump the database. For example, I client of mine has a 45GB MySQL database running on RDS, it takes less than 20 mins on average to completed + upload the dump.

Last Updated: 9/23/2022, 4:15:20 PM