This topic describes two methods to restore data in a PolarDB-O database.

Background information

PolarDB-O provides two methods for you to restore historical data to a new cluster. For more information, see Restore data to a specific point in time and Restore data from a backup set (snapshot).
Note The new cluster to which data is restored contains the data and account information of the original cluster, but does not contain the parameter settings of the original cluster.

Restore data to a specific point in time

  1. Log on to the PolarDB console.
  2. On the top of the page, select the region where the target cluster is located.
  3. Find the target cluster and click the cluster ID to go to the Overview page.
  4. In the left-side navigation pane, choose Settings and Management > Backup and Restore.
  5. On the Backup and Restore page, click Point-in-time Restore.
  6. On the Clone Instance page, select a billing method for the new cluster.
    • Subscription: When you create a cluster, you must pay the subscription fee for two compute nodes: a primary node and a read-only node. You are charged for the storage space based on the actual data volume on an hourly basis. The storage fee is deducted from your account balance on an hourly basis. The Subscription billing method is a cost-effective choice if you use the cluster for a long time. Longer subscription periods have larger discounts.
    • Pay-As-You-Go: If you select the pay-as-you-go billing method, you pay for the resources after you use them. You are charged for the compute nodes and the used storage space on an hourly basis. The fee is deducted from your account balance on an hourly basis. The Pay-As-You-Go billing method is a cost-effective choice if you use the cluster for a limited period of time. You can release the cluster at the end of the required period to reduce your costs.
  7. Set the following parameters.
    Type Parameter Description
    Basic Clone Source Type Select Backup Timepoint.
    Backup Timepoint Select a time point to which you want to restore the data.
    Note You can only restore the data to a time point within the last seven days.
    Region The region where the cluster resides.
    Note The default region is the same as the region of the original cluster. Use the default region.
    Primary Availability Zone Select the primary zone where the cluster resides.
    Note In regions that have two or more zones, PolarDB automatically replicates the data to the secondary zone for disaster recovery.
    Network Type The default value is VPC.
    VPC Select a VPC and a VSwitch for the cluster. We recommend that you use the same VPC and VSwitch as those of the original cluster.
    VSwitch
    Instance Compatibility The default value is Compatible with Oracle Syntax.
    Node Specification Select a node specification. The maximum storage capacity and the performance of clusters vary based on the node specifications. For more information, see Node specifications.
    Note We recommend that you select a node specification that is higher than the node specification of the original cluster. This ensures the proper running of the new cluster that contains the restored data.
    Nodes The default value is 2.
    Note By default, a new cluster has one primary node and one read-only node. After the cluster is created, you can add nodes to the cluster. A cluster can contain one primary node and a maximum of 15 read-only nodes. For more information about how to add nodes, see Add or remove a read-only node.
    Storage Cost You do not need to select the storage capacity when you purchase PolarDB clusters. You are charged for the used storage space on an hourly basis. You can also purchase a storage package to offset storage fees. For more information about how to purchase a storage package, see Use storage packages.
    Cluster Name The name of the new PolarDB cluster must meet the following requirements:
    • The name must be 2 to 128 characters in length.
    • The name must start with a letter.
    • The name can contain digits, periods (.), underscores (_), and hyphens (-).

    If you leave this field blank, the system automatically generates a cluster name. You can change the cluster name after the cluster is created.

    Purchase Plan Number Set the number of PolarDB clusters you want to purchase.
  8. Select the check box after you read the terms of the service agreement, and then click Pay to complete the payment.

Restore data from a backup set (snapshot)

  1. Log on to the PolarDB console.
  2. On the top of the page, select the region where the target cluster is located.
  3. Find the target cluster and click the cluster ID to go to the Overview page.
  4. In the left-side navigation pane, choose Settings and Management > Backup and Restore.
  5. Find the backup set (snapshot) and click Restore to New Cluster.
  6. On the Clone Instance page, select a billing method for the new cluster.
    • Subscription: When you create a cluster, you must pay the subscription fee for two compute nodes: a primary node and a read-only node. You are charged for the storage space based on the actual data volume on an hourly basis. The storage fee is deducted from your account balance on an hourly basis. The Subscription billing method is a cost-effective choice if you use the cluster for a long time. Longer subscription periods have larger discounts.
    • Pay-As-You-Go: If you select the pay-as-you-go billing method, you pay for the resources after you use them. You are charged for the compute nodes and the used storage space on an hourly basis. The fee is deducted from your account balance on an hourly basis. The Pay-As-You-Go billing method is a cost-effective choice if you use the cluster for a limited period of time. You can release the cluster at the end of the required period to reduce your costs.
  7. Set the following parameters.
    Type Parameter Description
    Basic Clone Source Type Select Backup Set.
    Clone Source Backup Set Select the backup set from which you want to restore the data. Check whether the default value is the backup set you want to select.
    Region The region where the cluster resides.
    Note The default region is the same as the region of the original cluster. Use the default region.
    Primary Availability Zone Select the primary zone where the cluster resides.
    Note In regions that have two or more zones, PolarDB automatically replicates the data to the secondary zone for disaster recovery.
    Network Type The default value is VPC.
    VPC Select a VPC and a VSwitch for the cluster. We recommend that you use the same VPC and VSwitch as those of the original cluster.
    VSwitch
    Instance Compatibility The default value is Compatible with Oracle Syntax.
    Node Specification Select a node specification. The maximum storage capacity and the performance of clusters vary based on the node specifications. For more information, see Node specifications.
    Note We recommend that you select a node specification that is higher than the node specification of the original cluster. This ensures the proper running of the new cluster that contains the restored data.
    Nodes The default value is 2.
    Note By default, a new cluster has one primary node and one read-only node. After the cluster is created, you can add nodes to the cluster. A cluster can contain one primary node and a maximum of 15 read-only nodes. For more information about how to add nodes, see Add or remove a read-only node.
    Storage Cost You do not need to select the storage capacity when you purchase PolarDB clusters. You are charged for the used storage space on an hourly basis. You can also purchase a storage package to offset storage fees. For more information about how to purchase a storage package, see Use storage packages.
    Cluster Name The name of the new PolarDB cluster must meet the following requirements:
    • The name must be 2 to 128 characters in length.
    • The name must start with a letter.
    • The name can contain digits, periods (.), underscores (_), and hyphens (-).

    If you leave this field blank, the system automatically generates a cluster name. You can change the cluster name after the cluster is created.

    Purchase Plan Number Set the number of PolarDB clusters you want to purchase.
  8. Select the check box after you read the terms of the service agreement, and then click Pay to complete the payment.

Related topics

Back up data

Related operations

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