All Products
Search
Document Center

AnalyticDB:Clone a cluster

Last Updated:Oct 28, 2025

You can clone a source AnalyticDB for MySQL cluster to a new cluster to restore data or to simulate your production environment for tests, such as stress tests.

Prerequisites

  • If you restore a cluster to a point in time, make sure that log backup is enabled.

  • If you restore a cluster from a backup set, make sure that the source cluster has at least one backup set.

Limits

  • The following table describes the cross-account and cross-region cloning capabilities for different AnalyticDB for MySQL editions.

    Feature

    Enterprise Edition

    Basic Edition

    Data Lakehouse Edition

    Data Warehouse Edition

    Clone a cluster across accounts

    ✔️

    ✔️

    ✔️

    ✔️

    Clone a cluster across regions

    ✔️

    ✔️

    ✔️

    ✖️

  • Cross-region cloning is not supported in the US (Silicon Valley) or US (Virginia) regions.

  • You cannot change the cluster mode when you clone a Data Warehouse Edition cluster. A cluster in reserved mode can be cloned only to another cluster in reserved mode, not to a cluster in elastic mode.

  • You cannot clone an Enterprise Edition cluster to a Basic Edition cluster.

  • Clusters in the Chinese mainland can be cloned only to other regions in the Chinese mainland. You cannot clone them to the China (Hong Kong) region or regions outside China.

Data cloning scope

  • Data that can be cloned:

    • Database accounts and passwords of the source cluster.

    • Data written to the source cluster before the clone operation starts.

  • Data that cannot be cloned: The whitelist configuration of the source cluster.

Costs

You are charged for the new cluster. For more information about the pricing of a new cluster, see Pricing of Enterprise Edition and Basic Edition clusters, Pricing of Data Lakehouse Edition clusters, and Pricing of Data Warehouse Edition clusters.

Backup and restoration duration

Note

The estimation methods and examples for cluster backup and restoration duration in this topic are for reference only. The actual duration is displayed in the console.

Source type for cloning is Backup Set

If you restore data from a backup set, AnalyticDB for MySQL downloads the backup set to restore the data to a new cluster. The restoration duration is calculated as follows:

  • If the source cluster is a Data Warehouse Edition cluster in reserved mode, the restoration duration depends on the size of the backup set and the number of node groups. The data download speed for each node group is about 100 MB/s.

    • Estimation method: Restoration duration = Backup set size / (100 MB/s) / (Number of node groups).

      On the Clusters page, click the Data Warehouse Edition tab to view the Node Groups for the source cluster.1

    • Example

      For example, a source cluster has one node group and a backup set of 1 TB. If you restore the cluster to a new cluster from a Backup Set, the estimated duration is:

      (1 TB × 1024 × 1024) / (100 MB/s) / 1 node group = 10,485.76 seconds.

  • For clusters other than Data Warehouse Edition clusters in reserved mode, the restoration duration depends on the size of the backup set and the number of elastic I/O units (EIUs). The data download speed for each EIU is about 100 MB/s.

    • Estimation method: Restoration duration = Backup set size / (100 MB/s) / (Number of EIU groups).

      Important

      When you clone a cluster across regions, the backup files are first copied to the destination region before the clone operation is performed. Therefore, cross-region cloning takes longer than the estimated time. The cross-region copy process includes a preparation step and a copy step. The time required for these two steps depends on the number of backup files and the copy speed, and cannot be estimated.

      Execute the following statement to query the number of EIUs groups for the source cluster:

      SELECT COUNT(*) FROM information_schema.kepler_meta_instance_group;
    • Example

      For example, a source cluster has one EIU group and a backup set of 1 TB. If you restore the cluster to a new cluster from a Backup Set, the estimated duration is:

      (1 TB × 1024 × 1024) / (100 MB/s) / 1 EIU group = 10,485.76 seconds.

Source type for cloning is Point in Time

You can restore data from a source cluster to a new cluster from a specific point in time. This process uses a full backup set and the redo logs that are generated after the backup. The restoration duration is the sum of the time required to restore the backup set and the time required to apply the redo logs.

  • The time required to restore the backup set is estimated in the same way as when the Source Type for Cloning is set to Backup Set.

  • The time required to apply the redo logs cannot be estimated. This is because the amount of redo logs to download and the restoration speed are affected by multiple factors.

Important

When you clone a cluster across regions, the backup files are first copied to the destination region before the clone operation is performed. Therefore, cross-region cloning takes longer than the estimated time. The cross-region copy process includes a preparation step and a copy step. The time required for these two steps depends on the number of backup files and the copy speed, and cannot be estimated.

Procedure

Clone a cluster within the same account

  1. Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, click the tab for the cluster edition. Find the target cluster and choose More > Restore Cluster in Same Region.

  3. Set parameters such as Source Cluster for Cloning, Source Type for Cloning, Source Backup Set for Cloning, and Point in Time. The following table describes the parameters.

    Parameter

    Description

    Billing Method

    Select a billing method for the new cluster.

    Cross-account Clone

    Specifies whether to clone the cluster across Alibaba Cloud accounts. Select No.

    Source Cluster For Cloning

    The ID of the source cluster to be cloned. You do not need to select an ID.

    Source Type For Cloning

    Two source types are supported:

    • Backup Set: Clones data from the target backup set to the new cluster.

    • Point In Time: Clones data at the target Point In Time to the new cluster.

    Source Backup Set For Cloning

    Select the target backup set from the drop-down list.

    Note
    • The start time of each backup set is displayed. You can use this time to determine if it is the backup set you want to restore.

    • This parameter is available only when Source Type For Cloning is set to Backup Set.

    Point In Time

    Select a point in time.

    Note
    • This parameter is available only when Source Type For Cloning is set to Point In Time.

    • You can select a point in time within the last seven days, up to five minutes before the current time.

    Cross-region Clone

    Specifies whether to clone the cluster across regions. The default value is No.

    Note

    You cannot clone a Data Warehouse Edition cluster across regions.

    Region

    Zone

    Select the region and zone for the new cluster.

    Note

    When you clone a cluster within the same region, the new cluster must be in the same region as the source cluster, but they can be in different zones.

    For example, if the source cluster is in the China (Hangzhou) region, the Region for the new cluster is fixed to China (Hangzhou) and does not need to be selected.

    Network Type

    This is fixed to VPC and does not need to be selected.

    VPC

    vSwitch

    Select the VPC and vSwitch for the new cluster.

    Automatically Enable PVL Service

    PrivateLink establishes secure and stable private connections between a Virtual Private Cloud (VPC) and Alibaba Cloud services. This avoids potential security risks from accessing services over the public network. You must enable this service to create a cluster. Each Alibaba Cloud account needs to enable it only once. The service is free.

    Note

    If the purchase page does not prompt you to enable the PVL service, it is already enabled and you do not need to select it.

    Disk Encryption

    After disk encryption is enabled, the system encrypts the entire data disk based on Elastic Block Storage. This protects your data security because even if a data backup is leaked, it cannot be decrypted.

  4. Select a cluster Edition, configure cluster parameters, and then click Buy Now in the lower-right corner.

  5. Based on the Product Type of the source cluster, follow the instructions in the console to complete the purchase.

    After the payment is successful, wait about 20 minutes. You can then view the new cluster in the Cluster List.

Clone a cluster across accounts

  1. Log on to the Resource Access Management (RAM) console using the Alibaba Cloud account of the source cluster. Configure RAM authorization to allow the destination Alibaba Cloud account to read the AnalyticDB for MySQL resources of the source Alibaba Cloud account.

    1. Create a RAM role. For more information, see Create a RAM role for a trusted Alibaba Cloud account.

      Note

      When you configure the Select Trusted Alibaba Cloud Account parameter, select Other Alibaba Cloud Account and enter the Alibaba Cloud account ID of the destination account. You can log on to the Account Center to view the Account ID on the Overview page.

    2. Grant the AliyunADBReadOnlyAccess permission to the RAM role. For more information, see Grant permissions to a RAM role.

    3. Modify the trust policy. For more information, see Modify the trust policy of a RAM role.

      {
        "Statement": [
          {
            "Action": "sts:AssumeRole",
            "Effect": "Allow",
            "Principal": {
              "RAM": [
                "acs:ram::testAccountID:root"
              ],
              "Service": [
                "testAccountID@ads.aliyuncs.com"
              ]
            }
          }
        ],
        "Version": "1"
      }
      Note

      Replace testAccountID with the destination Alibaba Cloud account ID.

  2. Use the destination Alibaba Cloud account to log on to the AnalyticDB for MySQL console. In the upper-left corner, select the region where the cluster resides. In the navigation pane on the left, click Clusters.

  3. On the Clusters page, find a cluster that has the same edition as the source cluster. In the Actions column of the cluster, choose More > Restore Cluster in Same Region.

    If no such cluster exists, you must create one first. For more information, see Create a cluster.

  4. Set parameters such as Source Cluster for Cloning, Source Type for Cloning, Source Backup Set for Cloning, and Point in Time. The following table describes the parameters.

    Parameter

    Description

    Billing Method

    Select a billing method for the new cluster.

    Cross-account Clone

    Specifies whether to clone the cluster across Alibaba Cloud accounts. Select Yes.

    Cross-account UID

    The Alibaba Cloud account that owns the source cluster.

    Cross-account Role

    The name of the RAM role created in Step 1.

    Cross-account Instance ID

    The ID of the source cluster.

    Cross-account Backup Set ID

    The ID of the backup set. You do not need to select an ID.

    Source Cluster For Cloning

    The ID of the source cluster to be cloned. You do not need to select an ID.

    Note

    This parameter has no actual meaning for cross-account cloning and can be ignored.

    Source Type For Cloning

    Two source types are supported:

    • Backup Set: Clones data from the target backup set to the new cluster.

    • Point In Time: Clones data at the target Point In Time to the new cluster.

    Note

    This parameter has no actual meaning for cross-account cloning and can be ignored.

    Source Backup Set For Cloning

    Select the target backup set from the drop-down list.

    Note
    • This parameter is available only when Source Type For Cloning is set to Backup Set. This parameter has no actual meaning for cross-account cloning and can be ignored.

    • The start time of each backup set is displayed. You can use this time to determine if it is the backup set you want to restore.

    Point In Time

    Select a point in time.

    Note
    • This parameter is available only when Source Type For Cloning is set to Point In Time. This parameter has no actual meaning for cross-account cloning and can be ignored.

    • You can select a point in time within the last seven days, up to five minutes before the current time.

    Edition

    Select the cluster edition.

    Region

    Zone

    Select the region and zone for the new cluster.

    Note

    When you clone a cluster within the same region, the new cluster must be in the same region as the source cluster, but they can be in different zones.

    For example, if the source cluster is in the China (Hangzhou) region, the Region for the new cluster is fixed to China (Hangzhou) and does not need to be selected.

    Network Type

    This is fixed to VPC and does not need to be selected.

    VPC

    vSwitch

    Select the VPC and vSwitch for the new cluster.

    Automatically Enable PVL Service

    PrivateLink establishes secure and stable private connections between a Virtual Private Cloud (VPC) and Alibaba Cloud services. This avoids potential security risks from accessing services over the public network. You must enable this service to create a cluster. Each Alibaba Cloud account needs to enable it only once. The service is free.

    Note

    If the purchase page does not prompt you to enable the PVL service, it is already enabled and you do not need to select it.

    Disk Encryption

    After disk encryption is enabled, the system encrypts the entire data disk based on Elastic Block Storage. This protects your data security because even if a data backup is leaked, it cannot be decrypted.

  5. Select a cluster Edition, configure cluster parameters, and then click Buy Now in the lower-right corner.

  6. Based on the Product Type of the source cluster, follow the instructions in the console to complete the purchase.

    After the payment is successful, wait about 20 minutes. You can then view the new cluster in the Cluster List.

  7. (Optional) After you clone the cluster, if you created a temporary cluster to initiate the clone operation and no longer need it, release the cluster promptly. For more information, see Delete or unsubscribe from a cluster.

What to do next

After the cloned cluster is created, you can log on to the new cluster to verify the data. After you confirm that the data is correct, you can use the new cluster for business tests and other operations. For more information about how to log on to a cluster, see Connect to a cluster.