All Products
Search
Document Center

ApsaraDB RDS:Restore databases and tables

Last Updated:Jun 10, 2026

ApsaraDB RDS for MySQL supports standard and fast database and table restoration. You can restore specific databases and tables from a backup set or to a point in time to the original instance or a new instance without restoring the entire dataset. This feature helps you recover from accidental operations or analyze historical data.

Differences between restoration modes

You can restore individual databases and tables in standard and fast modes. The fast mode uses a performance-type sandbox instance and is 50% to 95% faster than the standard mode for the same amount of data. To use fast restoration for individual databases and tables, you must first enable the feature, and then restore data to the original instance or a new instance using a backup set generated after the feature was enabled.

For more information, see Overview of data restoration solutions (comparison of restoration speeds).

image

Item

Standard restoration

Fast restoration

Restoration scope

You can restore specified databases and tables in an instance.

You can restore specified databases and tables in an instance.

Restoration destination

  • For an instance that uses a high-performance local disk, you can restore data to the original instance or a new instance.

  • For an instance that uses a cloud disk, you can restore data only to the original instance.

  • For an instance that uses a high-performance local disk, you can restore data only to the original instance.

  • This feature is not supported for instances that use a cloud disk.

Restoration speed

The restoration speed is relatively slow and depends on the data volume.

The restoration speed depends on the data volume. This mode is 50% to 95% faster than standard restoration.

Restoration method

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

  • Free edition: You can restore data to the point in time of the latest full data backup.

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

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

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

Prerequisites

Standard recovery

local SSD

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

    • major version: 8.4, 8.0, 5.7, or 5.6

    • edition: High-availability Edition or three-node Enterprise Edition running MySQL 5.7

    • storage type: local SSD

    • storage engine: InnoDB

    • billing method: pay-as-you-go or subscription (not applicable to 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.

  • The first time you use the ApsaraDB for RDS backup service, you must authorize the service-linked role for DBS (AliyunServiceRoleForDBS) with your Alibaba Cloud account.

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

    Go to the Backup Recovery page of the instance. On the Backup Policy tab, check the status of the database and table restoration feature. If it is disabled, enable Database/Table Restoration.

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

    • For new instances, the database and table restoration feature is enabled by default and cannot be disabled.

    • You cannot use backup sets created before enabling this feature for database and table restoration. After enabling the feature, you must perform a manual full backup. Then, you can use the backup sets created after the feature is enabled to restore databases and tables.

      Alternatively, see Restore full backup data.

cloud disk

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

    • major version: 8.4, 8.0, or 5.7

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

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

    • storage engine: InnoDB

    • billing method: pay-as-you-go or subscription (not applicable to Serverless instances)

    Note

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

  • The first time you use the ApsaraDB for RDS backup service, you must authorize the service-linked role for DBS (AliyunServiceRoleForDBS) with your Alibaba Cloud account.

  • Ensure that the database and table restoration 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 an existing backup set is invalid and cannot be used for restoration, you can perform a manual full backup after the feature is enabled. Then, use the new backup set for restoration.

Fast recovery

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

    • major version: 8.4, 8.0, 5.7, or 5.6

    • edition: High-availability Edition

    • storage type: local SSD (fast database and table restoration is not supported on cloud disks)

    • storage engine: InnoDB

    • billing method: pay-as-you-go or subscription (not applicable to Serverless instances)

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

  • The first time you use the ApsaraDB for RDS backup service, you must authorize the service-linked role for DBS (AliyunServiceRoleForDBS) with your Alibaba Cloud account.

  • The capacity-based sandbox instance feature must be disabled. If it is enabled, disable it.

    Note

    If you enable fast database and table restoration when a capacity-based sandbox instance is already enabled, the sandbox instance is upgraded to a performance-based sandbox instance. This increases emergency recovery costs.

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

    Go to the Backup Recovery page of the instance. On the Backup Policy tab, check the status of the Fast Database/Table Restoration feature. If it is disabled, enable it. For more information, see 1. Enable fast database and table restoration.

    Important

    You cannot use backup sets created before enabling this feature for fast restoration. After enabling the feature, you must perform a manual full backup. Then, you can use the backup sets created after the feature is enabled to restore databases and tables.

    Alternatively, see Restore full backup data.

Notes

  • Enabled by default:

    • Standard database and table restoration is enabled by default for new instances and cannot be disabled.

    • You cannot suspend or cancel a restoration task once it starts.

  • Log backup requirements:

    To restore data to a point in time, you must ensure that log backup is enabled for the instance; otherwise, fast database and table restoration will fail.

  • Primary/secondary switchover and service interruption:

    • For instances using a high-performance local disk:

      • Restoring data to the original instance triggers a primary/secondary switchover, which may cause a 30- to 120-second service interruption. Ensure that your application has an automatic reconnection mechanism.

      • Restoring data to a new instance does not trigger a primary/secondary switchover.

    • For instances using a cloud disk:

      • Restoring data to the original instance does not trigger a primary/secondary switchover. However, this operation may affect the original instance's performance or even trigger an instance switchover.

      • A full backup is created after the restoration completes.

Limitations

  • Limitations for database and table restoration (standard and fast):

    • You can restore data only from databases and tables that use the InnoDB storage engine. Tables using the X-Engine storage engine are not supported.

    • You cannot use this feature to restore partitioned tables, views, stored procedures, or other database objects. To restore these objects, use the full data restoration feature instead.

    • You cannot restore a table if the binary log contains a rename operation on it, or if the table includes a generated column.

    • The database and table restoration task fails if the binary log contains any XA transactions.

    • Constraint restoration: Database and table restoration restores primary keys, unique keys, and indexes but does not restore foreign key constraints, triggers, or full-text indexes.

      Important

      The restoration process automatically removes foreign key constraints to ensure a higher success rate. If you need these constraints, you must manually recreate them after the restoration is complete.

  • Table count limits:

    • The restoration task fails if the instance contains more than 50,000 tables.

    • The restoration process may take significantly longer if it involves a large volume of data, many databases and tables, or numerous binary logs within the specified time range.

  • Limitations on fast database and table restoration:

    • For an instance with high-performance local disks, you can restore data only to the original instance, not to a new instance.

    • You cannot use fast database and table restoration on instances that have a read-only node, use transparent data encryption (TDE), or do not have log backup enabled.

Billing

Standard table recovery

High-performance local disk

Standard table-level recovery is enabled by default at no additional cost for high-performance local disk instances. If you restore data to a new instance, you are charged for the new instance. You can view the pricing details when you create the instance.

Note

Cloud disk

Starting December 1, 2023, after you enable table-level recovery for cloud disk instances, the backup architecture will be upgraded, increasing the backup volume by 30% to 80%. You are not charged if the total backup size is within the free quota. For usage beyond the free quota, you are charged based on your actual usage.

Express table recovery

For high-performance local disk instances, Express table-level recovery is available in a Free Edition and a Paid Edition. Cloud disk instances are not supported.

  • This edition is free and allows you to restore data from a backup set or to the time of the most recent full backup.

  • Paid Edition: This edition is pay-as-you-go and is billed at USD 0.008 per GB per day. It allows you to restore data from a backup set or perform a point-in-time recovery.

1. Enable fast database/table restoration

To use the Fast Database/Table Restoration feature, you must first enable it. Then, you can use a backup set created after the feature is enabled to perform Database/Table Restoration. This feature is available only for instances with high-performance local disks that meet the prerequisites. Enabling this feature does not affect your services.

Note

If you only need standard database and table restoration, skip this section and go 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 dialog box appears indicating that Fast Database/Table Restoration is a paid feature, you can select Do not show again. and then enable the Free Edition or Paid Edition as needed. If the dialog box does not appear, proceed to the next step.

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

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

  5. Configure the CDM Billing Method and CDM Retention Period. Fast Database/Table Restoration is available in a Free Edition and a Paid Edition:

    • Free Edition: Supports restoration only from a backup set. Set the CDM Billing Method to Last Point in Time (Free Edition). The restored data is retained for one day.

    • Paid Edition: Supports restoration from a backup set or to a point in time (if log backup is enabled). Set the CDM Billing Method to Any Point in Time (Paid Edition). You can set the retention period for restored data from 1 to 730 days.

  6. Click OK.

Step 2: Restore to original or new instance

Important

The database and table restoration feature does not overwrite or affect data in the original database. When restoring to the original instance, the data is saved to a new database. By default, the _backup suffix is added to the original database name. When you restore data to a new instance, the system creates a separate RDS instance to store the restored data.

  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 Database/Table Restoration.

    Note
    • If the Database/Table Restoration button is not displayed in the console, ensure that you meet the requirements described in Prerequisites.

    • If the console stops responding after you click the Database/Table Restoration button, clear your browser cache and try again.

    • If a message indicates insufficient storage capacity, expand the storage capacity before starting the restoration.

  3. Configure the restoration destination and method.

    Parameter

    Description

    Restore To

    • Current Instance

    • New Instance (available only for instances that use local SSDs): The system creates a new RDS instance without affecting the original instance.

      After you verify the data in the new instance, you can also migrate the data back to the original instance.

    Restore Speed

    • Normal

    • Fast (restoration to the original instance only): The fast database and table restoration feature 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 backup to be enabled): The system restores a full backup followed by an incremental log backup. You can select any point in time within the log backup retention period. To view or change the log backup retention period, see Automatic backup.

      For example, if the data backup and log backup retention periods for an RDS instance are both seven days, you can restore data from the last seven days. Backup sets older than seven days are discarded and cannot be used for restoration.

    Note

    The free edition of fast database and table restoration does not support point-in-time recovery. It only supports restoration by backup set.

  4. Select the databases and tables that you want to restore. You can also specify the names for the restored databases or tables. Then, click OK.

    Note
    • You can select up to 50 databases or tables at a time.

    • When you restore data to the original instance, the data in the original instance is not affected. A restored database cannot have the same name as an existing database, but a restored table can. By default, the system adds the _backup suffix to the restored database name. You can also change the name.

    • If you restore data to the original instance, check the total size of the selected databases and tables at the bottom of the page, and ensure that the instance has sufficient remaining storage capacity.

  5. If you restore data to a New Instance from an instance that runs on local SSDs, you must select a billing method and configure the parameters for the new instance.

    • Subscription: You pay upfront when you create the new instance. This option works best for long-term use.

    • Pay-as-you-go: You are billed hourly. This option works best for short-term use, and you can release the instance when you no longer need it.

    Parameter

    Description

    Zone

    An availability zone is an independent physical location within a region. All availability zones in a region provide the same services and connectivity.

    You can create the RDS instance in the same availability zone as an ECS instance or in a different one.

    Note

    The new instance is in the same region as the original instance. The region cannot be changed.

    Instance Type

    Each instance type offers a specific number of CPU cores, memory size, maximum connections, and maximum IOPS.

    Storage Capacity

    The storage capacity includes space for data files, 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.

    After you start a database and table recovery operation in the ApsaraDB RDS console and select restore to the original instance, the running state of the ApsaraDB RDS for MySQL instance changes to Creating Temporary Instance. This state indicates that the recovery task is in progress. Your instance remains fully operational during this process, and you can perform other operations such as initiating a backup. The duration of this state is proportional to the volume of data being recovered.

    Important
    • Once a recovery task starts, it cannot be paused or canceled.

    • While a recovery task is running, do not start another recovery operation. Otherwise, the system returns an error message such as "Operation failed. This operation is not supported in the current instance state." Wait for the current task to complete before starting another.

    • If a primary instance has read-only instances, the system automatically synchronizes data to all associated read-only instances after the recovery task for the primary instance is complete, ensuring data consistency between the primary and read-only instances.

  7. After you connect to the RDS for MySQL instance, you can view the restored data in the original or new instance.

    Note
    • Ensure the account used to connect to the instance has the required permissions to view or manage databases. We recommend using a privileged account to connect and view data.

    • 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 so the new database will appear in the list.

    After restoring to a new instance, you can use DTS to migrate the data back to the original instance if needed.

Related operations

Correct 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 some or all databases and tables to 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 and table restoration

Disabling Fast Database/Table Restoration does not affect standard database and table restoration.

Go to Backup Recovery on the instance details page. On the Backup Policy tab, click Edit next to Basic Backup, and then set Fast Database/Table Restoration to Off.

image.png

Change the fast restoration edition

You can change the edition of Fast Database/Table Restoration to the Free Edition to reduce costs. After switching to the Free Edition, you can restore data only from a backup set or to the point in time of the latest full backup. You can no longer restore data to an arbitrary point in time.

Go to Backup Recovery on the instance details page. On the Backup Policy tab, click Edit next to Basic Backup, and then set CDM Billing Method to Last Point in Time (Free Edition).

image.png

Related APIs

API

Description

RestoreTable

Restores a specified database or table to the original RDS instance.

CloneDBInstance

Restores a specified database or table to a new RDS instance.

DescribeLocalAvailableRecoveryTime

Queries the restorable time range of an RDS instance.

FAQ

What should I do if I receive the error messageOperation failed. This operation is not supported for the current instance state. when restoring a database or table?

Tasks in the ApsaraDB RDS console run sequentially. Wait for the previous restoration task or other tasks to complete before you start a new one.

Why can't I select databases and tables for restoration, and I receive the error messageMeta information is too large. (Error code: InvalidMeta.TooLarge)?

This error occurs because this feature does not support restoring more than 50,000 tables. We recommend that you use the Restore a full instance feature to restore your data to a new instance.

Note

When I try to perform a point-in-time recovery for a database or table, the restore time points fail to load, and I receive the error messageOperation failed. The specified restore time is invalid. Please reset the restore time. (Error code: InvalidRestoreTime.Format). What should I do?

To perform a point-in-time recovery, ensure that Log Backup is enabled for the instance. Go to the Backup Recovery page of the instance. On the Backup Policy tab, view or change the status of Log Backup. For more information, see Automatic backup.

Why do I receive the error messageMeta information is empty (Error code: InvalidMeta.Empty) when I restore a database or table from a backup set or to a point in time?

For an instance that uses a high-performance local disk, you must perform a manual backup after you enable the individual database and table restoration feature. Then, select the new backup set for the restoration. If necessary, you can also restore a full instance.

What do I do if the restored table is empty?

Check whether the table contained data at the selected point in time. If no data exists at that point in time, select another point in time and restore again.

How can I recover data from an accidental deletion?

You can use the data tracking feature of Data Management (DMS) to trace updates within a specific time frame, generate a rollback script, and then execute it through a data change ticket to restore your data.

Why can't I find the individual database and table restoration button when logged in to the ApsaraDB RDS console as a RAM user?

Check whether the AliyunDBSFullAccess policy is attached to the RAM user. For more information about how to grant permissions, see Manage RAM user permissions.

How do I choose between individual database and table restoration and emergency recovery?

  • Use individual database and table restoration to recover from accidental deletions or updates to specific databases or tables. The emergency recovery feature is best for urgent situations when you need to restore data for the entire instance.

  • The emergency recovery feature restores data to a specified point in time on a sandbox instance (not an RDS instance) in case of data loss or corruption caused by accidental operations or other events. You can use it to compare historical data or fix dirty data. You can also use DTS (Data Transmission Service) to migrate data back to the original instance to recover from data loss or corruption.

Note

If you enable both individual database and table restoration and emergency recovery, CDM merges storage in the background to reduce storage costs. For more information about data restoration solutions, see Overview of data restoration solutions.

Are there other ways to restore databases and tables for a cloud-disk-based RDS instance?

You can use Data Disaster Recovery to back up and restore cloud databases or self-managed databases on ECS instances. Data Disaster Recovery also allows you to download cloud backup sets to your local machine.

Note

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

How can I quickly roll back DML operations from a specific point in time in the binary log?

Where can I find the restored tables?

You can find restored tables in the rx_backup_task_no database.