Restoring HBase Service Data
Scenarios
HBase service data restoration is required in the following scenarios: when data is unexpectedly modified or deleted and requires retrieval; when major HBase operations (such as upgrades or significant adjustments) cause exceptions in system data or fail to achieve the expected result; when all modules fail and become unavailable; and when data is migrated to a new cluster.
HBase service data 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 service data.
- 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.
- Data restoration can be performed only when the system version is consistent with the version used during data backup.
- 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.
Impact on the System
- During data restoration, the system disables the HBase table being restored, and the table cannot be accessed at that time. The data restoration process takes several minutes, during which the HBase upper-layer applications are unavailable.
- During data restoration, user authentication stops and users cannot create new connections.
- After the data is restored, the data generated after the data backup and before the data restoration is lost.
- After the data 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 Service Data. 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.
- Time is consistent between the active and standby clusters, with the NTP services on both clusters configured to use the same time source.
- The directory for saving the backup file has been checked.
- The HBase upper-layer applications have been stopped.
Restoring HBase Service Data
- 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 Service data.
- Select a backup directory type for Path Type of HBase.
Table 1 Path for data restoration Type
Parameter
Description
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/xxx/Backup task name_Data source_Task creation time
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.
Restoration Point List
Click Refresh and select a backed-up HDFS directory in the standby cluster.
Maximum Number of Maps
Maximum number of maps in a MapReduce task. The default value is 20.
Maximum Map Bandwidth (MB/s)
Maximum bandwidth of a map. The default value is 100.
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 HDFS directory storing backup data in the standby cluster. Path format: Backup path/xxx/Backup task name_Data source_Task creation time
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.
Restoration Point List
Click Refresh and select a backed-up HDFS directory in the standby cluster.
Maximum Number of Maps
Maximum number of maps in a MapReduce task. The default value is 20.
Maximum Map Bandwidth (MB/s)
Maximum bandwidth of a map. The default value is 100.
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 HDFS directory storing backup data in the standby cluster. Path format: Backup path/xxx/Backup task name_Data source_Task creation time
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.
Restoration Point List
Click Refresh and select a backed-up HDFS directory in the standby cluster.
Maximum Number of Maps
Maximum number of maps in a MapReduce task. The default value is 20.
Maximum Map Bandwidth (MB/s)
Maximum bandwidth of a map. The default value is 100.
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 HDFS directory storing backup data in the standby cluster. Path format: Backup path/xxx/Backup task name_Data source_Task creation time
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.
Restoration Point List
Click Refresh and select a backed-up HDFS directory in the standby cluster.
Maximum Number of Maps
Maximum number of maps in a MapReduce task. The default value is 20.
Maximum Map Bandwidth (MB/s)
Maximum bandwidth of a map. The default value is 100.
- Set Backup Data column in Data Configuration to one or multiple backup data sources to be recovered. In the Target Namespace column, specify the target naming space after backup data recovery.
You are advised to set Target Namespace to a location that is different from the backup naming space.
- Set Force recovery to true to forcibly restore all backup data when a table with the same name already exists. Any data added to the table after the backup will be lost during restoration. If you set the parameter to false, the restoration task is not executed if a data table with the same name exists.
- Click Verify to check whether the restoration task is configured correctly.
- If the queue name is incorrect, the verification fails.
- If the specified naming space does not exist, the verification fails.
- If the forcible overwrite conditions are not met, the verification fails.
- Click OK to save the settings.
- 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.
- Check whether HBase data is restored in an environment where HBase is newly installed or reinstalled.
- If yes, the administrator needs to set new permission for roles on FusionInsight Manager based on the original service plan.
- If no, no further operation is required.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.