Unlock the Power of AI

1 million free tokens

88% Price Reduction

Activate Now

How to restore data that is deleted or modified accidentally

Updated at: 2025-02-10 05:58

PolarDB for MySQL clusters provide various methods for restoring accidentally deleted or modified data. The method may vary based on the data level and database engine version. Select a method based on your business requirements.

Scenario

Database engine version

Restoration method

Scenario

Database engine version

Restoration method

Accidental table deletion

5.6

You can use the database and table restoration method to restore an accidentally deleted table to a point in time or from a backup set.

5.7

8.0

If the table recycle bin feature is enabled for the cluster, you can restore the table from the recycle bin. For more information, see Restore a table from the table recycle bin. If the table recycle bin feature is disabled for the cluster, you can use the database and table restoration method to restore the entire cluster.

Accidental database deletion

5.6

You can use the database and table restoration method to restore an accidentally deleted database to a point in time or from a backup set.

5.7

8.0

Accidental cluster deletion

5.6

For information about how to restore an accidentally deleted cluster, see Restore a cluster from the cluster recycle bin.

5.7

8.0

Accidental data deletion. For example, accidental overwrite of all data, or accidental deletion or modification of columns, rows, or cells.

The number of affected data entries does not exceed 100,000

We recommend that you restore data by using the data tracking feature of DMS, or the database and table restoration or cluster restoration method.

The number of affected data entries exceeds 100,000

5.6

You can use the database and table restoration method to restore the accidentally deleted database or table to a point in time or from a backup set.

If you cannot determine the number of affected databases and tables, you can restore the entire cluster.

5.7

8.0

FAQ

What are the differences between flashback query and database and table restoration features?

  • Costs:

    • After you enable flashback query, the data required for flashback queries is retained in the undo logs for a specific period of time, which increases storage costs. The period of time for which data is retained is determined by the loose_innodb_backquery_window parameter.

  • Time required for restoration:

    • Flashback queries can be completed within seconds.

    • The amount of time required to restore a database or a table ranges from minutes to hours.

  • Restorable data levels:

    • Flashback queries can only be performed for row-level data query and are suitable for query of recent data. You can frequently perform flashback queries.

    • You cannot perform flashback queries to query data at a point in time earlier than the most recent DDL operation.

    • You can perform flashback queries to query data of up to 100,000 entries. If the data exceeds 100,000 entries, an error is returned.

    • The database and table restoration method can be used for table-level data restoration and is suitable for the restoration of large amounts of data. This method is infrequently used.

  • On this page (1, T)
  • FAQ
  • What are the differences between flashback query and database and table restoration features?
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare