All Products
Search
Document Center

PolarDB:Restoration process and estimated time

Last Updated:Apr 26, 2024

You can restore an entire cluster by using one of the following methods: restore data to a previous point in time or restore data from a backup set (snapshot).

The point in time to which you want to restore data may coincide with the time when a backup set was created. In this case, you can restore data from the backup set (snapshot). If no backup sets were created at the point in time to which you want to restore data, you can only restore data to a previous point in time.

Restoration process

The restoration process is the same regardless of whether you restore data to a previous point in time or from a backup set.

  1. Restore all data to a new cluster.

  2. Verify the accuracy of the data in the new cluster. Then, migrate the restored data back to the original cluster or switch your business to the new cluster.

The following section describes the overall process:

Figure 1. Flowchart for restoring data to a new cluster and then migrating data back to the original cluster

image

Figure 2. Flowchart for restoring data to a new cluster and switching business to the new cluster

image

Estimated time required for restoration

The time required for data restoration varies based on the specifications and size of your cluster and the size of the backup set. The following table describes the estimated time required for data restoration.

Procedure

Estimated time

Restore data to a new cluster

Create a temporary cluster

5 to 10 minutes

Restore data from a backup set (snapshot)

3 GB/minute

Restore data by using redo logs

Note

Redo logs are used only when you restore data to a previous point in time.

1.5 GB/minute

Compare data in the new cluster

3 to 5 minutes

Migrate the restored data from the new cluster to the original cluster

Cluster size (in KB) × Maximum IOPS × 15% × 16 KB/second

For example, if the sizes of a cluster (4 cores, 16 GB memory, maximum IOPS of 32,000), a backup set (snapshot), and redo logs are 100 GB, 10 GB, and 3 GB, you can use the following formulas to calculate the required restoration time:

  • Time required to restore the data of the backup set (snapshot): 10/3 = 3.3 minutes

  • Time required to restore data by using redo logs: 3/1.5 = 2 minutes

  • Time required to migrate the restored data from the new cluster to the original cluster: 100 × 1,024 × 1,024/(32,000 × 15% × 16) = 22.7 minutes

If you restore data to a new cluster and then migrate the restored data from the new cluster to the original cluster, the total required time is 5 + 3.3 + 2 + 3 + 22.7 = 36 minutes.

If you restore data to a new cluster and then switch your business to the new cluster, the total required time is 5 + 3.3 + 2 + 3 + time required to switch business + new cluster configuration time = 13 minutes + time required to switch business + new cluster configuration time.

Note

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