Restoring IoTDB Service Data
Scenarios
IoTDB data restoration is required in the following scenarios: when data is unexpectedly modified or deleted and requires retrieval; when major IoTDB 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.
System administrators can create an IoTDB restoration task on FusionInsight Manager. Only manual restoration tasks are supported.
- 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 IoTDB data that is generated after the data backup and before the data restoration will be lost.
Impact on the System
- 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, the IoTDB upper-layer applications need to be started.
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 IoTDB 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.
- Time is consistent between the active and standby clusters, with the NTP services on both clusters configured to use the same time source.
- The IoTDB backup file save path is correct.
- The IoTDB upper-layer applications are stopped.
Restoring IoTDB 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, choose IoTDB > IoTDB under Service Data.
- Select a backup directory type for Path Type of IoTDB.
The following backup directory types are supported:
RemoteHDFS: indicates that the backup files are stored in the HDFS directory of the standby cluster.
If you select this option, configure the following parameters:- Source NameService Name: indicates the NameService name of the backup data cluster, for example, hacluster. You can obtain it from the NameService Management page of HDFS in the standby cluster.
- IP Mode: indicates the 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 Active NameNode IP Address: indicates the service plane IP address of the active NameNode in the standby cluster.
- Source Standby NameNode IP Address: indicates the service plane IP address of the standby NameNode in the standby cluster.
- Source NameNode RPC Port: indicates the value of dfs.namenode.rpc.port in the HDFS basic configuration of the standby cluster.
- Source Path: indicates the full path of HDFS directory for storing backup data of the standby cluster, for example, Backup path/Backup task name_Data source_Task creation time.
- Recovery Point List: Click Refresh and select an IoTDB directory that has been backed up in the standby cluster.
- In the Backup Data column of the Data Configuration page, select one or more pieces of backup data that needs to be restored based on service requirements. In the Target Path column, specify the target location after backup data restoration.
You are advised to set Target Path to a new path that is different from the backup path.
- 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 directory to be restored does not exist, the verification fails.
- 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.