Cluster Recycle stores released PolarDB clusters. You can perform actions on clusters in Cluster Recycle, such as restoring released clusters to new clusters and deleting the backup sets of released clusters. This topic uses a ApsaraDB PolarDB MySQL-compatible edition cluster as an example to describe how to restore clusters in Cluster Recycle.

Precautions

  • Released clusters in Cluster Recycle must have at least one backup set. If all the backup sets of a cluster have been deleted, you cannot restore the released cluster.
  • After a cluster is released, all level-1 backups in Cluster Recycle are asynchronously archived to level-2 backups at a rate of approximately 150 MB/s. For more information about backups, see Data backups.

Procedures

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region where the cluster is deployed.
  3. In the left-side navigation pane, click Cluster Recycle.
  4. Find the cluster that you want to restore, and click Restore to New Cluster in the Actions column.
    Restore data to a new cluster
  5. Select Subscription or Pay-As-You-Go in the Product Type section.
    • Subscription: Pay for the compute nodes when you create the cluster. You are charged by hour for the storage space that is occupied by the actual amount of data. The charges are deducted from your account balance on an hourly basis.
    • Pay-As-You-Go: An upfront payment is not required. You are charged by hour for the compute nodes and the storage space that is consumed by the actual amount of data. The charges are deducted from your account balance on an hourly basis.
  6. Configure the following parameters.
    Parameter Description
    Region The region where the cluster resides. You cannot change the region after the cluster is created.
    Note Make sure that the PolarDB cluster and the ECS instance you want to connect to the cluster are deployed in the same region. Otherwise, the cluster and the ECS instance cannot communicate over the internal network, which results in decreased performance.
    Create Type Select Recover from Recycle to restore the released cluster from Cluster Recycle.
    Source Version Select the version of the released cluster.
    Deleted Clusters Select the ID of the released cluster.
    Backup History Select the backup set to restore.
    Note The Backup History drop-down list displays the timestamps of backup sets in UTC. However, the Backups tab displays timestamps of backup sets in the same time zone as the system time. Make sure that you choose the correct backup set.

    For example, if the timestamp of a backup set on the Backups tab is 11:19:30 on May 28, 2021 (UTC+08:00), select 2021-05-28T03:19:30Z (UTC) in the Backup History drop-down list.

    Primary Availability Zone Select the primary zone where the cluster is deployed.
    Note In regions that have two or more availability zones, PolarDB automatically replicates data to the secondary zone for disaster recovery.
    Network Type This parameter can only be set to VPC.
    VPC Select a VPC and a VSwitch for the cluster. We recommend that you use the same VPC and VSwitch that are used for the original cluster.
    Note Make sure that the PolarDB cluster and the ECS instance you want to connect to the cluster are deployed in the same VPC. Otherwise, the cluster and the ECS instance cannot communicate over the internal network, which results in decreased performance.
    VSwitch
    Compatibility By default, the database engine version of the PolarDB cluster is the same as that of the released cluster. You do not need to change this parameter value.
    Edition This parameter can only be set to Cluster (2-16 Nodes) (Recommended).
    Specification Type PolarDB Cluster Edition has the following two types of specifications: General Specification and Dedicated Specification.
    • Dedicated: The computing resources such as CPUs that are allocated to each cluster are exclusive to the cluster. This improves the stability and reliability.
    • General-purpose: Idle computing resources such as CPUs are shared among clusters on the same server for cost-effectiveness.

    For more information about the two types of specifications, see Comparison between general-purpose compute nodes and dedicated compute nodes.

    Node Specification Select a node specification. The maximum storage capacity and performance of clusters vary based on node specifications. For more information, see Specifications of compute nodes.
    Note We recommend that you select a node specification that is the same or higher than the node specification of the original cluster. This ensures that the new cluster runs as expected.
    Nodes
    • The default number of nodes of the Cluster (2-16 Nodes) (Recommended) edition is 2. You do not need to change the value of this parameter.
      Note By default, a new cluster of Cluster Edition contains one primary node and one read-only node. After a cluster is created, you can add nodes to the cluster. A cluster can contain one primary node and up to 15 read-only nodes. For more information about how to add nodes, see Add or remove read-only nodes.
    • The default number of nodes of the Single Node (Starter) and Archive Database (High Compression Ratio) editions is 1. You do not need to change this parameter value.
    Storage Cost You do not need to select the storage capacity when you purchase PolarDB clusters. You are charged for the storage capacity used on an hourly basis. You can also purchase a storage plan based on your business requirements. For more information about how to purchase a storage plan, see Purchase a storage plan.
    Time Zone The time zone of the cluster. The default value is UTC+08:00.
    Table Name Case Sensitivity Specifies whether table names of the cluster are case-sensitive. The default value is Not Case-sensitive (Default). If the databases in your instance have case-sensitive names, we recommend that you select Case-sensitive.
    Note This parameter value cannot be changed after the cluster is created. Proceed with caution.
    Release Cluster The backup set retention policy that is used when the cluster is deleted or released. The default value is Retain Last Automatic Backup (Automatic Backup before Release) (Default).
    • Retain Last Automatic Backup (Automatic Backup before Release) (Default): retains the last backup set when you release the cluster.
    • Retain All Backups: retains all backups when you delete the cluster.
    • Delete All Backups (Cannot be restored): deletes all backups when you delete the cluster.
    Note If you retain backup sets after you delete or release the cluster, you may be billed for storage costs. You can delete the backup sets to reduce costs. For more information, see Billing rules of data backups that exceed the free quota.
    Cluster Name The name of the cluster. The name must meet the following requirements:
    • It cannot start with http:// or https://.
    • It must be 2 to 256 characters in length.

    If you do not specify this parameter, the system automatically generates a cluster name. You can change the name after the cluster is created.

    Resource Group Select a resource group that you want to manage. For more information about how to create resource groups, see Create a resource group.
    Note A resource group is a container that contains a group of resources in an Alibaba Cloud account. You can manage these resources in a centralized manner. A resource can belong to only one resource group. For more information, see Use RAM to create and authorize resource groups.
    Purchase Plan Specify Purchase Plan for the cluster.
    Note This parameter is available only when the Billing Method parameter is set to Subscription.
    Number Select the number of clusters you want to purchase.
  7. Complete the rest of the steps based on the billing method of the cluster.
    • Pay-as-you-go
      1. Click Buy Now.
      2. On the Confirm Order page, confirm your order information. Read and accept the terms of service, and then click Buy Now.
    • Subscription
      1. Click Buy Now.
      2. On the Confirm Order page, confirm your order information. Read and accept the terms of service, and then click Buy Now.
      3. On the Purchase page, confirm the information of the unpaid order and the payment method and click Purchase.
    Note The amount of time required to restore data to a new cluster depends on the size of the backup set. It takes more time for the system to restore data from a larger backup set. After the cluster is created, you can return to the PolarDB console and view the new cluster on the Clusters page.

Related API operations

API Description
CreateDBCluster You can call the CreateDBCluster operation to restore the data of a PolarDB cluster.
Note You must set CreationOption to CloneFromPolarDB.