All Products
Search
Document Center

PolarDB:Cluster restoration: Restore from a backup set

Last Updated:Oct 19, 2023

If you want to restore data to a previous point in time and the point in time is when a backup set (snapshot) was created, you can restore all data of the cluster from the backup set (snapshot).

Prerequisites

  • Your instance has a backup set (snapshot) before the data was deleted or modified accidentally.

  • We recommend that you restore data during off-peak hours.

Precautions

Only the data and account information of the original cluster are restored to the new cluster. The parameters of the original cluster are not restored to the new cluster.

Step 1: Restore data to a new cluster

  1. In the left-side navigation pane on the Overview page, choose Settings and Management > Restoration.
  2. Find the backup set (snapshot) and click Restore Data to New Cluster in the Actions column.
    2
  3. On the Clone Instance page that appears, configure the backup set that you want to restore and the parameters of the new cluster.
    1. Select Billing Method for the new cluster.
      Note

      For example, you want to continue using the original cluster and the new cluster is only for temporary use. After the restoration, you can select Pay-As-You-Go in the Billing Method section.

      If you plan to use the new cluster after the restoration, you can set the billing method to that of the original cluster or adjust it as needed.

    2. Select Restore Data from Backup Set and select the backup set from the drop-down list of Backup Set.
      Backup set restoration
      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.
  4. Configure other parameters.
    Note

    If you do not intend to use the new cluster after the restoration, and continue using the original cluster, we recommend that you keep the default settings. The default specifications and settings will not affect the entire restoration process.

    If you plan to use the new cluster after the restoration, you can set the parameters to that of the original cluster or adjust it as needed.

  5. Read and accept the terms of service, and click Buy Now.
  6. On the Purchase page, confirm the information of the unpaid order and click Purchase.

Step 2: Compare data in the new cluster

After all of the data of your cluster has been restored to the new cluster, you need to log on to the new cluster and compare and verify the data.

You can log on to the new cluster by using DMS, other clients, or Alibaba Cloud command line interface (CLI). This topic describes how to log on to your cluster and verify data on the DMS console. For more information about other methods, see Connect to a cluster.

  1. In the upper-right corner of the Basic Information page of the new cluster, click Log on to Database.
    Overview
  2. In the dialog box that appears, specify database account and database password that are created in the original cluster, and click Login. Logon page
  3. After you log on to DMS, refresh the page. In the left-side navigation pane, click Logged in instance.
  4. In the Logged in instance list, click the cluster and double-click the database that you want to manage.
    1
  5. Locate the data that was deleted or modified accidentally and confirm whether it has been restored, and check whether other data is consistent with what it was before the accidental deletion or modification occurred.

Step 3: Migrate the restored data from the new cluster to the original cluster

After you verify the data in the new cluster, if you want to continue using the original cluster, you can migrate the restored data from the new cluster to the original cluster.

  1. Log on to the Data Transmission Service (DTS) console. In the left-side navigation pane, click Data Migration.
  2. At the top of the Migration Tasks page, select the region where the destination cluster resides.
    Select a region
  3. In the upper-right corner of the page, click Create Migration Task.
  4. Configure source and destination clusters.
    The source cluster is the new cluster. The destination cluster is the cluster that you want to restore, in which data was deleted or modified accidentally. Configure source and destination clusters
  5. After you finish the preceding configuration, click Set Whitelist and Next in the lower-right corner of the page.
    Note In this step, DTS automatically adds the IP address of the DTS server to the whitelists of the source and destination clusters. This ensures that the DTS server can connect to the source and destination clusters as expected.
  6. Configure migration types and objects.
    Configure migration types and objects
    ParameterDescription
    Migration TypesSelect Schema Migration and Full Data Migration.
    Available

    In the Available section, select the objects to be migrated. Then, click the Right arrow icon to add them to the Selected section.

    Important You can select databases, tables, and columns as the objects to be migrated.
  7. In the lower-right corner of the page, click Precheck. After the precheck is completed, click Next.
  8. In the Confirm Settings dialog box that appears, specify the Channel Specification parameter and select Data Transmission Service (Pay-As-You-Go) Service Terms.
  9. Click Buy and Start to start the data migration task.

Step 4: Release the cluster that you no longer use

After the migration task is completed, the original cluster is restored to the selected point in time. If you want to continue using the original cluster, you can release the new cluster to avoid unnecessary costs.

  1. On the Clusters page, find the cluster that you want to release and choose More > Release in the Actions column.
    Cluster list
  2. In the Release Cluster dialog box that appears, select a backup retention policy.
    Note

    If you want to continue using the original cluster and you have confirmed that all data has been restored and migrated, we recommend that you select Delete all backup sets of the cluster immediately when you delete the cluster when releasing the new cluster.

    Release clusters
  3. Click OK.