Backing Up Redis Data
Scenario
Back up service data stored in the Redis cluster to a specified directory as an MRS cluster administrator in case of system faults during major operations such as cluster reinstallation, upgrade, and scale-out.
Prerequisites
- The Redis cluster and instances are running properly.
- 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.
- 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.
xxx indicates the version number. Replace it with the actual version number.
- 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
- Log in to any Redis node as user root.
- 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-backup.sh script.
cd ${BIGDATA_HOME}/FusionInsight_HD_xxx/install/FusionInsight-redis-xxx/redis/sbin/
./redis-backup.sh
The system backs up the data of all Redis instances in the Redis cluster to the target path. After the backup is successful, the following information is displayed:
Backup successful.
- Check the data files in the backup path and move them to a reliable location for future restoration.
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