All Products
Search
Document Center

ApsaraDB RDS:Restore databases and tables

Last Updated:Sep 16, 2026

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).

image

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

  • For instances that use high-performance local disks: You can restore data to the original instance or a new instance.

  • For instances that use cloud disks: You can restore data only to the original instance.

  • For instances that use high-performance local disks: You can restore data only to the original instance.

  • Instances that use cloud disks do not support fast restoration for individual databases and tables.

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 backup set and point-in-time recovery.

  • free edition: You can restore data to the time of the latest full backup.

  • paid edition: You can restore data from a backup set or perform a point-in-time recovery.

Note
  • After you enable log backup, you can perform point-in-time recovery to any point within the log backup retention period. If log backup is not enabled, you can restore data only to the time points of existing data backups.

  • The available restoration time range depends on factors such as the retention periods for log backups and data backups, and when you enable the restoration feature. The maximum retention period for both log backups and data backups is 730 days. You can call the DescribeLocalAvailableRecoveryTime API operation to query the available recovery time range.

Prerequisites

Standard recovery

Local SSDs

  • Your ApsaraDB RDS for MySQL instance must meet the following requirements:

    • Major version: 8.0, 5.7, or 5.6

    • Edition: high-availability edition or MySQL 5.7 Three-Node Enterprise Edition

    • Storage type: local SSD

    • Storage engine: InnoDB

    • Billing method: pay-as-you-go or subscription (This feature is not supported for Serverless instances.)

    Note

    You can view this information on the Basic Information page of the instance.

  • The instance must have fewer than 50,000 tables.

  • If you use the Database Backup Service (DBS) for the first time, you must authorize the service-linked role for DBS (AliyunServiceRoleForDBS).

  • Ensure that the 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 database and table recovery feature. If the feature is disabled, enable Database and Table Recovery.

    Important
    • After you enable database and table recovery, the backup format changes from a tar archive to an xbstream package to support this feature.

    • The database and table recovery feature is enabled by default for new instances and cannot be disabled.

    • Backup sets created before you enable this feature do not support database and table recovery. You must perform a manual full backup after you enable the feature. You can then use backup sets created after the feature is enabled for recovery.

      If necessary, you can also refer to Restore Full Data.

Cloud Disks

  • Your ApsaraDB RDS for MySQL instance must meet the following requirements:

    • Major version: 8.0 or 5.7

    • Edition: high-availability edition, Basic Edition, or Cluster Edition

    • Storage type: SSD cloud disk, ESSD, or ultra disk

    • Storage engine: InnoDB

    • Billing method: pay-as-you-go or subscription (This feature is not supported for Serverless instances.)

    Note

    You 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).

  • Ensure that the database and table recovery feature is enabled for the instance.

    • New instances (created on or after December 1, 2023): The database and table restoration feature is enabled by default and cannot be disabled.

    • Existing instances (created before December 1, 2023): The system forcibly disables the database and table restoration feature if it was enabled. You can go to the Backup and Recovery page of the instance and re-enable the feature on the Backup Policy tab. After you re-enable it, you can immediately use existing valid backup sets for restoration. The feature cannot be disabled again.

    • Important

      If existing backup sets are invalid and cannot be used for recovery, perform a manual full backup after you enable the feature. Then, use subsequent backup sets for 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)

    Note

    You 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.

    Note

    If 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.

    Important

    Backup 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 a generated column.

    • Constraint restoration: database and table restoration supports restoring primary keys, unique indexes, and regular indexes (INDEX/KEY), but not foreign key constraints, triggers, or full-text indexes (FULLTEXT INDEX).

      Important

      The restoration process automatically removes foreign key constraints to ensure it succeeds. If you require foreign key constraints, you must manually recreate them after the restoration is complete.

  • Table count limitations:

    • For database and table restoration to succeed, an instance must 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 instance that uses high-performance local disks, you can restore data only to the original instance, not to a new one.

    • You cannot use fast database and table restoration on an instance if it has a read-only node, uses Transparent Data Encryption (TDE), or does not have log backup enabled.

Billing

Standard recovery

local SSD

For instances that use local SSD, the standard database and table recovery feature is enabled by default and is free of charge. If you restore data to a new instance, you are charged for the new instance. You can view pricing details when you create the instance.

Note

cloud disk

Effective December 1, 2023, when you enable the standard database and table recovery feature for an instance that uses cloud disk, the backup architecture is upgraded, increasing backup storage usage by 30% to 80%. If the total backup size does not exceed the free quota, no charges are incurred. Storage that exceeds the free quota is billed based on actual usage.

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.

Note

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.

  1. 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.

  2. In the navigation pane on the left, click Backup and Restoration.

    Note

    If 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.

  3. On the Backup and Restoration page, click the Backup Strategy tab.

  4. In the Basic Backup section, click Edit and set Fast Database/Table Restoration to Enabled.

  5. 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.

  6. Click OK.

2. Restore databases and tables to the original or a new instance

  1. 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.

  2. In the navigation pane on the left, click Backup and Restoration, and then click Restore Individual Database/Table.

    Note
    • If 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.

  3. 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

    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.

    Note

    The free edition of the fast restoration feature does not support point-in-time recovery. It only supports restoration from a backup set.

  4. Select the databases or tables that you want to restore, specify new names for the restored databases or tables, and then click OK.

    Note
    • You 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.

  5. 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.

    Note

    The 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.

  6. 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.

  7. Connect to the RDS for MySQL instance to view the data that is restored to the original or new instance.

    Note
    • Make 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 RENAME TABLE statement to rename the restored table.

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.

image.png

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).

image.png

Related APIs

API

Description

RestoreTable

Restores a database or table to the original instance.

CloneDBInstance

Clones a database or table from an RDS instance to a new instance.

DescribeLocalAvailableRecoveryTime

Queries the recoverable time range for an RDS instance from its backups.

FAQ

What should I do if I receive the error message Operation failed. This operation is not supported in the current instance state. during database/table-level recovery?

Tasks in the ApsaraDB RDS console run sequentially. This error occurs if you start a new recovery task while another task is already in progress. Wait for the current task to finish before you start a new one.

What should I do if I cannot select databases and tables for recovery and receive the error message Meta information is too large. (Error code: InvalidMeta.TooLarge)?

This error occurs because the number of tables exceeds the 50,000 limit. To work around this limitation, restore the full data to a new instance. For more information, see Restore full data.

Note

What should I do if the restore point fails to load and I receive the error message Operation failed. The specified restoration time is invalid. Please reset the restoration time. (Error code: InvalidRestoreTime.Format) during a point-in-time recovery?

To perform a point-in-time recovery, ensure that log backup is enabled for the instance. Go to the Backup and Restoration page of the instance. On the Backup Strategy tab, check or modify the Log Backup status. For more information, see Automatic backup.

What should I do if I receive the error message Meta information is empty. (Error code: InvalidMeta.Empty) when I restore from a backup set or to a specific point in time?

For an instance that uses high-performance local disks, you must perform a manual backup after you enable the database/table-level recovery feature. Then, select the new backup set for recovery. If necessary, see Restore full data.

What should I do if the restored table is empty?

Verify that the original table contained data at the selected point in time. If the table was empty, select a point in time when the table had data and retry the recovery.

How do I recover data from an accidental deletion?

You can use the data tracking feature of Data Management (DMS) to track relevant updates, generate rollback SQL statements, and execute them through a data change ticket to recover the data.

Why can't a RAM user find the "Restore Individual Database/Table" button on the Backup and Restoration page in the ApsaraDB RDS console?

Verify that the AliyunDBSFullAccess policy is attached to the RAM user. For instructions, see Grant permissions to a RAM user.

How do I choose between database/table-level recovery and emergency recovery?

  • Use database/table-level recovery to restore specific databases and tables for accidental deletions or modifications. Use emergency recovery to restore an entire instance.

  • Emergency recovery allows you to restore data to a specific point in time on a sandbox instance (not an RDS instance). This is useful for comparing historical data, correcting corrupted data, or recovering from data loss by using Data Transmission Service (DTS) to migrate the data back to the original instance.

Note

If you enable both database/table-level recovery and emergency recovery, Cloud Data Migration (CDM) merges the storage in the backend to reduce storage costs. For more information about data recovery methods, see Overview of data restoration methods.

Are there other ways to restore databases and tables for an RDS instance that uses a cloud disk?

You can use Data Disaster Recovery to back up and restore cloud databases or self-managed databases on Elastic Compute Service (ECS) instances. Data Disaster Recovery also lets you download cloud backup sets to a local computer.

Note

For more ways to restore databases and tables, see database/table-level recovery or Back up and restore data by using mysqldump.

How do I quickly roll back data changes based on a binary log file?

For a single or a small number of DML operations, you can use the data tracking feature of DMS to restore data.

Where can I find the restored tables?

The restored tables are located in the rx_backup_task_no database.