Database Backup (DBS) provides an emergency disaster recovery feature to automatically obtain backup sets and generate snapshots. A DBS sandbox instance can be generated in a short period of time.

Background information

DBS provides a complete sandbox solution for MySQL databases based on copy data management (CDM). You can use the DBS sandbox feature to create a sandbox instance to restore data in a backup set in a short period of time. Read and write operations are performed within sandbox instances and do not affect source databases. You can perform various operations within sandbox instances, such as data restoration, recovery drills, development and testing, query and analysis, and emergency disaster recovery. For more information, see Overview.

Billing

  • ApsaraDB RDS provides the physical backup of ApsaraDB RDS instances and charges you backup fees. For more information, see Backup storage pricing for an ApsaraDB RDS for MySQL instance.
  • After you enable the sandbox feature, DBS automatically synchronizes the data to be restored to the sandbox storage and generates multiple snapshots for the backup data. The snapshots are stored in the sandbox storage and can be directly used to create sandbox instances. DBS charges you sandbox storage fees based on the volume of the data stored in the sandbox storage. For more information, see Sandbox storage fees.
  • After you create a sandbox instance for emergency disaster recovery, DBS charges you sandbox instance fees based on the specifications and usage duration of the sandbox instance. If you have not created sandbox instances for emergency disaster recovery, you are not charged sandbox instance fees. For more information, see Sandbox instance fees.

Prerequisites

  • An ApsaraDB RDS for MySQL database with local SSDs is created. At least one physical backup is complete in the ApsaraDB RDS console. For more information, see Enable automatic backups for an ApsaraDB RDS for MySQL instance.
  • The ApsaraDB RDS database resides within the China (Beijing), China (Shanghai), China (Hangzhou), or China (Shenzhen) region.

Enable the sandbox feature

After you enable the sandbox feature, DBS automatically synchronizes the data to be restored to sandbox storage. Then, you can create a sandbox instance for emergency disaster recovery.

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the left-side navigation pane, click Backup and Restoration.
  3. On the Backup and Restoration page, click the Crash Recovery tab.
    Crash Recovery
  4. Click Enable DBS Sandbox.
  5. In the Set Sandbox Policy dialog box, set the parameters as required.
    Set Sandbox Policy
    • Sandbox Feature: specifies whether to enable the sandbox feature.
    • Sandbox Data Retention Period: the number of days for which DBS retains the data that is used to create sandbox instances. Default value: 7. By default, DBS retains data in the last seven days. You can restore data to a point in time within the retention period.
  6. Click OK.
    The sandbox feature is enabled. If the sandbox feature is enabled for the first time, DBS stores the latest full backup set of the ApsaraDB RDS database to sandbox storage and generates snapshots that can be used to create sandbox instances. You must wait for the preparation process to complete. The wait time varies based on the backup data size and may take 5 to 20 minutes.

    After the available time range is displayed to the right of the Available Time Range to Recover parameter, you can create sandbox instances.

Create a sandbox instance for emergency disaster recovery

  1. Visit the RDS instance list, select a region above, and click the target instance ID.
  2. In the left-side navigation pane, click Backup and Restoration.
  3. On the Backup and Restoration page, click the Crash Recovery tab.
    Crash Recovery
  4. Click Recover Sandbox Instance.
  5. In the Recover Sandbox Instance dialog box, set the parameters that are described in the following table.
    Recover Sandbox Instance
    Section Parameter Description
    Sandbox Instance Point in Time Sandbox Data Time Range The time range available to restore the source database. The value of this parameter depends on the value of the Sandbox Data Retention Period parameter that you specify for the sandbox feature. If the Sandbox Data Retention Period parameter is set to 7, the available time range is the last seven days.
    Recovery Method The method that is used to restore data. Valid values:
    • Recovery by Snapshot Point in Time: You can select only the point in time at which a snapshot is created. This restoration method takes less time to complete. We recommend that you select this method.
    • Recovery by Custom Point in Time: You can select a specific point in time within the backup set retention period. The time required for the restoration to complete varies based on the backup size.
      Note The Recovery by Custom Point in Time option is displayed only if you enable the log backup feature for the ApsaraDB RDS for MySQL database.
    Sandbox Instance Configurations Specifications The specifications of the sandbox instance to be created. The following specifications are supported:
    • 1 CPU core and 1 GB of memory
    • 1 CPU core and 2 GB of memory
    • 2 CPU cores and 4 GB of memory
    • 2 CPU cores and 8 GB of memory
    • 4 CPU cores and 8 GB of memory
    • 4 CPU cores and 16 GB of memory
    • 8 CPU cores and 32 GB of memory

    The restoration speed does not vary with the specifications of sandbox instances. However, the higher the specifications of the sandbox instance you create, the better the performance of the sandbox instance. For more information, see Sandbox instance fees.

    Region The region where the sandbox instance resides.
    Peer VPC The virtual private cloud (VPC) within which the sandbox instance is created.

    If you want to connect to the sandbox instance by using your Elastic Compute Service (ECS) instance, you must set this parameter to the VPC where the ECS instance resides. For more information about how to create a VPC, see Default VPC and default vSwitch.

    Peer vSwitch The vSwitch to which the sandbox instance is connected.
    Database Account Type The type of the account that is used to connect to the sandbox instance. Valid values:
    • Use Original Database Account: Use the account of the source database.
    • Create Privileged Account: Create a privileged account in the sandbox instance. The privileged account has permissions on all databases in the sandbox instance. You must specify a new database account and a password. The account of the source database is retained in the sandbox instance.
      Note A privileged account is created only in the specific sandbox instance.

      If the account name of the source database is the same as the name of the privileged account, the account of the source database is overwritten by the privileged account in the sandbox instance.

  6. Click OK.
    DBS performs a precheck and creates the sandbox instance. When the status of the sandbox instance changes to Running, you can connect to the sandbox instance.

    The account, password, and all configurations of the sandbox instance are consistent with those of the source database. If you select Create Privileged Account in Step 5, you can also use the privileged account that is created to connect to the sandbox instance.

    View sandbox instances

What to do next

You can obtain the endpoint of the sandbox instance in the ApsaraDB RDS console and connect to the endpoint by using the corresponding client. You can also connect to the sandbox instance by using Data Management (DMS) or ECS. For more information, see Use DMS to access sandbox instances or Use ECS to access sandbox instances.

Note The client, such as an ECS instance, that you use to connect to the sandbox instance must be deployed within the same VPC as the sandbox instance.