Restoring Doris Service Data
Scenarios
Doris data restoration is required in the following scenarios: when data is unexpectedly modified or deleted and requires retrieval; when major Doris 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.
Doris service data restoration tasks can be created on FusionInsight Manager. The system supports manual data restoration only.
When executing backup and restoration tasks, you need to manage unified restoration points based on service scenarios to ensure proper service running.
MRS clusters support multiple data path types for restoring Doris service data.
- RemoteHDFS: indicates that data is restored from the HDFS directory of the standby cluster.
- 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 Doris data that is generated after the data backup and before the data restoration will be lost.
Notes and Constraints
- This section applies only to MRS 3.3.1 or later clusters.
- Data restoration can be performed only when the system version is consistent with the version used during data backup.
Impact on the System
After the data is restored, the data generated after the data backup and before the data restoration is lost.
Prerequisites
- To restore data from a remote HDFS, the following conditions must be met:
- A standby cluster has been created for data restoration, and its data has been backed up. For details, see Backing Up Doris 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.
- At least one DBroker instance of the Doris service has been deployed in the active cluster.
- Time is consistent between the active and standby clusters, with the NTP services on both clusters configured to use the same time source.
- For versions earlier than MRS 3.6.0-LTS.1: The hadoop.rpc.protection parameter values for Doris and HDFS must be identical in both the active and standby clusters.
- For MRS 3.6.0-LTS.1 or later: Perform the following steps to upload the HDFS hdfs-site.xml and core-site.xml files from the standby cluster to the Doris configuration in the active cluster:
- Log in to MRS Manager of the standby cluster and choose Cluster > Services > HDFS. In the upper right corner of the displayed page, choose More > Download Client. Set Select Client Type to Configuration Files Only and Select Download Location to Browser, and then click OK. Download the client configuration file to a local directory and decompress it. Open the HDFS\config directory in the decompressed folder to find the hdfs-site.xml and core-site.xml files.
- Log in to MRS Manager of the active cluster, choose Cluster > Services > Doris, and click Configurations and then All Configurations. In the navigation pane, choose Doris(Service) > Customization. For the core.site.customized.configs and hdfs.site.customized.configs parameters, click Upload File to upload the core-site.xml and hdfs-site.xml files.
- Click Save to save the settings. On the Dashboard page, choose More > Restart Service in the upper right corner. Enter the password of the current user and click OK to restart the Doris service.
- If you want to restore data from OBS, you have connected the Doris cluster to OBS and have the permission to access OBS.
- The database for storing restored data tables, the location for storing the data tables in HDFS, and the list of users who can access the restored data have been planned.
- Check the path for storing Doris backup files.
- Stop the upper-layer Doris applications.
Restoring Doris Service Data
- Log in to MRS Manager and choose O&M > Backup and Restoration > Backup Management.
For details about how to log in to MRS Manager, see Accessing MRS Manager.
- 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.
- Choose Restoration Management and 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 Doris under Service data.
- Select a backup directory type for Path Type of Doris.
Table 1 Path for data restoration Path Type
Parameter
Description
RemoteHDFS
Source NameService Name
NameService name of the backup data cluster. You can obtain it from the NameService Management page of HDFS in the standby cluster. For example, the name is hacluster.
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 NameNode in the standby cluster.
Source NameNode RPC Port
Value of dfs.namenode.rpc.port in the HDFS configuration of the standby cluster.
DBroker IP
Service plane IP address of the DBroker role in the cluster. The DBroker is used to transmit data during restoration.
Source Path
Full path of the HDFS directory storing backup data in the standby cluster. For details, see Backup Path obtained in Step 2. Path format: Backup path/Backup task name_Data source_Task creation time
OBS
Source Path
Full path of the OBS directory storing backup files. Specify this path by referring to Step 2. Path format: Backup path/Backup task name_Data source_Task creation time/
- Click Refresh and select a Doris backup file set that has been backed up.
- In the Data Configuration area, select one or more pieces of backup data for Select Data based on service requirements.
Configuration restrictions are as follows:
- There is a database with the same name as the original database of the selected backup data in the Doris of the cluster.
- The backup data is restored to the backup table with the same name as the original table in the database.
- If there is a table with the same name in Doris, ensure that the structures of the two tables are the same, including table names, columns, partitions, and materialized views.
- Set Original Configurations to true, indicating that the configuration of the backup data, such as the number of copies, will be used. If this parameter is set to false, the default configuration is used to create a table.
- 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.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot