You can clone a source AnalyticDB for MySQL cluster to create another AnalyticDB for MySQL cluster by using backup sets. This topic describes how to clone an AnalyticDB for MySQL cluster.
Scenarios
To perform business testing such as stress testing, you can deploy your business in an environment that simulates real-world scenarios. In this case, you can clone a source AnalyticDB for MySQL cluster to create another AnalyticDB for MySQL cluster and perform tests on the new cluster. This way, testing accuracy can be ensured without disrupting your business.
Prerequisites
The source cluster does not have Data Transmission Service (DTS) migration tasks in progress.
NoteYou can log on to the DTS console and go to the Data Migration page to view the migration task status of the source cluster.
If you want to restore cluster data to a specific point in time, make sure that the log backup feature is enabled for the source cluster.
If you want to restore cluster data from backup sets, make sure that the source cluster has at least one backup set.
Usage notes
The following data can be cloned:
The database account and password of the source cluster.
The data that is written to the source cluster before the clone operation starts.
The following data cannot be cloned: the whitelist settings of the source cluster.
Pricing
You are charged for the new cluster. For more information, see Pricing for Data Warehouse Edition (V3.0) and Pricing for Data Lakehouse Edition (V3.0).
Amount of time required for restoration
The following estimation methods and examples are for reference only.
Restoration from backup sets
Restoration to a point in time
Procedure
Source cluster in elastic mode
If the source cluster is in elastic mode, you can set the edition of the new cluster to Data Lakehouse Edition or Data Warehouse Edition.
Log on to the AnalyticDB for MySQL console.
In the upper-left corner of the console, select a region.
On the Data Warehouse Edition (V3.0) tab, find the cluster that you want to clone and choose More > Restore Cluster in the Actions column.
Configure the parameters that are described in the following table.
Parameter
Description
Source Cluster
The ID of the AnalyticDB for MySQL cluster that you want to clone. You do not need to specify this parameter.
Restore Mode
The method that is used to clone the cluster. Valid values:
Backup Set: clones data from a backup set to a new cluster.
Backup Point-in-time: clones data at a specific point in time to a new cluster.
Backup Set
The backup set that you want to restore.
NoteThe backup start time of each backup set is displayed. You can select the backup set that you want to restore based on the time.
This parameter is available only when you set the Restore Mode parameter to Backup Set.
Backup Point-in-time
The point in time to which you want to restore data.
NoteThis parameter is available only when you set the Restore Mode parameter to Backup Point-in-time.
You can set this parameter to a point in time from 5 minutes to seven days before the current time.
Region
Zone
The region and zone where the new cluster is located.
NoteThe new and source clusters must be located within the same region.
For example, if the source AnalyticDB for MySQL cluster resides in the China (Hangzhou) region, the Region parameter is automatically set to China (Hangzhou) for the new cluster. You do not need to specify this parameter.
Network Type
The network type of the new cluster. This parameter is automatically set to VPC. You do not need to specify this parameter.
VPC
VSwitch
The virtual private cloud (VPC) in which the new cluster resides and the vSwitch to which the new cluster is connected.
Set the Edition parameter to Data Lakehouse Edition or Data Warehouse Edition, configure the corresponding parameters, and then click Buy Now in the lower-right corner of the page.
Data Lakehouse Edition
Parameter
Description
Reserved Computing Resources
The reserved computing resources of the new cluster.
Reserved Storage Resources
The reserved storage resources of the new cluster.
Data Warehouse Edition
Set the Mode parameter to Elastic Mode or Reserved Mode and configure the corresponding parameters.
NoteFor more information about the elastic mode and reserved mode, see Editions.
Perform the subsequent purchase operations as prompted based on the Product Type parameter of the source cluster.
Approximately 20 minutes after you complete the payment, you can view the new cluster on the Clusters page.
Source cluster in reserved mode
Log on to the AnalyticDB for MySQL console.
In the upper-left corner of the console, select a region.
On the Data Warehouse Edition (V3.0) tab, find the cluster that you want to clone and choose More > Restore Cluster in the Actions column.
Configure the parameters that are described in the following table.
Parameter
Description
Source Cluster
The ID of the AnalyticDB for MySQL cluster that you want to clone. You do not need to specify this parameter.
Restore Mode
The method that is used to clone the cluster. Valid values:
Backup Set: clones data from a backup set to a new cluster.
Backup Point-in-time: clones data at a specific point in time to a new cluster.
Backup Set
The backup set that you want to restore.
NoteThe backup start time of each backup set is displayed. You can select the backup set that you want to restore based on the time.
This parameter is available only when you set the Restore Mode parameter to Backup Set.
Backup Point-in-time
The point in time to which you want to restore data.
NoteThis parameter is available only when you set the Restore Mode parameter to Backup Point-in-time.
You can set this parameter to a point in time from 5 minutes to seven days before the current time.
Version
The edition of the new AnalyticDB for MySQL cluster. This parameter is automatically set to Data Warehouse Edition.
Region
Zone
The region and zone where the new cluster is located.
NoteThe new and source clusters must be located within the same region.
For example, if the source AnalyticDB for MySQL cluster resides in the China (Hangzhou) region, the Region parameter is automatically set to China (Hangzhou) for the new cluster. You do not need to specify this parameter.
Network Type
The network type of the new cluster. This parameter is automatically set to VPC. You do not need to specify this parameter.
VPC
VSwitch
The VPC in which the new cluster resides and the vSwitch to which the new cluster is connected.
Set the Mode parameter to Elastic Mode or Reserved Mode, configure the corresponding parameters, and then click Buy Now in the lower-right corner of the page.
NoteFor more information about the elastic mode and reserved mode, see Editions.
Perform the subsequent purchase operations as prompted based on the Product Type parameter of the source cluster.
Approximately 20 minutes after you complete the payment, you can view the new cluster on the Clusters page.
What to do next
After the new cluster is created, you can connect to the new cluster to verify data. After you check the data integrity, you can perform operations such as business tests on the new cluster. For more information, see Connect to an AnalyticDB for MySQL cluster.