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

Backing Up Containers Metadata

Scenario

To ensure Containers metadata security or before a major operation on Containers (such as upgrade or migration), you need to back up Containers metadata. The backup data can be used to recover the system if an exception occurs or the operation has not achieved the expected result, minimizing the adverse impacts on services.

You can create a backup task on FusionInsight Manager to back up Containers metadata. Both automatic and manual backup tasks are supported.

Prerequisites

  • If data needs to be backed up to the remote HDFS, you have prepared a standby cluster for data backup. The authentication mode of the standby cluster is the same as that of the active cluster. For other backup modes, you do not need to prepare the standby cluster.
  • The backup type, period, policy, and other specifications have been planned based on the service requirements and you have checked whether Data storage path/LocalBackup/ has sufficient space on the active and standby management nodes.
  • If the active cluster is deployed in security mode (with Kerberos authentication enabled) and the active and standby clusters are not managed by the same FusionInsight Manager, mutual trust must be configured. For details, see Configuring Cross-Manager Mutual Trust Between Clusters. If the active cluster is deployed in normal mode (with Kerberos authentication disabled), mutual trust is not required.
  • The time on the active and standby clusters must be the same, and the NTP service on the active and standby clusters uses the same time source.

Procedure

  1. On FusionInsight Manager, choose O&M > Backup and Restoration > Backup Management.
  2. Click Create.
  3. Set Name to the name of the backup task.
  4. Select the desired cluster from Backup Object.
  5. Set Mode to the type of the backup task. Periodic indicates that the backup task is periodically executed. Manual indicates that the backup task is manually executed.

    To create a periodic backup task, set the following parameters:

    Table 1 Periodic backup parameters

    Parameter

    Description

    Started

    The time when the task is started for the first time.

    Period

    The task execution interval. Value options include Hours and Days.

    Backup Policy

    • Full backup at the first time and incremental backup subsequently
    • Full backup every time
    • Full backup once every n times

  6. In Configuration, select Containers under Metadata and other data.
  7. Set Path Type of Containers to a backup directory type.

    The following backup directory types are supported:
    • LocalDir: indicates that the backup files are stored on the local disk of the active management node and the standby management node automatically synchronizes the backup files.

      The default storage directory is Data storage path/LocalBackup/, for example, /srv/BigData/LocalBackup.

      If you select this option, you need to set the maximum number of replicas to specify the number of backup file sets that can be retained in the backup directory.

    • LocalHDFS: indicates that the backup files are stored in the HDFS directory of the current cluster.
      If you select this option, you also need to configure the following parameters:
      • Target Path: indicates the HDFS directory for storing the backup files. The storage path cannot be an HDFS hidden directory, such as a snapshot or recycle bin directory, or a default system directory, such as /hbase or /user/hbase/backup.
      • Maximum Number of Backup Copies: indicates the number of backup file sets that can be retained in the backup directory.
      • Target NameService Name: indicates the NameService name of the backup directory. The default value is hacluster.
    • RemoteHDFS: indicates that backup files are stored in HDFS of the standby cluster.
      You also need to set the following parameters:
      • Destination NameService Name: indicates the NameService name of the standby cluster, for example, hacluster. You can obtain it from the NameService Management page of HDFS of the standby cluster.
      • IP Mode: indicates the mode of the target IP address. The system automatically selects an IP address mode based on the cluster network type, for example, IPv4 or IPv6.
      • Destination Active NameNode IP Address: indicates the service plane IP address of the active NameNode in the standby cluster.
      • Destination Standby NameNode IP Address: indicates the service plane IP address of the standby NameNode in the standby cluster.
      • Destination NameNode RPC Port: indicates the value of dfs.namenode.rpc.port in the HDFS basic configuration of the destination cluster.
      • Target Path: indicates the HDFS directory for storing standby cluster backup data. The storage path cannot be an HDFS hidden directory, such as a snapshot or recycle bin directory, or a default system directory, such as /hbase or /user/hbase/backup.

  8. Click OK.
  9. In the Operation column of the created task in the backup task list, click More and select Back Up Now to execute the backup task.

    After the backup task is executed, the system automatically creates a subdirectory for each backup task in the backup directory. The format of the subdirectory name is Backup task name_Task creation time, and the subdirectory is used to save data source backup files. The format of the backup file name is Data source_Task execution time.tar.gz.