All Products
Search
Document Center

Data Management:Use the emergency recovery feature for an ApsaraDB RDS for MySQL instance

Last Updated:Mar 28, 2026

The emergency recovery feature of Data Disaster Recovery lets you spin up an isolated sandbox instance from any backup snapshot without touching your production database. Built on copy data management (CDM), the sandbox runs as a snapshot clone: reads and writes inside the sandbox never affect other sandbox instances or the source database. Sandbox instances are designed to be disposable — you restore to a new instance rather than overwriting production, which keeps your source database timeline intact and your data safe.

Use this feature for:

  • Disaster recovery drills: Validate your backup and recovery process without production risk

  • Emergency data recovery: Access and extract data from a point in time before an incident

  • Development and testing: Run queries or experiments against a real copy of production data

  • Query and analysis: Run heavy analytical queries on historical data without load on the source

This topic covers the emergency recovery feature for ApsaraDB RDS for MySQL instances. For self-managed MySQL databases, see Use the emergency recovery feature for a self-managed MySQL database. For all restoration methods available for ApsaraDB RDS for MySQL, see Overview of data restoration methods.

Prerequisites

Before you begin, make sure that:

  • Your RDS instance meets all of the following requirements:

    • MySQL version: MySQL 8.0, MySQL 5.7, MySQL 5.6, or MySQL 5.5

    • Edition: RDS High-availability Edition

    • Storage: Local SSDs

    • Region: China (Hangzhou), China (Shanghai), 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), US (Virginia), or China East 1 Finance

    Find your instance's version, edition, storage type, and region on the Basic Information page of the RDS instance.
  • At least one physical backup is complete in the ApsaraDB RDS console. See Automatic backup or Perform a manual backup

  • Transparent Data Encryption (TDE) is disabled. See Configure TDE

  • PrivateLink is activated. See Procedure or OpenPrivateLinkService

How it works

Isolation model

Each sandbox instance is a copy-on-write clone of your backup data. Changes inside the sandbox are fully isolated — they do not affect other sandbox instances or the source database. You can create multiple sandbox instances from the same source and modify each independently.

Restoration scope and recovery points

The entire RDS instance is restored to the sandbox. The available recovery points depend on whether log backup is enabled:

Log backup statusAvailable recovery points
DisabledRestore only to the exact point in time when a physical backup was created
EnabledRestore to any point in time after the first full backup within the log backup retention period. See RDS MySQL log backups
CDM snapshots are generated only after you enable the emergency recovery feature. The earliest point in time you can restore to is when the initial data copy completes — not before. For example, if you enable the feature at 08:00 on July 1 and the required full backup has a 7-day retention period, your recovery window starts from when the initial data copy finishes, and extends for 7 days.

Billing

Enabling this feature incurs two types of charges:

Billable itemWhen you are charged
CDM storageAfter you enable the sandbox feature, Data Disaster Recovery starts syncing your RDS instance data to CDM storage and generating snapshots. Charges are based on the volume of stored data. See Pricing
Temporary sandbox instanceAfter you create a sandbox instance, charges apply hourly based on the instance specifications and duration. No charge if you never create a sandbox instance. See Pricing
Important

The emergency recovery feature and the fast restoration feature for individual databases and tables both rely on the sandbox feature of Data Disaster Recovery. Enabling either feature incurs CDM storage fees. To stop CDM storage charges, disable both features. See Restore individual databases and tables of an ApsaraDB RDS for MySQL instance.

Step 1: Enable the sandbox feature

Before creating a sandbox instance, enable the sandbox feature and set a retention policy.

  1. Go to the Instances page. Select the region of the RDS instance, find the instance, and click its ID.

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

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

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

  5. Click OK.

After you click OK, the Sandbox instance time range field changes to Data preparing. Data Disaster Recovery copies the latest full backup set to CDM storage and generates the initial snapshot. This typically takes 5–20 minutes depending on backup size.

image.png

Once the copy is complete, the Sandbox instance time range field shows the available time range, and you can create a sandbox instance.

Sandbox stateDisplay value
Sandbox feature disabledUnopened
Data copy in progress after enablingData preparing
Data copy completeTime range from the start of the earliest backup to the end of the latest backup

Step 2: Create a sandbox instance and restore data

Reads and writes inside a sandbox instance are fully isolated — changes do not affect other sandbox instances or the source database.
  1. Go to the Instances page. Select the region of the RDS instance, find the instance, and click its ID.

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

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

  4. Click Recover Sandbox Instance. In the dialog box, configure the following parameters.

  5. Click OK.

The system runs a precheck and creates the sandbox instance. When Sandbox Instance Status shows Complete, the instance is ready to connect.

The client used to connect to the sandbox instance (such as an ECS instance) must be in the same VPC as the sandbox instance.

The sandbox instance uses the same account credentials and configurations as the source database. If you selected Create Privileged Account, you can also connect using the privileged account.

What's next

Correct online data in the source RDS instance

After verifying the restored data in the sandbox instance, use Data Transmission Service (DTS) to migrate some or all databases and tables back to the source RDS instance.

When creating the migration task:

  • Set the sandbox instance as the source database with Access Method set to Self-managed Database on ECS.

  • Set the source RDS instance as the destination database with Access Method set to Alibaba Cloud Instance.

See Migrate data between ApsaraDB RDS for MySQL instances.

Release a sandbox instance

Release the sandbox instance when you no longer need it. After release, hourly instance charges stop.

On the Crash Recovery tab of the Backup and Restoration page, click Release Sandbox Instance in the Actions column of the sandbox instance.

image.png

Disable the emergency recovery feature

On the Crash Recovery tab of the Backup and Restoration page, click Set Sandbox Policy. In the dialog box, turn off Sandbox Feature.

Existing sandbox instances are not affected when you disable the feature.

Important

The emergency recovery feature and the fast restoration feature for individual databases and tables share the same underlying sandbox infrastructure. Disabling the emergency recovery feature does not stop CDM storage charges or affect the fast restoration feature. To stop all CDM storage charges, disable both features. See Restore individual databases and tables of an ApsaraDB RDS for MySQL instance.

image.png