PolarDB for MySQL provides multiple methods to help you restore data that is accidentally deleted in different scenarios. The scenarios may involve different engine versions. This topic describes common scenarios in which data is accidentally deleted. You can use the appropriate method to restore data based on actual scenarios.

Scenario Database engine version Restoration method
Accidental table deletion 5.6 You can perform a table level restoration to restore tables. You can restore data to a point in time or restore data from a backup set.
5.7
8.0 If the table recycle bin feature is enabled for the cluster, you can restore tables from Recycle Bin. For more information, see Restore a table from Recycle Bin. Otherwise, you can perform table or database level restorations to restore the cluster.
Accidental database deletion 5.6 You can perform a table level recovery to restore tables or a database level recovery to restore databases. You can restore data to a point in time or restore data from a backup set.
5.7
8.0
Accidental cluster deletion 5.6 Restore a cluster from Cluster Recycle
5.7
8.0
Accidental data deletion. For example, accidental overwrite of all data, and accidental deletion or modification of columns, rows, or cells. The number of affected data entries does not exceed 100,000 We recommend that you Use the data tracking feature of DMS to restore data. You can also perform a table level restoration, a database level restoration, or a cluster level restoration to restore data.
The number of affected data entries exceeds 100,000 5.6 You can perform a table level restoration to restore tables or a database level restoration to restore databases. You can restore data to a point in time or restore data from a backup set.

If you cannot determine the number of affected databases and tables, you can perform a cluster level restoration.

5.7
8.0