Skip to content

Install BR

This topic introduces the installation of BR in bare-metal deployment scenarios.

Notes

To use the BR (Enterprise Edition) tool, you need to install the NebulaGraph Agent service, which is taken as a daemon for each machine in the cluster that starts and stops the NebulaGraph service, and uploads and downloads backup files. The BR (Enterprise Edition) tool and the Agent plug-in are installed as described below.

Version compatibility

NebulaGraph BR Agent
3.5.x 3.5.0 0.2.0 ~ 3.4.0
3.3.0 ~ 3.4.1 3.3.0 0.2.0 ~ 3.4.0
3.0.x ~ 3.2.x 0.6.1 0.1.0 ~ 0.2.0

Install BR with a binary file

  1. Install BR.

    wget https://github.com/vesoft-inc/nebula-br/releases/download/v3.5.0/br-3.5.0-linux-amd64
    
  2. Change the binary file name to br.

    sudo mv br-3.5.0-linux-amd64 br
    
  3. Grand execute permission to BR.

    sudo chmod +x br
    
  4. Run ./br version to check BR version.

    [nebula-br]$ ./br version
    Nebula Backup And Restore Utility Tool,V-3.5.0
    

Install BR with the source code

Before compiling the BR, do a check of these:

  • Go 1.14.x or a later version is installed.
  • make is installed.

To compile the BR, follow these steps:

  1. Clone the nebula-br repository to your machine.

    git clone https://github.com/vesoft-inc/nebula-br.git
    
  2. Change to the br directory.

    cd nebula-br
    
  3. Compile the BR.

    make
    

Users can enter bin/br version on the command line. If the following results are returned, the BR is compiled successfully.

[nebula-br]$ bin/br version
NebulaGraph Backup And Restore Utility Tool,V-3.5.0

Install Agent

NebulaGraph Agent is installed as a binary file in each machine and serves the BR tool with the RPC protocol.

In each machine, follow these steps:

  1. Install Agent.

    wget https://github.com/vesoft-inc/nebula-agent/releases/download/v3.4.0/agent-3.4.0-linux-amd64
    
  2. Rename the Agent file to agent.

    sudo mv agent-3.4.0-linux-amd64 agent
    
  3. Add execute permission to Agent.

    sudo chmod +x agent
    
  4. Start Agent.

    Note

    Before starting Agent, make sure that the Meta service has been started and Agent has read and write access to the corresponding NebulaGraph cluster directory and backup directory.

    sudo nohup ./agent --agent="<agent_node_ip>:8888" --meta="<metad_node_ip>:9559" > nebula_agent.log 2>&1 &
    
    • --agent: The IP address and port number of Agent.
    • --meta: The IP address and access port of any Meta service in the cluster.
    • --ratelimit: (Optional) Limits the speed of file uploads and downloads to prevent bandwidth from being filled up and making other services unavailable. Unit: Bytes.

    For example:

    sudo nohup ./agent --agent="192.168.8.129:8888" --meta="192.168.8.129:9559" --ratelimit=1048576 > nebula_agent.log 2>&1 &
    

    Caution

    The IP address format for --agentshould be the same as that of Meta and Storage services set in the configuration files. That is, use the real IP addresses or use 127.0.0.1. Otherwise Agent does not run.

  5. Log into NebulaGraph and then run the following command to view the status of Agent.

    nebula> SHOW HOSTS AGENT;
    +-----------------+------+----------+---------+--------------+---------+
    | Host            | Port | Status   | Role    | Git Info Sha | Version |
    +-----------------+------+----------+---------+--------------+---------+
    | "192.168.8.129" | 8888 | "ONLINE" | "AGENT" | "96646b8"    |         |
    +-----------------+------+----------+---------+--------------+---------+  
    

FAQ

The error `E_LIST_CLUSTER_NO_AGENT_FAILURE

If you encounter E_LIST_CLUSTER_NO_AGENT_FAILURE error, it may be due to the Agent service is not started or the Agent service is not registered to Meta service. First, execute SHOW HOSTS AGENT to check the status of the Agent service on all nodes in the cluster, when the status shows OFFLINE, it means the registration of Agent failed, then check whether the value of the --meta option in the command to start the Agent service is correct.


Last update: July 11, 2023