You can initiate a restore job for a cluster that has been backed up.
Prerequisites
You have backed up the cluster to be restored. For more information, see Back up now.
When you restore a physically backed up OceanBase cluster, you cannot restore its data to a cluster of an earlier version.
Procedure
Log on to the OceanBase Cloud Platform (OCP) console.
Go to the Initiate Recovery page by using any of the following methods:
Method 1: Initiate a restore job on the Recovery page.
In the left-side navigation pane, choose Backup & Recovery > Recovery.
On the Recovery page, click Initiate Recovery in the upper-right corner.
Method 2: Initiate a restore job on the O&M page of a cluster.
In the left-side navigation pane, click Clusters to go to the Cluster Overview page.
Click the name of the target cluster in Cluster List or Resource Level to go to its O&M page.
In the left-side navigation pane, click Backup & Recovery.
On the Backup & Recovery page of the cluster, click Initiate Recovery.
Note
You cannot restore a cluster by using Method 2 in the following circumstances:
- The cluster is not in the Running state.
- The cluster does not have a backup strategy.
Method 3: Initiate a restore job on the O&M page of a tenant.
In the left-side navigation pane, click Tenants to go to the Tenant Overview page.
Click the name of the target tenant in the Tenants list to go to its O&M page.
In the left-side navigation pane, click Backup & Recovery.
On the Backup & Recovery page of the tenant, click Initiate Recovery.
Note
You cannot restore a tenant by using Method 3 in the following circumstances:
- The tenant is not in the Running state.
- The tenant does not have a backup strategy.
(Optional) If you use Method 1, configure a custom storage configuration or use an existing configuration. If you choose to configure a custom configuration, configure the parameters based on the following tables. If you choose to select an existing configuration, click Select Existing Configuration. Then, the system automatically populates the following parameters.
Notice
If the native Alibaba Cloud Object Storage Service (OSS) or Tencent Cloud Object Storage (COS) storage type is available, we recommend that you select the OSS or COS storage type.
File: your local file storage system. Generally, Network File System (NFS) is used.
Parameter Description Storage Directory The directory in which the backup files are stored on the storage service. Host for Parsing Select a host that can access the directory. To parse logical backup data, select the host where the backup and restore service resides. To parse physical backup data, select the host where a cluster of OceanBase Database V2.2.70 or later resides. Click Parse to obtain the list of clusters that can be restored. OSS: Alibaba Cloud OSS, which is supported only in OceanBase Database V2.2.76 and later.
Parameter Description Storage Directory Select the directory where the backup files are stored. Domain The domain name for accessing the files stored in Alibaba Cloud OSS, such as oss-cn-hangzhou.aliyuncs.com.User The user for accessing the files stored in Alibaba Cloud OSS. AccessKey Pair The AccessKey pair for accessing the files stored in Alibaba Cloud OSS. Host for Parsing Select a host that can access the directory. To parse logical backup data, select the host where the backup and restore service resides. To parse physical backup data, select the host where a cluster of OceanBase Database V2.2.70 or later resides. Click Parse to obtain the list of clusters that can be restored. COS: Tencent Cloud COS, which is supported only in OceanBase Database V2.2.76 and later but earlier than V4.0, and in OceanBase Database V4.2.1 and later.
Parameter Description Storage Directory Select the directory where the backup files are stored. Domain The domain name for accessing the files stored in the COS bucket, such as cos.ap-beijing.myqcloud.com.Resource Identity (APPID) The unique resource identifier at the user dimension when you access the COS bucket as a developer. You can obtain the APPID on the API key management page of COS. Project ID The ID of the developer. You can obtain the ID on the API key management page of COS. Project Key The key of the developer. You can obtain the key on the API key management page of COS. Host for Parsing Select a host that can access the directory. To parse logical backup data, select the host where the backup and restore service resides. To parse physical backup data, select the host where a cluster of OceanBase Database V2.2.70 or later resides. Click Parse to obtain the list of clusters that can be restored. OBS: Huawei Cloud Object Storage Service (OBS), which is supported only in OceanBase Database V3.2.3.2-105000062022090916 and later but earlier than V4.0.0.0.
Parameter Description Storage Directory Select the directory where the backup files are stored. Domain The domain name for accessing the files stored in the Huawei Cloud OBS bucket, such as obs.cn-north-4.myhuaweicloud.com.AK The AccessKey ID of the OBS bucket. SK The AccessKey secret of the OBS bucket. Host for Parsing Select a host that can access the directory. To parse logical backup data, select the host where the backup and restore service resides. To parse physical backup data, select the host where a cluster of OceanBase Database V2.2.70 or later resides. Click Parse to obtain the list of clusters that can be restored. S3: object storage services that support the AWS Simple Storage Service (S3) protocol, such as the native Amazon Web Services (AWS) S3, Huawei Cloud OBS, Tianyi Cloud OBS, and Google Cloud Storage (GCS). These object storage services are supported only in OceanBase Database V4.2.1-BP7, 4.2.3-BP1, and later. For more information about Amazon S3-compatible object storage services, see AWS S3 protocol.
Parameter Description Storage Directory The directory in which the backup files are stored on the storage service. Domain The domain name for accessing the files stored in the S3 bucket, such as s3.us-west-2.amazonaws.com.AK The AccessKey ID of the S3 bucket. SK The AccessKey secret of the S3 bucket. Region The region of the S3 bucket. Host for Parsing Select a host that can access the directory. To parse logical backup data, select the host where the backup and restore service resides. To parse physical backup data, select the host where a cluster of OceanBase Database V2.2.70 or later resides. Click Parse to obtain the list of clusters that can be restored. Notice
The Region parameter is required when Amazon S3 is used, and is not required when Huawei Cloud OBS, Tianyi Cloud OBS, or GCS is used.
Specify the parameters in the Recovery Source and Time section by selecting the values from the corresponding drop-down lists.
Note
By default, the tenant is restored. In OceanBase Database V2.2.77 and later but earlier than V4.0.0.0, you can restore tables in a tenant when you restore the tenant.
Restore a tenant
Parameter Description Source Cluster If you initiate a restore job from the O&M page of a cluster, the cluster is the source cluster by default, and you do not need to specify this parameter. Source Tenant Select the tenant to restore. Recovery Date Select a date within the specified restorable time range. Restore Point in Time Select a point in time within the specified time range. Restore tables
If you use Method 3 to restore a tenant, you can restore tables in the tenant.
Parameter Description Source Cluster The source cluster to restore the tables. The default value is the cluster to which the current tenant belongs. Source Tenant The source tenant to restore the tables. The default value is the current tenant. Recovery Date Select a date within the specified restorable time range. Restore Point in Time Select a point in time within the specified time range. Restore Table Object Select the tables to be restored in the source object list on the left and click > to add them to the target object list.
Select the destination tenant of the restore job. Select a cluster in the Running state from the drop-down list and enter the new tenant name.
Note
The following types of clusters cannot be used as the restore destination:
- Clusters in the primary/standby mode
- Clusters in the Unavailable state
- Clusters of an OceanBase Database version earlier than that of the source cluster
Specify the following zone-related parameters and set the priorities of the zones.
Parameter Description Replica Type The type of the replica. Valid values: - Full-featured Replica: A general-purpose replica that has a full set of data types and features, including transaction logs, a MemTable, and an SSTable. A full-featured replica can switch to the leader role efficiently to provide services.
- Log Replica: A replica that contains only logs. It has no MemTable or SSTable. It provides log services for external applications and participates in log voting. It can facilitate the restore of other replicas, but it cannot become the leader to provide database services.
- Read-only Replica: A replica that contains full logs, a MemTable, and an SSTable. You can select this type of replica for applications that does not require high consistency in data reading.
Unit Specification The specifications of the resources that the replica occupies. - You can select an existing specification.
- You can also create a specification as needed and select the created specification.
Units The number of resource units occupied by the replica. Notice
If the version of the destination cluster is V4.0 or later, you can only set the same number of units for all zones. In other words, the number of units that you specify on this page applies to all zones under the restored tenant.Click Initiate Recovery.