You can refer to this page to initiate recovery for a backed-up cluster.
You can initiate recovery through the following three entry points:
Entry point 1: Log in to OCP, go to Backup and Recovery > Restore, and click Initiate Restore.
Entry point 2: Log in to OCP, go to the cluster Overview page, select Backup & Restore from the left navigation pane, and on the cluster's Backup & Restore page, click Initiate Restore.
Note
Recovery for the cluster cannot be initiated via Entry Point 2 if any of the following conditions apply:
- The cluster status is not "Running".
- The cluster has no backup strategy.
Entry point 3: Log in to OCP, go to the tenant Overview page, select Backup & Restore from the left navigation pane, and on the tenant's Backup & Restore page, click Initiate Restore.
Note
Recovery for the tenant cannot be initiated via Entry Point 3 if any of the following conditions apply:
- The tenant status is not "Running".
- The tenant has no backup strategy.
Prerequisites
When initiating restore via Entry 1, ensure the current OCP user has the following permissions:
- Cluster Maintenance or Tenant Maintenance resource permissions.
- Backup and Restore > Restore menu permission.
When initiating restore via Entry 2, ensure the current OCP user has the following permissions:
- Cluster Maintenance resource permissions.
- Cluster > Backup and Restore menu permission.
When initiating restore via Entry 3, ensure the current OCP user has the following permissions:
- Cluster Maintenance or Tenant Maintenance resource permissions.
- Tenant Backup and Restore menu permission.
The content to be restored has undergone Immediate Backup.
For an OceanBase cluster that has undergone physical backup, restoring from a higher version to a lower version is not supported when initiating backup and restore.
Procedure
The following steps use Entry 1 as an example.
Log in to OCP.
In the left navigation bar, click Backup and Recovery > Restore.
On the Restore page, click Initiate Restore in the upper-right corner.
(Optional) When initiating a restore on the global page, you need to specify storage configurations. You can customize one or select an existing configuration. When customizing, refer to the parameters below; when selecting an existing configuration, click Select Existing Configuration and the parameters will be automatically populated.
Note
When a native OSS storage type is available, it is recommended to prefer the OSS method for configuration.
File: Local file storage, typically NFS.
ParameterDescriptionStorage Directory The directory on the current medium where backup files are stored. Parse Host Select the host that can access this directory. For logical backups, select the host where the backup and recovery service resides; for physical backups, select the host where an OceanBase cluster of version V2.2.70 or later resides. Click Parse to get a list of recoverable clusters. OSS: Alibaba Cloud OSS object storage, supported only by OceanBase V2.2.76 and later.
ParameterDescriptionStorage Directory Select the directory where the backup files are located. Access Domain Name Enter the domain name for accessing the Alibaba Cloud storage. For example: oss-cn-hangzhou.aliyuncs.com.Access User Enter the AccessKey ID for accessing the Alibaba Cloud storage. Access Key Enter the AccessKey Secret for accessing the Alibaba Cloud storage. Parse Host Select the host that can access this directory. For logical backups, select the host where the backup and recovery service resides; for physical backups, select the host where an OceanBase cluster of version V2.2.70 or later resides. Click Parse to get a list of recoverable clusters. OBS: Huawei Cloud OBS object storage, supported only by OceanBase V3.2.3.2-105000062022090916 and later, but earlier than V4.0.0.0.
ParameterDescriptionStorage Directory Select the directory where the backup files are located. Access Domain Name Enter the domain name for accessing the Huawei Cloud OBS object. For example: obs.cn-north-4.myhuaweicloud.com.AK The secret key ID of the OBS storage space. SK The access key of the OBS storage space. Parse Host Select the host that can access this directory. For logical backups, select the host where the backup and recovery service resides; for physical backups, select the host where an OceanBase cluster of version V2.2.70 or later resides. Click Parse to get a list of recoverable clusters. S3: Supports storage media compatible with the AWS S3 protocol, including native AWS S3, Huawei Cloud OBS, Tianyi Cloud OBS, and Google GCS, etc. Supported only by OceanBase V4.2.1-BP7 and V4.2.3-BP1 (inclusive) and later. For more information about storage media compatible with the AWS S3 protocol, see S3 protocol description.
ParameterDescriptionStorage Directory The directory on the current medium where backup files are stored. Access Domain Name Enter the domain name for accessing objects in the S3 storage space (Bucket), for example: s3.us-west-2.amazonaws.com.AK Enter the AccessKey ID of the S3 storage space. SK Enter the AccessKey of the S3 storage space. Region Enter the region information of the S3 storage space. Parse Host Select the host that can access this directory. To parse logical backups, select the host where the backup and restore service is located; to parse physical backups, select the host where the OceanBase cluster of version V2.2.70 or later is located. Click Parse to obtain the list of recoverable clusters. Notice
When the storage medium is AWS S3, the Region information is a required parameter. For other storage media such as Huawei Cloud OBS, Tianyi Cloud OBS, or Google GCS, it is not required.
(Optional) Specify the log backup path. When OceanBase Database is V4.0 or later, you can specify an independent storage path for log backups, allowing data backups and log backups to use different storage directories. If not specified, the default data backup storage path is used.
Enter the information in the Restore Source Information section.
Note
When object storage is used as the storage type, if there is no available recovery time within the specified recovery date, you need to grant permissions to ob_admin using the following command:
setcap cap_sys_admin,cap_dac_override,cap_fowner+ep /home/admin/oceanbase/bin/ob_admin.Tenant restore
ParameterDescriptionSource Cluster The source cluster is automatically selected when initiating a restore for a cluster on its operations page. Source Tenant Select the tenant to be restored. Restore Object Select Tenant. Restore Date The date must be within the indicated recoverable period. Restore Time Point Select the point in time to restore from within the indicated period. Database restore
Note
Only OceanBase Database V4.x supports database restore. Database restore depends on table restore, and they support the same types of tables for restore.
To perform database restore at the tenant level, go to Tenant Overview > Backup & Restore > Initiate Restore.
ParameterDescriptionSource Cluster The cluster where the current tenant is located by default. Source Tenant The current tenant by default. Restore Object Select Database. Restore Date The date must be within the indicated recoverable period. Restore Time Point Select the point in time to restore from within the indicated period. Restore Database Object Select the database to restore from the left-side Restorable Object and add it to the right-side Selected Objects using >. Database names must be unique. OCP supports renaming databases, as shown in the following figure. Note
You can select up to 200 database objects.
Table restore
Note
- Only user tables can be restored. Columnstore tables, temporary tables, views, materialized views, materialized view logs, indexes, and other items cannot be restored separately.
- The successful restoration of table data indicates a successful table restore. Indexes, constraints, or other associated schemas may fail to restore.
You can restore tables under the current tenant by navigating to Tenant Overview > Backup & Restore > Initiate Restore.
ParameterDescriptionSource Cluster The cluster where the current tenant is located by default. Source Tenant The current tenant by default. Restore Object Select Table. Restore Date The date must be within the specified recoverable period. Restore Time Point Select a point in time within the specified period. Restore Table Objects Select the tables you want to restore from the Restorable Object list on the left, and add them to the Selected Objects list on the right using >. Ensure the table names are unique. OCP supports renaming tables, as shown below. Note
You can select up to 200 table objects.
Fill in the Restore Target Information section.
Note
A secondary tenant needs to be created in the target cluster during database or table restore. It is recommended that the specifications of the secondary tenant match those of the source tenant, and ensure the target cluster has sufficient CPU, memory, and disk resources. Insufficient resources may cause slow restore or restore failure. The system will delete the secondary tenant by default after the restore is complete.
ParameterDescriptionRestore Type Select Full Restore or Quick Restore. This feature requires OBServer version V4.3.3 or later. Caution
- Quick Restore supports restoring only log backups without data backups to provide read-only services. When data backups are large, this feature significantly reduces restore wait time and lowers user costs.
- The restored tenant is in a read-only state and does not support major compaction or data backup.
Dynamic Partitioning Select Enable or Disable. This feature applies only to full restore. Caution
After enabled, tables using dynamic partitioning will lose some partition data after restore is complete.Target Cluster Select the target cluster. Caution
The following clusters cannot be used as restore targets:
- Clusters with primary/standby relationships.
- Clusters in an unavailable state.
- Clusters with a version lower than the cluster initiating the restore.
Target Tenant Select the target tenant. Number of Units per Zone Set the number of units for each zone. The minimum number of OBServers in a zone determines the maximum number of units that can be set. Replica Type Valid values: - Full-featured replica: The standard replica type currently supported, containing complete data and functionality including transaction logs, MemTables, and SSTables. It can quickly switch to the leader role to provide services at any time.
- Log-only replica: A replica that contains only logs, without a MemTable or SSTable. It participates in log voting and provides log services externally. It can assist in the restore of other replicas but cannot become the leader to provide database services.
- Read-only replica: Contains complete logs, MemTables, and SSTables. Recommended when business requirements for data read consistency are not high.
Unit Specification The resource specification occupied by this replica. - You can select an existing specification.
- You can also create a new specification as needed and then select it.
Number of Units The number of resources occupied by this replica. Caution
When the selected target cluster version is V4.0 or later, configuring the number of units for a single zone is not supported. The number of units you enter here applies to all zones in the newly created restore tenant.Zone Priority The priority for distributing leader replicas within the tenant. Priorities from top to bottom indicate higher to lower. You can drag and drop to sort. - If no zone priority is configured, the priority is random.
- After selecting multiple zones and dragging them to the right, they can be set to the same priority.
- After selecting multiple zones and dragging them to the right, the priority follows the order of selection.
Click Initiate Restore.
