ApsaraDB RDS for MySQL offers both standard and fast database and table restoration. You can restore specific databases or tables from a backup set or to a specific point in time, to either the original instance or a new one. This method avoids a full data restore, making it ideal for tasks like quickly recovering from user errors or analyzing historical data.
Differences in database and table restoration modes
Two restoration modes are available for individual databases and tables: standard and fast. The fast restoration for individual databases and tables feature uses a performance-type sandbox instance and is 50% to 95% faster than standard restoration for the same data volume. To use the fast restoration feature, you must first enable the feature and then restore data from the backup sets created after the feature is enabled to an original or new instance.
For more information, see Overview of data restoration solutions (comparison of restoration speeds).
Item | Standard restoration | Fast restoration |
Restoration range | Restores specified databases and tables in an instance. | Restores specified databases and tables in an instance. |
Restoration destination |
|
|
Restoration speed | The restoration speed depends on the data volume and is relatively slow. | The restoration speed depends on the data volume. This method is approximately 50% to 95% faster than standard restoration. |
Restoration method | Supports restoration from a |
|
After you enable log backup, you can perform
point-in-time recoveryto any point within thelog backupretention period. Iflog backupis not enabled, you can restore data only to the time points of existingdata backups.The available restoration time range depends on factors such as the
retention periodsforlog backupsanddata backups, and when you enable the restoration feature. The maximumretention periodfor bothlog backupsanddata backupsis 730 days. You can call the DescribeLocalAvailableRecoveryTime API operation to query the available recovery time range.
Prerequisites
Standard recovery
Fast recovery
Your RDS instance must meet the following requirements:
Major version: 8.0, 5.7, or 5.6
Edition: high-availability edition
Storage type: local SSD (Fast database and table recovery is not supported for instances that use cloud disks.)
Storage engine: InnoDB
Billing method: pay-as-you-go or subscription (This feature is not supported for Serverless instances.)
Instance region: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Hohhot), or China (Shenzhen)
NoteYou can view this information on the Basic Information page of the instance.
If you use the Database Backup Service (DBS) for the first time, you must authorize the service-linked role for DBS (AliyunServiceRoleForDBS).
The capacity-based sandbox feature must be disabled for the instance. If it is enabled, disable it first.
NoteIf you enable fast database and table recovery on an instance with an active capacity-based sandbox, the system upgrades the sandbox to a performance-based sandbox. This increases disaster recovery costs.
Ensure that the fast database and table recovery feature is enabled for the instance.
On the instance details page, go to the Backup and Recovery page. On the Backup Policy tab, check the status of the fast database and table recovery feature. If the feature is disabled, enable Fast Database and Table Recovery For more information, see 1. Enable fast database and table recovery.
ImportantBackup sets created before you enable this feature do not support this type of recovery. You must perform a manual full backup after you enable the feature. Then, use subsequent backup sets for recovery.
If necessary, you can also refer to Restore Full Data.
Considerations
Enabled by default:
The standard database and table recovery feature is enabled by default for new instances and cannot be disabled.
A restoration task cannot be paused or canceled once it starts.
Log backup requirements:
Point-in-time recovery requires that log backup is enabled for the instance. If log backup is not enabled, fast database and table recovery will fail.
Primary/secondary switchover and service interruption:
For instances that use high-performance local disks:
Restoring data to the original instance triggers a primary/secondary switchover, which may cause a service interruption of 30 to 120 seconds. Ensure your application has an automatic reconnection mechanism.
Restoring data to a new instance does not trigger a primary/secondary switchover.
For instances that use cloud disks:
Restoring data to the original instance does not trigger a primary/secondary switchover, but it may affect the performance of the original instance or even cause an instance switchover.
A full backup is created after the restoration is complete.
Limitations
Database and table restoration limitations (standard/fast):
You can restore data only from databases and tables that use the InnoDB storage engine. Restoration from the X-Engine storage engine is not supported.
Partitioned tables, views, and stored procedures are not supported. To restore these objects, use the full data restoration feature.
You cannot restore a table if the relevant
binlogs contain a rename operation for the table, or if the table has agenerated column.Constraint restoration: database and table restoration supports restoring
primary keys,unique indexes, and regular indexes (INDEX/KEY), but notforeign key constraints,triggers, orfull-text indexes (FULLTEXT INDEX).ImportantThe restoration process automatically removes
foreign key constraints to ensure it succeeds. If you requireforeign key constraints, you must manually recreate them after the restoration is complete.
Table count limitations:
For
database and table restorationto succeed, aninstancemust have 50,000 or fewer tables.Restoration may take significantly longer depending on the data volume, the number of databases and tables to restore, and the number of
binlogs processed for the specified time range.
Limitations for fast database and table restoration:
For an
instancethat uses high-performance local disks, you can restore data only to the originalinstance, not to a new one.You cannot use
fast database and table restorationon aninstanceif it has aread-only node, usesTransparent Data Encryption (TDE), or does not havelog backupenabled.
Billing
Standard recovery
Fast recovery
The fast database and table recovery feature is available in free and paid editions for instances that use local SSD, but is not supported for instances that use cloud disk.
Free edition: No charges are incurred. You can restore data from a backup set or to the latest full backup point-in-time.
Paid edition: Pay-as-you-go. You are charged $0.008 per GB per day. You can restore data from a backup set or to any point in time.
1. Enable Fast Database/Table Restoration
To use Fast Database/Table Restoration, first enable the feature by following the steps below. Then, use a backup set created after enabling the feature for Database/Table Restoration. This feature is available only for instances with high-performance local disks that meet the prerequisites. Enabling the feature does not affect your services.
If you only need to use standard restoration for individual databases and tables, skip this section and proceed to 2. Restore databases and tables to the original or a new instance.
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the navigation pane on the left, click Backup and Restoration.
NoteIf a billing dialog box for Fast Database/Table Restoration appears, select the Do not show again. checkbox and then enable the free or paid edition as needed. If the dialog box does not appear, proceed with the following steps.
On the Backup and Restoration page, click the Backup Strategy tab.
In the Basic Backup section, click Edit and set Fast Database/Table Restoration to Enabled.
Configure CDM Billing Method and CDM Retention Period. This feature is available in a free edition and a paid edition:
Free edition: Supports restoration from a backup set only. Set CDM Billing Method to Previous Full Backup Point in Time (Free Edition). The retention period for restored data is one day.
Paid edition: Supports restoration from a backup set or to a specific point in time (requires log backup to be enabled in advance). Set CDM Billing Method to Any Point in Time (Paid Edition). You can set the data retention period from 1 to 730 days.
Click OK.
2. Restore databases and tables to the original or a new instance
Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the navigation pane on the left, click Backup and Restoration, and then click Restore Individual Database/Table.
NoteIf the Restore Individual Database/Table button is not displayed in the console, check whether the requirements in the Prerequisites section are met.
If the console does not respond after you click the Restore Individual Database/Table button, clear the browser cache and try again.
If a message indicates insufficient storage capacity, you can first expand the storage capacity and then retry the restoration.
Configure the restoration destination and method.
Parameter
Description
Restore to
Restore to original instance
Restore to new instance (available only for instances that use high-performance local disks): The system creates a new RDS instance. This process does not affect the original instance.
After you verify the data on the new instance, you can also migrate the data back to the original instance.
Restore speed
Standard
Fast (supported only when you restore data to the original instance): This option increases the restoration speed by 50% to 95%. For more information, see Emergency recovery for ApsaraDB RDS for MySQL.
Restore method
By backup set
By time (requires log backups to be enabled): The system first restores data from a full backup and then applies incremental log backups to restore the instance to a specific point in time. You can select any point in time within the log backup retention period. To view or modify the log backup retention period, see Automatic backup.
For example, if the data backup and log backup retention periods of an RDS instance are both seven days, you can restore data from up to seven days ago. Backup sets older than seven days are deleted and cannot be used for restoration.
NoteThe free edition of the fast restoration feature does not support point-in-time recovery. It only supports restoration from a backup set.
Select the databases or tables that you want to restore, specify new names for the restored databases or tables, and then click OK.
NoteYou can select a maximum of 50 databases or tables at a time.
When you restore data to the original instance, the existing data on the original instance is not affected. Restored databases require unique names, while restored tables can reuse existing names. By default, the system appends _backup to the restored database's name, which you can then modify.
When restoring data to the original instance, ensure the instance has enough available storage capacity for the selected databases and tables.
If you perform a standard restoration and select Restore to new instance for an instance that uses high-performance local disks, you must select a billing method and configure the parameters for the new instance.
Subscription: You must pay for the instance when you create it. This billing method is suitable for long-term use.
Pay-as-you-go: You are charged on an hourly basis. This billing method is suitable for short-term use. You can release the instance at any time to reduce costs.
Parameter
Description
Zone
A zone is an independent physical area within a region. There are no substantial differences between zones.
You can create the RDS instance in the same zone as an ECS instance or in a different zone.
NoteThe new instance must be in the same region as the original instance. You cannot change the region.
Instance type
Each instance type provides a specific number of vCPUs, memory size, maximum number of connections, and maximum IOPS.
Storage capacity
The storage capacity includes space for data, system files, log files, and transaction files.
Network type
VPC (default). A VPC is an isolated network environment that provides higher security and performance than Classic Network.
You can view the progress of the database and table restoration or the creation of the new instance on the Tasks page.
Limitations
-
A restoration task cannot be suspended or interrupted after it starts.
-
Only one restoration task can run at a time. If you start another restoration task while one is already in progress, the following error is returned:
The operation failed. The RDS instance is not in a ready state.Wait for the current task to complete before starting another. -
If read-only instances are attached to the primary instance and a restoration task is in progress, the system automatically synchronizes data from the primary instance to all read-only instances after the restoration task is complete. This ensures data consistency between the primary and secondary instances.
-
Connect to the RDS for MySQL instance to view the data that is restored to the original or new instance.
NoteMake sure that the account that you use to connect to the instance has the permissions to view or manage databases. We recommend using a privileged account.
If you use DMS to connect to the RDS for MySQL instance, you must right-click the instance and select Refresh / Sync Dictionary after the restoration is complete. The new database will then appear in the list.
You can use DTS to migrate the data from the new instance back to the original.
Related operations
Correcting online data
Destination | Correction method |
Original instance | Use the |
New instance | After the data is restored to the new instance, you can use Data Transmission Service (DTS) to Migrate data between ApsaraDB RDS for MySQL instancesto the source instance to update the data on the source instance. Note When you create a data migration task, specify the restored new instance as the source and the source instance as the destination. For both the source and destination, select Alibaba Cloud instance as the Access method. |
Disable fast database/table restoration
Disabling Fast Database/Table Restoration does not affect standard database and table restoration.
Go to the Backup and Restoration page of the instance. On the Backup Strategy tab, click Edit next to Basic Backup, and then set Fast Database/Table Restoration to Disabled.

Change the fast restoration edition to reduce costs
You can change Fast Database/Table Restoration to the free edition to reduce costs. With the free edition, you can restore data only from a backup set or to the most recent full backup point in time; restoring to an arbitrary point in time is not supported.
Go to the Backup and Restoration page of the instance. On the Backup Strategy tab, click Edit next to Basic Backup, and then set CDM Billing Method to Previous Full Backup Point in Time (Free Edition).

Related APIs
API | Description |
Restores a database or table to the original instance. | |
Clones a database or table from an RDS instance to a new instance. | |
Queries the recoverable time range for an RDS instance from its backups. |