Relational Database Service (MySQL)

What should I do if the backup fails due to DDL operations during the backup?

2024-06-24 09:46:41

What should I do if the backup fails due to DDL operations during the backup?

DDL is short for Data Definition Language, which mainly operates databases and defines tables. The operation of databases mainly includes creation, altering, and dropping. The MySQL full backup is based on XtraBackup. To ensure data consistency, there are metadata lock conflicts between full backups and DDL operations. As a result, backups are blocked and fail due to timeouts.

The primary/standby instances are backed up in the standby node first, and the backup fault is a historical event and not the current status. Therefore, it is necessary to check whether any DDL operation was performed in the backup time window. If so, do not perform DDL operations during backup time or adjust the backup window time as much as possible. If the operation fails, you can try manually backup or wait for the next automatic backup in the backup time window.


KWLK5eTHUmmw