All Products
Search
Document Center

Data Management:Emergency recovery for ApsaraDB RDS for MySQL

Last Updated:Aug 27, 2026

The Data Disaster Recovery service provides an emergency recovery feature for ApsaraDB RDS for MySQL, based on Copy Data Management (CDM) technology. By enabling the Data Disaster Recovery sandbox, you can quickly create a temporary sandbox instance that makes your backup data readily available. Operations on a sandbox instance do not affect other sandbox instances or the source database. Its isolated environment is ideal for recovery drills, development and testing, data analysis, and disaster recovery.

Note

Prerequisites

  • The ApsaraDB RDS instance meets the following requirements:

    • Major engine version: 8.0, 5.7, 5.6, or 5.5

    • Edition: High-availability Edition

    • Storage type: local SSDs

    • Region: China (Hangzhou), China (Shanghai), China East 1 Finance, China (Shenzhen), China (Heyuan), China (Chengdu), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Hong Kong), Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Japan (Tokyo), Germany (Frankfurt), US (Silicon Valley), or US (Virginia).

  • Note

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

  • At least one physical backup is available in the ApsaraDB RDS console. For more information, see Automatic backup or Manual backup.

  • Transparent Data Encryption (TDE) is disabled for the RDS instance.

  • The PrivateLink service is activated. For details, see how to activate PrivateLink by using the console or an API operation.

How it works

Category

Description

Restoration scope

Restores the entire instance.

Recovery point

  • If log backup is disabled, you can restore data only to the point in time of an existing data backup.

  • If log backup is enabled, you can restore data to any point in time after the first full backup within the log backup retention period.

    Note

    Snapshot creation in sandbox storage (CDM storage): Snapshots are created only after you enable the emergency recovery feature. The earliest restore point is when data preparation is complete.

    Example: Assume you enable the emergency recovery feature at 08:00 on July 1, and the full backup retention period for your RDS instance is 7 days. For the next 7 days, the earliest point in time to which you can restore data is the moment the emergency recovery data is ready, which is after 08:00 on July 1.

Billing

Emergency recovery fees consist of sandbox storage fees and temporary sandbox instance fees.

Billable item

Details

Sandbox storage fee

When you enable the Data Disaster Recovery sandbox feature, the service creates a sandbox storage space for the database instance. The service automatically syncs data to this space and creates multiple sandbox snapshots. Data Disaster Recovery charges a fee based on the amount of data stored in the sandbox storage. For more information, see Billable items (DMS).

Temporary sandbox instance fee

After you restore data to a temporary sandbox instance, Data Disaster Recovery charges a fee for the temporary sandbox instance based on its specifications and usage duration, which is billed by the hour. For more information, see Billable items (DMS).

Important

If an ApsaraDB RDS for MySQL instance has both the emergency recovery feature described in this topic and the fast restoration for individual databases and tables feature enabled (both features rely on the DBS sandbox), sandbox storage fees apply to both features. To stop all DBS sandbox charges, you must disable both the emergency recovery feature and the fast restoration for individual databases and tables feature.

Step 1: Enable sandbox

This procedure describes how to enable the sandbox feature and configure a policy. This allows you to create sandbox instances and restore data to them.

  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 left-side navigation pane, click Backup and Restoration.

  3. On the Backup and Restoration page, click the Crash Recovery tab, and then click Enable DBS Sandbox.

  4. In the Set Sandbox Policy dialog box, configure the following parameters:

    Parameter

    Description

    Sandbox Feature

    Set to Enabled.

    Sandbox Data Retention Period

    The number of days to retain sandbox snapshots. The default is 7 days. It works as follows:

    • Your sandbox snapshots are available after they are created. The system automatically deletes snapshots after the retention period ends. When a snapshot is deleted, only its incremental backup data relative to the previous snapshot is deleted.

    • You can quickly restore data to any point in time covered by the sandbox snapshots, as long as it does not exceed the log retention period of the RDS instance.

    • A longer retention period for sandbox data requires more storage space and incurs higher storage fees.

    • If you want to save only the latest snapshot, set the retention period to 0.

  5. Click OK.

    After the sandbox feature is enabled, the Sandbox instance time range field displays Data preparing. When you enable the feature for the first time, the service copies the latest full backup set to the sandbox storage and generates a mountable snapshot. This may take 5 to 20 minutes, depending on the size of the backup data.

    When the Sandbox instance time range field displays a specific time range, you can start to create a temporary RDS instance and restore data to it.

    The Sandbox Information panel also displays the Instance Count and Total Sandbox Storage Capacity fields.

    The Sandbox Instance Time Range is described as follows:

    Sandbox status

    Description

    Sandbox feature disabled

    Displays Not enabled.

    Preparation phase after enabling

    Displays Data preparing.

    Preparation complete

    Displays the time range to which the sandbox instance can be restored.

    Note

    This is the time range of existing backup sets.

Step 2: Restore data to sandbox

This procedure describes how to create a sandbox instance to quickly restore your data. Reads and writes in different sandbox instances do not affect each other or the source database.

  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 left-side navigation pane, click Backup and Restoration.

  3. On the Backup and Restoration page, click the Crash Recovery tab, and then click Enable DBS Sandbox.

  4. Click Recover Sandbox Instance and configure the following parameters in the dialog box that appears.

    Category

    Parameter

    Description

    Sandbox Instance Point in Time

    Sandbox Data Time Range

    The displayed recoverable time range is from the point in time of the first snapshot in sandbox storage to the current time. The actual recoverable time range may be shorter.

    Note

    Data can be restored to a point in time between the first snapshot in sandbox storage and the end time of the last binlog file in the log backup. Recovery is not guaranteed for the time between the last binlog file and the current time.

    You can view this information on the Backup and Restoration > Base Backups > Log Backup tab.

    Recovery Method

    • Recovery by Snapshot Point in Time (Recommended): Restores data to the point in time of a generated snapshot. This method is faster.

    • Recovery by Custom Point in Time: If log backup for ApsaraDB RDS for MySQL is enabled, you can restore data to any point in time within the log backup retention period. The restoration time depends on the volume of logs to be replayed. If log backup is not enabled, you can restore data only to the point in time of a full backup set.

      Note

      Only ApsaraDB RDS for MySQL instances on the High-availability Edition that have log backup for ApsaraDB RDS for MySQL enabled support restoration to a custom point in time.

    Sandbox Instance Configurations

    Specifications

    You can restore to one of the following eight instance specifications (each with a specific number of CPU cores and memory):

    • 1 Core, 1 GB Memory

    • 1 Core, 2 GB Memory

    • 2 Cores, 4 GB Memory

    • 2 Cores, 8 GB Memory

    • 4 Cores, 8 GB Memory

    • 4 Cores, 16 GB Memory

    • 8 Cores, 16 GB Memory

    • 8 Cores, 32 GB Memory

    Different specifications have little impact on the restoration speed. Higher-specification instances provide better performance after restoration. For more information, see Billable items (DMS).

    Region

    This is fixed to the region of the source instance.

    Peer VPC

    Select a Virtual Private Cloud (VPC).

    Note

    To access the sandbox instance from an ECS instance, make sure to select the VPC where the ECS instance resides. For information about how to create a VPC, see Create and manage a VPC.

    Peer vSwitch

    Select the target vSwitch. This assigns an IP address range for accessing the sandbox instance.

    Security Group

    Select an enterprise security group. Port 3306 must be open in the security group. For more information, see Overview of enterprise security groups and Create a security group.

    Note

    This parameter is displayed only for instances where the emergency recovery feature has been newly enabled. It is not displayed for instances where the feature was already enabled.

    Database Account Type

    The following options are supported:

    • Use Original Database Account: The database accounts are the same as in the source database.

    • Create Privileged Account: Creates a new privileged account in the restored sandbox instance. This account has permissions on all databases in the instance. You must enter a new Database Account and Password. The original database accounts are retained in the sandbox instance.

      Note
      • The privileged account is created only in the current sandbox instance.

      • If an account with the same name exists in the source database, it is overwritten by the new privileged account in the sandbox instance.

  5. Click OK.

    The service runs a precheck and automatically creates the sandbox instance. After the Sandbox Instance Status changes to Completed, you can access the sandbox instance.

    The account credentials and all configurations of the sandbox instance are identical to the source backup. If you selected Create Privileged Account in the previous step, you can also use the newly created privileged account to access the sandbox instance.

    Note

    The client device used to access the sandbox instance, such as an ECS instance, must be in the same VPC as the sandbox instance.

Related operations

Correct production data

After the sandbox instance is created, you can use Data Transmission Service (DTS) to migrate some or all databases and tables to the source instance to correct the production data.

Note

When you create a migration task, set the new instance as the source. For Access Method, select ECS-hosted database. Set the original instance as the destination. For Access Method, select Cloud instance.

Release a sandbox instance

When a sandbox instance is no longer needed, you can release it. Releasing the instance stops all related charges for billable items (DMS).

Go to the Backup and Restoration page of the instance. On the Emergency Recovery tab, click the Release Sandbox Instance button.

Disable emergency recovery

You can disable the emergency recovery feature if it is not currently needed. Disabling the feature does not affect existing sandbox instances.

Go to the Backup and Restoration page of the instance. On the Emergency Recovery tab, click Set Sandbox Policy and set Sandbox Feature to Disabled.

Important

Both the emergency recovery feature described in this topic and the fast restoration for individual databases and tables feature provided by ApsaraDB RDS rely on the DBS sandbox. This operation disables only the emergency recovery feature and does not affect the use or billing of the fast restoration for individual databases and tables feature.