Instance and table restoration is a process of restoring a specified instance or table of a cluster. For example, if you are the database administrator of a games company, you can use the database and table restoration feature to restore the data of a player or a group of players. An instance or a table can be restored from a backup set or to a point in time. This topic describes how to restore the data of a database or table to a previous point in time.
- Only PolarDB Cluster Edition supports database and table restoration, and one of the following clusters must be used:
- A cluster of PolarDB for MySQL 5.6 whose minor version of the kernel is 184.108.40.206.25 or later. For more information, see Upgrade the cluster version.
- A cluster of PolarDB for MySQL 5.7 whose minor version of the kernel is 220.127.116.11.8 or later.
- A cluster of PolarDB for MySQL 8.0 whose minor version of the kernel is 18.104.22.168.14 or later. Note Database and table restoration is not supported on clusters of PolarDB for MySQL 8.0.2.
- PolarDB Single-node Edition, X-Engine Edition and Multi-master Cluster (Database/Table) Edition clusters do not support the database and table restoration feature.
- Database and table restoration is not supported on clusters with transparent data encryption (TDE) enabled.
- Clusters in the Global Database Network (GDN) do not support the database and table restoration feature.
- You can restore only specified tables, so you must confirm that you have selected all the tables that you want to restore. Note If you cannot determine which tables to restore, we recommend that you restore all the data of your cluster to a new cluster and then migrate the data back to the original cluster. For more information, see Method 1 for cluster restoration: Restore from a backup set and Method 2 for full restoration: point-in-time restoration.
- If the specified tables are deleted during the time period between the generation of the last backup set and the specified time, you cannot restore the data by Backup Timepoint.
- You can restore up to 100 tables at a time. If you choose to restore an instance, all tables in the instance can be restored. Note To restore a large number of tables, we recommend that you restore all data of your cluster to a new cluster. For more information, see Method 1 for cluster restoration: Restore from a backup set and Method 2 for full restoration: point-in-time restoration.
- The instance and table restoration feature only applies to clusters that have no more than 50,000 tables.
- The instance and table restoration feature does not restore triggers. If the original table has a trigger, the trigger will not be restored.
- The instance and table restoration feature does not restores foreign keys. If the original table has a foreign key, the foreign key will not be restored.
- Log on to the PolarDB console.
- In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
- Find the cluster and click the cluster ID.
- In the left-side navigation pane, choose .
- On the Backup and Restore page, click Restore Databases/Tables.
- In the dialog box that appears, set Restore Type to Backup Timepoint and configure Restoration Time. Note The point in time specified by Restore To must fall within the time range that is specified by Restoration Time. The full backup set that is most recent to the specified point in time must contain the table that you want to restore. This way, the Backup Timepoint restore type can be used. The time range specified by the Restore To parameter is determined by the value of Log Retention Period (Days). The default value of the Log backup retention parameter is 7 days.
- In the Databases and Tables to Restore section, select a database to restore in the left and then select tables to restore in the right. Note
- If you select no tables after you select a database, all data in the database is restored.
- After you select a database or a table, the system specifies the
_backupsuffix in the name of the original database or the original table to name the new database or the new table. For example, if the name of the original table is
test, the new table is named
test_backup. You can customize names for new databases and new tables.
- Click OK.
Related API operations
|DescribeMetaList||You can call the DescribeMetaList operation to query the metadata of the instance or table that you want to restore.|
|RestoreTable||You can call the RestoreTable operation to restore the instances or tables of a PolarDB cluster.|