Updated on 2024-11-29 GMT+08:00

Restoring Redis Data

Scenario

To ensure Redis data security or before and after a critical operation (such as upgrade and migration) on Redis, Redis data needs to be backed up. The backup data can be used to recover the system in time if an exception occurs or the expected result has not been achieved, minimizing the adverse impact on services.

System administrators can create a recovery task in FusionInsight Manager to recover Redis data. Only manual restoration tasks are supported.

Data restoration can be performed only when the system version is consistent with that 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

  • You have checked that HDFS services have been deployed in the current cluster.
  • The name of the cluster created by Redis is the same as the cluster name in the backup task.
  • You have logged in to FusionInsight Manager. For details, see Logging In to FusionInsight Manager.

Procedure

  1. On FusionInsight Manager, choose O&M > Backup and Restoration > Backup Management.
  2. In the Operation column of a specified task in the task list, choose More > View History to view historical backup task execution records.

    In the displayed window, locate a specified success record and click View in the Backup Path column to view the backup path information of the task and find the following information:

    • Backup Object specifies the data source of the backup data.
    • Backup Path specifies the full path where the backup files are saved.

      Select the correct item, and manually copy the full path of backup files in Backup Path.

  3. On FusionInsight Manager, choose O&M > Backup and Restoration > Restoration Management.
  4. Click Create.
  5. Set Task Name to the name of the restoration task.
  6. Select the desired cluster from Recovery Object.
  7. In the Restoration Configuration area, select Redis.
  8. Set Path Type of Redis to a backup directory type.

    The settings vary according to backup directory types:

    • LocalHDFS: indicates that the backup files are stored in the HDFS directory of the current cluster.
      If you select LocalHDFS, set the following parameters:
      • Source Path: indicates the full path of the backup file in the HDFS. The specific path is the backup path set in 2.
      • Source NameService Name: indicates the NameService name that corresponds to the backup directory when a restoration task is executed. The default value is hacluster.

  9. Click OK.
  10. In the restoration task list, locate a 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.