All Products
Search
Document Center

PolarDB:Method 1 for full restoration: Restore data from a backup set

更新時間:Dec 19, 2024

Full restoration is a method of restoring all historical data of a PolarDB cluster to a new cluster. After you verify the accuracy of the data in the new cluster, you can migrate the restored data to the original cluster. Full restoration can be performed based on backup sets or points in time. This topic describes how to restore all historical data of a cluster from a backup set.

Note

Only the data and account information of the original cluster can be restored to a new cluster. The parameters of the original cluster cannot be restored to the new cluster.

Procedure

  1. Log on to the PolarDB console.

  2. In the upper-left corner, select the region in which the cluster is deployed.

  3. Find the cluster and click its ID.

  4. In the left-side navigation pane, choose Settings and Management > Backup and Restoration.

  5. Restore data to a new cluster.

    • Restoration within a region:

      Find the backup set from which you want to restore data and click Restore Data to New Cluster in the Actions column.

    • Restoration across regions:

      1. On the Backup and Restore page, select the region in which the backup set is located.

      2. Find the backup set from which you want to restore data and click Restore Data to New Cluster in the Actions column.

  6. On the Clone Instance page, select a billing method for the new cluster.

    • Subscription: When you create a cluster, you need to make a payment for the use of the cluster for a specific period of time.

    • Pay-as-you-go: When you create clusters, you do not need to make a payment first. You are charged for the computing and storage resources that you use.

  7. Configure the parameters that are described in the following table.

    Parameter

    Description

    Clone Source Type

    Select Backup Set.

    Clone Source Backup Set

    Select the backup set from which you want to restore data.

    Note

    The Backup Start Time of each backup set is displayed. You can determine whether to select the backup set based on this backup time.

    Region

    Select the region to which the data is to be restored.

    Note
    • If you enable cross-region backup, you can restore data from the backup set to clusters in the source and destination regions.

    • By default, if you do not enable cross-region backup, the new cluster is located in the same region as the original cluster. You do not need to change this value.

    Primary Zone

    Select the primary zone in which you want to deploy the new cluster.

    Note

    In regions that have two or more zones, PolarDB automatically replicates the data to the secondary zone for disaster recovery.

    Network Type

    This parameter is automatically set to VPC. You do not need to change this value.

    VPC

    Select a VPC and a vSwitch for the new cluster. We recommend that you select the same VPC and vSwitch that are connected to the original cluster.

    Note

    Make sure that the PolarDB 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.

    vSwitch

    Compatibility

    This parameter is automatically set to the value of Compatibility that is specified for the original cluster. You do not need to change this value.

    For example, if the value of Compatibility that is specified for the original cluster is MySQL 8.0, Compatibility is automatically set to MySQL 8.0 for the new cluster. The value MySQL 8.0 specifies that the cluster is fully compatible with MySQL 8.0.

    Minor Version

    Select 8.0.1 or 8.0.2.

    Note

    This parameter is valid only when the Compatibility parameter is set to MySQL 8.0.

    Edition

    This parameter is automatically set to the edition of the original cluster. You do not need to change this value.

    For example, if the edition of the original cluster is Cluster Edition (Recommended), the edition of the new cluster is automatically set to Cluster Edition (Recommended). For more information, see Editions.

    Specification Type

    Select General-purpose or Dedicated for PolarDB for MySQL Cluster Edition.

    • Dedicated: Computing resources such as CPUs that are allocated to each cluster are exclusive to the cluster. This improves the stability and reliability of the cluster.

    • General-purpose: Idle computing resources such as CPUs are shared among clusters on the same server for cost-effectiveness.

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

    CPU Architecture

    This parameter is automatically set to the CPU architecture of the original cluster. You do not need to change this value.

    Node Specification

    Select a node specification. The maximum storage capacity and performance of clusters vary based on node specifications. For more information, see Compute node specifications of PolarDB for MySQL Enterprise Edition.

    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

    • If your source cluster is of Cluster Edition (Recommended), the cluster consists of one primary node and one read-only node by default. You can select two nodes (a primary node and a read-only node) or one node (a primary node).

    • If your source cluster is of Multi-master Cluster (Database/Table) Edition, the system creates two primary nodes with the same specifications by default. In this case, you do not need to configure this parameter.

    PolarProxy Type

    PolarDB provides two PolarProxy types: Standard Enterprise Edition and Dedicated Enterprise Edition.

    • The Standard Enterprise Edition option is available for General-purpose clusters. which shares CPU resources and provides smart elastic scaling capabilities within seconds based on business loads.

    • The Dedicated Enterprise Edition option is available for Dedicated clusters. This PolarProxy type occupies all allocated CPU resources and provides better stability.

    Note

    The PolarProxy Enterprise Edition is currently available free of charge but may be charged in the future.

    Table Name Case Sensitivity

    You can specify whether table names in the cluster are case-sensitive. The default value of this parameter is Case-insensitive (Default). If table names in your on-premises database are case-sensitive, select Case-sensitive to facilitate data migration.

    Note

    After the cluster is created, you cannot change the value of this parameter. We recommend that you configure this parameter based on your business requirements.

    PolarProxy Specification

    The specifications of PolarProxy. Valid values:

    • 2C: 2 CPU cores.

    • 4C: 4 CPU cores.

    • 8C: 8 CPU cores.

    • 16C: 16 CPU cores.

    Cross-zone Strong Consistency

    This parameter is automatically set to the value of the original cluster. You do not need to change this value.

    Enable Hot Standby Cluster

    PolarDB provides multiple high availability modes. After you enable the hot standby storage cluster feature for a PolarDB cluster, a hot standby storage cluster is created in the secondary zone of the region in which the PolarDB cluster resides or in a different data center in the same zone. The hot standby storage cluster has independent storage resources. Whether the hot standby storage cluster has independent compute resources varies based on the high availability mode. When the PolarDB cluster in the primary zone fails, the hot standby storage cluster immediately takes over and handles read and write operations and storage tasks.

    Note
    • For more information about the hot standby storage cluster and related solutions, see High availability modes (hot standby clusters).

    • Rules for changing high availability modes:

      • You cannot directly change the high availability mode of a cluster from Double Zones (Hot Standby Storage Cluster Enabled) or Double Zones (Hot Standby Storage and Compute Clusters Enabled) to Single Zone (Hot Standby Storage Cluster Disabled).

        For such change of the high availability mode, we recommend that you purchase a new cluster and select the Single Zone (Hot Standby Storage Cluster Disabled) high availability mode for the cluster. Then, migrate the existing cluster to the new cluster by using Data Transmission Service (DTS). For information about how to migrate an existing cluster to a new cluster, see Migrate data between PolarDB for MySQL clusters.

      • You can select the Three Zones high availability mode only when you purchase a new cluster. You cannot change the high availability mode of a cluster from Three Zones to other high availability modes and vice versa.

    • You can manually change the high availability mode of a cluster from Single Zone (Hot Standby Storage Cluster Disabled) to a different high availability mode. For more information, see High availability modes (hot standby clusters).

    Storage Type

    PolarDB supports the following storage types:

    • PSL5: the storage type supported by historical versions of PolarDB. This was the default storage type for PolarDB clusters purchased before June 7, 2022. It delivers higher performance, reliability, and availability.

    • PSL4: a new storage type for PolarDB. This type uses the Smart-SSD technology developed in-house by Alibaba Cloud to compress and decompress data that is stored on SSD disks. It can minimize the storage costs of data while maintaining a high disk performance.

      Note

      The storage type of existing clusters cannot be changed. To use PSL4, we recommend that you purchase a new cluster, set the storage type of the new cluster to PSL4, and then migrate data to the new cluster.

    Storage Engine

    PolarDB provides two engine types: InnoDB and InnoDB & X-Engine.

    • InnoDB: deploys only the InnoDB storage engine.

    • InnoDB & X-Engine:: deploys both InnoDB and X-Engine. After you select this option, specify the ratio of X-Engine Memory Usage. For more information, see Overview.

    Note

    This parameter is invalid for PolarDB for MySQL Standard Edition.

    Storage Billing Method

    PolarDB supports the pay-as-you-go and subscription storage billing methods.

    • Pay-as-you-go: The storage capacity is provided based on a serverless architecture. This way, you do not need to specify the storage capacity when you purchase clusters. The storage capacity of the clusters can be automatically scaled up as the volume of data increases. You are charged for the actual data volume. For more information, see Pay-as-you-go.

    • Subscription: You must purchase a specific amount of storage capacity when you create the cluster. For more information, see Subscription.

    Note

    If the Billing Method parameter is set to Subscription, you can select Pay-as-you-go or Subscription as the value of Storage Billing Method. If the Billing Method parameter is set to Pay-as-you-go, you cannot change the default value of this parameter, which is Pay-as-you-go.

    Storage Capacity

    The amount of storage capacity that you want to purchase for your cluster. The storage capacity ranges from 50 GB to 500 TB, in 10 GB increments.

    Note

    This parameter is valid only when Storage Billing Method is set to Subscription.

    Storage Cost

    You do not need to specify the required storage when you purchase the PolarDB cluster. You are charged for storage usage on an hourly basis. In addition, you can purchase storage plans based on your business requirements. For more information, see Purchase a storage plan.

    Enable Binary Logging

    Specifies whether to select Enable Binary Logging. For more information about binary logging, see Enable binary logging.

    Cluster Name

    The name of the cluster. The name must meet the following requirements:

    • The name cannot start with http:// or https://.

    • The name 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.

    Duration

    Select a duration for the new cluster.

    Note

    This parameter is valid only when Billing Method is set to Subscription.

    Quantity

    Select the number of clusters that you want to purchase.

  8. Read and accept the Terms of Service, and complete the rest of the steps based on the billing method of the cluster.

    • Pay-as-you-go

      Click Buy Now.

    • Subscription

      1. Click Buy Now.

      2. On the Purchase page, confirm the order and the payment method, and click Purchase.

    Note

    After you complete the payment, it takes 10 to 15 minutes to create the cluster. Then, you can view the new cluster on the Clusters page.

Related API operations

Operation

Description

CreateDBCluster

Restores the data of a PolarDB cluster.

Note

You must set CreationOption to CloneFromPolarDB.