Redis Data Restoration Tool
Scenario
Use the backup data file to restore the data stored in the Redis cluster as an MRS cluster administrator when the Redis service is faulty or reinstalled. The restoration operation does not delete the existing data in the Redis cluster.
Prerequisites
- The Redis cluster and instances are running properly.
- You have obtained the backup Redis data files.
- If the installation mode of the Redis service is the security mode, the Redis client can access the Redis cluster and perform operations only after login authentication and authorization. You need to perform the following operations:
- Log in to FusionInsight Manager and choose System > Permission > Role to create a role that has the permission to manage the specified Redis cluster. For details, see Creating a Redis Role.
- Choose System > Permission > User, create a machine-machine user, and assign the role permissions created in 1 to the role.
- After the user is created successfully, click More > Download authentication credential next to the username in the user list to download the keytab file. After the file is automatically generated, specify the location to save the file.
xxx indicates the version number. Replace it with the actual version number.
- Decompress the keytab file, and upload the decompressed file to the Software installation path/FusionInsight_HD_xxx/install/FusionInsight-redis-xxx/redis/config directory on the target Redis node as user omm.
- In the Software installation path/FusionInsight_HD_xxx/install/FusionInsight-redis-xxx/redis/config/auth.conf file, change the value of userName to Username@Cluster domain name, change the value of realmsName to the current domain name, change the value of keyTabFile to the absolute path of the uploaded user.keytab file, and change the value of krbConfPath to the absolute path of the uploaded krb5.conf file.
Procedure
- Upload the data file to be restored to any Redis node in the cluster, for example, the /opt/arch/cluster1 directory.
- Log in to the node as the root user.
- Run the following command to open the Redis backup configuration file aof-backup.properties, set related parameters based on the description in Table 1, save the settings, and exit:
vi ${BIGDATA_HOME}/FusionInsight_HD_xxx/install/FusionInsight-redis-xxx/redis/config/aof-backup.properties
- Run the following commands in the backup directory to ensure that the omm user has the operation permission:
chmod 744 Outermost path for backup files -R
chown omm:wheel Outermost path for backup files -R
- Run the su - omm command to switch to user omm.
- Go to the ${BIGDATA_HOME}/FusionInsight_HD_xxx/install/FusionInsight-redis-xxx/redis/sbin directory and run the redis-restore.sh script.
cd ${BIGDATA_HOME}/FusionInsight_HD_xxx/install/FusionInsight-redis-xxx/redis/sbin
./redis-restore.sh
After the restoration is successful, the following information is displayed:
/opt/arch/cluster1/192.168.0.1-22400.aof: Success /opt/arch/cluster1/192.168.0.2-22400.aof: Success
Feedback
Was this page helpful?
Provide feedbackThank 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