All Products
Search
Document Center

PolarDB:Restore a released cluster

Last Updated:Oct 19, 2023

This topic uses a PolarDB for PostgreSQL(Compatible with Oracle) cluster as an example to describe how to restore clusters in Cluster Recycle.

Usage notes

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

Procedure

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
  3. In the left-side navigation pane, click Cluster Recycle Bin.
  4. Find the cluster that you want to restore, and click Restore Data to New Cluster in the Actions column.
    Restore data to a new cluster
  5. Set Product Type to Subscription or Pay-As-You-Go.
    • Subscription: When you create a cluster, you must pay for compute nodes. You are charged for the use of storage resources and the costs are deducted from your account balance on an hourly basis.
    • Pay-As-You-Go: An upfront payment is not required. You are charged for compute nodes and the amount of storage that is consumed by your data. These costs are deducted from your account balance on an hourly basis.
  6. Configure the parameters that are listed in the following table.
    ParameterDescription
    RegionThe region where the cluster is deployed. The region cannot be changed after the cluster is created.
    Note Make sure that the PolarDB for MySQL cluster is created in the same region as the Elastic Compute Service (ECS) instance to which you want to connect. Otherwise, the cluster and the ECS instance can communicate only over the Internet. As a result, the performance of the cluster may be compromised.
    Creation MethodSelect Restore from Recycle.

    This value indicates that the deleted database is restored from Cluster Recycle.

    Source VersionSelect the version of the released cluster.
    Deleted ClustersSelect the name of the deleted cluster.
    Backup HistorySelect the backup set to restore.
    Note The timestamps of the backups in the Backup History drop-down list are displayed in UTC. The timestamps of backups in the Backups list are displayed in the system time format. Make sure that you choose the correct historical backup. For example, the timestamp of a backup set in the Backup History is 2020-05-08T02:00:00Z. The corresponding timestamp in the backup list is 10:00:00 on May 8, 2020 (UTC+08:00).
    Primary ZoneThe primary zone where the cluster is deployed.
    • Each zone is an independent geographical location in a region. All of the zones in a region provide the same level of service performance.
    • You can choose to create your PolarDB for MySQL cluster in the same zone as an ECS instance or in a different zone from the zone of the instance.
    • You must specify only the primary zone. The system automatically selects a secondary zone.
    Network TypeThis parameter can be set only to VPC. You do not need to specify this parameter.
    VPC

    VSwitch

    Make sure that the PolarDB for MySQL cluster is created in the same VPC as the ECS instance to which you want to connect. Otherwise, the cluster and the ECS instance cannot communicate over the internal network to achieve optimal performance.
    • If you have an existing VPC that meets your network requirements, select the VPC. For example, if you have an existing ECS instance and the VPC to which the ECS instance belongs meets your network requirements, select this VPC.
    • Otherwise, use the default VPC and the default vSwitch.
      • Default VPC:
        • Only one VPC is specified as the default VPC in the region that you select.
        • The default VPC uses a 16-bit subnet mask. For example, the CIDR block 172.31.0.0/16 provides up to 65,536 private IP addresses.
        • The default VPC does not count towards the quota of VPCs that you can create on Alibaba Cloud.
      • Default vSwitch:
        • Only one vSwitch is specified as the default vSwitch in the zone that you select.
        • The default VPC uses a 20-bit subnet mask. For example, the CIDR block 172.16.0.0/20 provides up to 4,096 private IP addresses.
        • The default vSwitch does not count towards the quota of vSwitches that you can create in a VPC.
    • If the default VPC and vSwitch cannot meet your requirements, you can create your own VPC and vSwitch. For more information, see Create and manage a VPC.
    CompatibilityThe database engine version of the PolarDB for MySQL cluster. The default version is the same as the version of the deleted cluster and cannot be changed.
    EditionThe network type of the new cluster. This parameter is automatically set to Cluster Edition(Recommended). You do not need to specify this parameter.
    Node SpecificationSelect a specification based on your requirements. We recommend that you select a specification that is the same or higher than the node specification of the released cluster. For more information about the compute node specifications of PolarDB for MySQL, see Specifications and pricing.
    NodesYou do not need to specify this parameter. By default, the system creates two nodes that have the same specification: a primary node and a read-only node.
    Note If the primary node fails, the system uses the read-only node as the primary node and creates another read-only node. For more information about read-only nodes, see Architecture.
    Storage CostYou do not need to specify this parameter. The system charges you on an hourly basis based on the amount of storage that is consumed by your data. For more information, see Specifications and pricing.
    Note You do not need to specify the storage capacity when you create a cluster. The system automatically scales storage resources based on data volume.
    Enable TDESpecify whether to enable Transparent Data Encryption (TDE). After TDE is enabled, PolarDB for MySQL encrypts the data files of your cluster. You do not need to modify the code to allow access to your cluster. However, TDE reduces the performance of your cluster by 5% to 10%.
    Note TDE cannot be disabled after it is enabled.
    Cluster NameEnter the name of the cluster. The name must meet the following requirements:
    • The name cannot start with http:// or https://.
    • It must be 2 to 256 characters in length.

    If this parameter is left empty, the system automatically generates a cluster name. You can change the cluster name after the cluster is created.

    Resource GroupSelect a resource group from available resource groups. For more information, see Create a resource group.
    Note A resource group is a group of resources that belong to an Alibaba Cloud account. Resource groups allow you to manage these resources in a centralized manner. A resource belongs to only one resource group. For more information, see Use RAM to create and authorize resource groups.
    Purchase PlanSelect a purchase plan for the new cluster.
    Note This parameter is available only when the Product Type parameter is set to Subscription.
    NumberSelect the number of clusters you want to purchase.
  7. Complete the rest of the steps based on the product type 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 order and the payment method, and click Purchase.

    After you complete the payment, it requires 10 to 15 minutes to create the cluster. Then, the newly created cluster is displayed on the Clusters page.

    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

APIDescription
CreateDBClusterCreates a PolarDB for MySQL cluster.