Restoring HBase Metadata
Scenarios
To ensure HBase metadata security (including tableinfo files and HFiles) or before a major operation on HBase system tables (such as upgrade or migration), you need to back up HBase metadata to prevent HBase service unavailability caused by HBase system table directory or file damages. The backup data can be used to recover the system if an exception occurs or the operation has not achieved the expected result, minimizing the adverse impacts on services.
HBase metadata restoration tasks can be created on FusionInsight Manager. The system supports manual data restoration only.
MRS clusters support multiple data path types for restoring HBase metadata.
- LocalDir: indicates that data is restored from the local disk of the active management node.
- RemoteHDFS: indicates that data is restored from the HDFS directory of the standby cluster.
- NFS: indicates that data is restored from the NAS using the NFS protocol.
- CIFS: indicates that data is restored from the NAS using the CIFS protocol.
- SFTP: indicates that data is restored from the server using the SFTP protocol.
- OBS: indicates that data is restored from OBS.
- To restore data when the service is running properly, it is recommended that you manually back up the latest management data before performing data restoration. Otherwise, the HBase data that is generated after the data backup and before the data restoration will be lost.
- It is recommended that each data restoration task restore the metadata of only one component to avoid affecting the restoration of other components when a service or instance is stopped. If data of multiple components is restored at the same time, data restoration may fail.
Notes and Constraints
- Data restoration can be performed only when the system version is consistent with the version used during data backup.
- HBase metadata cannot be restored concurrently with NameNode metadata. Attempting both at once will cause restoration to fail.
- MRS 3.1.0 and later support data restoration from OBS.
Impact on the System
- Before restoring the metadata, you need to stop the HBase service, during which the HBase upper-layer applications are unavailable.
- After the metadata is restored, the data generated after the data backup and before the data restoration is lost.
- After the metadata is restored, you need to start the upper-layer applications of HBase.
Prerequisites
- If you need to restore data from a remote HDFS, a standby cluster has been created and the data has been backed up. For details, see Backing Up HBase Metadata. If the active cluster is deployed in security mode and the active and standby clusters are not managed by the same FusionInsight Manager, mutual trust has been configured. For details, see Configuring Mutual Trust Between MRS Clusters. If the active cluster is deployed in normal mode, mutual trust is not required.
- Cross-cluster replication has been configured for the active and standby clusters. For details, see Enabling MRS Inter-Cluster Replication.
- You have checked the path for storing HBase metadata backup files.
- The HBase service has been stopped before its metadata is restored.
Restoring HBase Metadata
- Log in to MRS Manager.
For details about how to log in to MRS Manager, see Accessing MRS Manager.
- Choose O&M > Backup and Restoration > Backup Management.
- In the row containing the specified backup task, choose More > View History in the Operation column to display the task's historical execution records.
In the displayed window, locate the desired success record and click View in the Backup Path column to display the task's backup path information and obtain the following details:
- Backup Object: indicates the backup data source.
- Backup Path: indicates the full path where the backup files are stored.
Locate the correct path, and manually copy the full path of the backup files from the Backup Path column.
- On FusionInsight Manager, choose O&M > Backup and Restoration > Restoration Management.
- Click Create.
- Set Task Name to the name of the restoration task.
- Select the cluster to be operated from Recovery Object.
- In Restoration Configuration, select HBase under Metadata and other data.
- Select a backup directory type for Path Type of HBase.
Table 1 Path for data restoration Type
Parameter
Description
LocalDir
Source Path
Backup file to be restored. File name format: Version_Data source_Task execution time.tar.gz
RemoteHDFS
Source NameService Name
NameService name of the backup data cluster.
- You can set it to the NameService name (haclusterX, haclusterX1, haclusterX2, haclusterX3, or haclusterX4) of the built-in remote cluster.
- You can also set it to the NameService name of a configured remote cluster.
IP Mode
IP version of the target IP address. The system automatically determines the IP version, such as IPv4 or IPv6, based on the cluster network type.
Source NameNode IP Address
Service plane IP address of the active or standby NameNode in the standby cluster.
Source Path
Full path of the HDFS directory storing backup data in the standby cluster. Path format: Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time.tar.gz
Queue Name
Name of the YARN queue used for backup task execution. The name must be identical to that of a queue currently running properly in the cluster.
NFS
IP Mode
IP version of the target IP address. The system automatically determines the IP version, such as IPv4 or IPv6, based on the cluster network type.
Server IP Address
IP address of the NAS server.
Source Path
Full path of the NAS server directory storing backup files. Path format: Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time.tar.gz
CIFS
IP Mode
IP version of the target IP address. The system automatically determines the IP version, such as IPv4 or IPv6, based on the cluster network type.
Server IP Address
IP address of the NAS server.
Port
Port number used by the CIFS protocol to connect to the NAS server. The default value is 445.
Username
Username configured during CIFS protocol setup.
Password
Password configured during CIFS protocol setup.
Source Path
Full path of the NAS server directory storing backup files. Path format: Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time.tar.gz
SFTP
IP Mode
IP version of the target IP address. The system automatically determines the IP version, such as IPv4 or IPv6, based on the cluster network type.
Server IP Address
IP address of the server where the backup data is stored.
Port
Port number used by the SFTP protocol to connect to the backup server. The default value is 22.
Username
Username used to connect to the server over SFTP.
Password
Password used to connect to the server over SFTP.
Source Path
Full path of the backup server directory storing backup files. Path format: Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time.tar.gz
OBS (available in MRS 3.1.0 and later)
Source Path
Full path of the OBS directory storing backup files. Path format: Backup path/Backup task name_Data source_Task creation time/Version_Data source_Task execution time.tar.gz
- Click OK.
- In the restoration task list, locate the row containing the created task, and click Start in the Operation column to execute the restoration task.
- After the restoration is successful, the progress bar is in green.
- After the restoration is successful, the restoration task cannot be executed again.
- If the restoration task fails during the first execution, rectify the fault and click Retry to execute the task again.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.