The sandbox feature that is provided by Database Backup (DBS) allows you to create databases from backup sets in a short period of time. Read and write operations are performed within each sandbox instance and do not affect source databases. Sandbox instances are isolated from each other. This topic describes how to create and use DBS sandbox instances.
Prerequisites
- The data source is a self-managed MySQL database. For more information about how to connect to a data source, see Add a data source.
- A backup schedule is created, and at least one full backup is complete. Create a backup schedule. For more information, see Back up one or more databases.
- The backup schedule is in the Running state.
- A virtual private cloud (VPC) is created for connecting to sandbox instances. For more information, see Default VPC and default vSwitch.
Background information
The DBS sandbox feature uses data deduplication and storage virtualization to resolve the issues of increasing storage and use costs of traditional database backup services. Data deduplication and incremental merge allow you to keep full backup data available on the server. Storage virtualization can provide replicas of full backup data for read and write operations without the need to copy data. For more information about the benefits, scenarios, billing, and limits of the sandbox feature, see Overview.
This topic describes the emergency disaster recovery of a self-managed database. For more information about the emergency disaster recovery of an ApsaraDB RDS database, see Create a sandbox instance for the emergency disaster recovery of an ApsaraDB RDS for MySQL database.
- Enable the sandbox feature
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.
- Create a sandbox instance
- Connect to the sandbox instance
You can obtain the endpoint of the sandbox instance in the DBS 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 Elastic Compute Service (ECS). For more information, see Use DMS to access sandbox instances or Use ECS to access sandbox instances. Read and write operations performed within sandbox instances do not affect source databases. You can perform various operations in sandbox instances, such as analysis, testing, verification, and emergency disaster recovery.
Billing
- 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.
Enable the sandbox feature
Create a sandbox instance
What to do next
- The client that you use to connect to the sandbox instance, such as an ECS instance, must be deployed within the same VPC as the sandbox instance.
- The username, password, and all other configurations of the sandbox instance must be consistent with those of the source database.