Help Center/ Cloud Backup and Recovery/ User Guide/ File Backup/ Downloading and Installing the Agent
Updated on 2024-10-28 GMT+08:00

Downloading and Installing the Agent

Scenarios

Before backing up files, you need to change the security group of the target servers or VMs, and install the Agent on them. This section describes how to download and install the Agent.

Currently, only hosts running 64-bit OSs are supported.

Installing the Agent on a Linux Server

  1. Log in to the CBR console.

    1. Log in to the management console.
    2. Click in the upper left corner and select a region.
    3. Click and choose Storage > Cloud Backup and Recovery > File Backups.

  2. Click the Backup Clients tab and locate the target backup client. Click Add Backup Client. On the displayed page, select Linux.

    Figure 1 Linux

  3. Log in to the target host as user root.
  4. On the host, run curl -kv obs.Region ID.myhuaweicloud.com to check that the network is connected. Replace Region ID with the ID of the region you select.
  5. Complete the wget https://obs.region1.myhuaweicloud.com/cbr/deploy/cbragent/install_cbr_agent.sh command and run the command on the server to download the sh script. Then check that the script's SHA256 value is the same as that listed in Table 1.

    Table 1 SHA256 values

    Package/Script Name

    SHA256 Value

    OS

    cbragent_WIN64.zip

    6ebf82287550e25c765c92bcbc12e21e2d65e0ddb508bc91448735b68d2cb62f

    Windows

    cbragent_linux_x86_64.tar.gz

    c79e0345c3e0d6da632beaf722221c6eaeeb7b7ec1f867095575d27988f1224d

    Linux

    install_cbr_agent.sh

    17347eaa21bfbffbba2a5c25006d779977aea8c2df63127fc7887f42a6ba139f

    Linux

  6. Complete the installation command provided on the CBR console.

    /bin/bash -c "$(curl -kfsSL https://cbr-files-backup-agents-cn-north-7.obs.cn-north-7.myhuaweicloud.com/deploy/cbragent/install_cbr_agent.sh)" -- -a {} -s {} -p 3bdb0a1c35d64fe9a68235c53bed4a86 -c cbr.cn-north-7.myhuaweicloud.com -o obs.cn-north-7.myhuaweicloud.com
    • Copy the region ID from the installation page to replace variable region id.
    • Enter the AK and SK in the brackets of a {} and s {} in the command. How to obtain an AK/SK?

      Delete the brackets after entering the AK and SK.

  7. Run the obtained command on the host to install the Agent.
  8. If information similar to the following is displayed, the Agent is successfully installed.

    Figure 2 Executing the installation command

  9. Wait for about 1 minute, and view the backup client in the backup client list. If the Agent status is Normal, the system successfully detects the client, and the Agent is running properly.

Installing the Agent on a Windows Server

  1. Log in to the CBR console.

    1. Log in to the management console.
    2. Click in the upper left corner and select a region.
    3. Click and choose Storage > Cloud Backup and Recovery > File Backups.

  2. Click the Backup Clients tab and locate the target backup client. Click Add Backup Client. On the displayed page, select Windows.

    Figure 3 Windows

  3. Click Download to download the latest Agent installation package to the local computer. Ensure that the package's SHA256 value is the same as that listed in Table 1.
  4. On the local host, choose Start > Run. In the Run dialog box, enter cmd and press Enter.

    On the host, run ping obs.Region ID.myhuaweicloud.com to check that the network is connected. Replace Region ID with the ID of the region you select. For example, if you select CN North-Beijing4, replace it with cn-north-4.

  5. Decompress the obtained package to the installation directory. Then go to the script directory, right-click agent_install.bat, and choose Run as administrator from the shortcut menu. In the displayed dialog box, enter the following information.
  6. Ensure that the installation path contains only letters, digits, underscores (_), or hyphens (-). See Figure 4.

    • access_key: Enter your AK. How to obtain an AK/SK?
    • secret_key: Enter your SK. How to obtain an AK/SK?
    • project_id: Copy the project ID from the installation page.
    • CBR Endpoint: Copy the CBR endpoint from the installation page.
    • OBS Endpoint: Copy the OBS endpoint from the installation page.
    Figure 4 Executing the installation command

  7. After "CBR Agent was installed successfully" is returned, wait for about 1 minute, go back to the backup client list, and find the backup client. If its Agent status is Normal, the Agent has been installed successfully.

Removing a Client

If a backup client is no longer needed, you can remove it.

  1. Log in to the CBR console.

    1. Log in to the management console.
    2. Click in the upper left corner and select a region.
    3. Click and choose Storage > Cloud Backup and Recovery > File Backups.

  2. Click the Backup Clients tab and locate the target backup client. Locate the row that contains the target backup client, click More in the Operation column, and choose Remove Client. See Figure 5.

    After a backup client is removed, files on this client cannot be backed up, and automatic and manual backups already generated will be deleted permanently. Deleted backups cannot be used to restore data.
    Figure 5 Remove Client

  3. Click Yes.