Install BR¶
This topic introduces how to install BR.
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.0 ~ 3.2 | 0.6.1 | 0.1.0 ~ 0.2.0 |
Install BR with a binary file¶
-
Install BR.
wget https://github.com/vesoft-inc/nebula-br/releases/download/v0.6.1/br-0.6.1-linux-amd64
-
Change the binary file name to
br
.sudo mv br-0.6.1-linux-amd64 br
-
Grand execute permission to BR.
sudo chmod +x br
-
Run
./br version
to check BR version.[nebula-br]$ ./br version Nebula Backup And Restore Utility Tool,V-0.6.1
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:
-
Clone the
nebula-br
repository to your machine.git clone https://github.com/vesoft-inc/nebula-br.git
-
Change to the
br
directory.cd nebula-br
-
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-0.6.1
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:
-
Install Agent.
wget https://github.com/vesoft-inc/nebula-agent/releases/download/v0.2.0/agent-0.2.0-linux-amd64
-
Rename the Agent file to
agent
.sudo mv agent-0.2.0-linux-amd64 agent
-
Add execute permission to Agent.
sudo chmod +x agent
-
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 (this option is only available in Agent 0.2.0 and higher versions). 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
--agent
should be the same as that of Meta and Storage services set in the configuration files. That is, use the real IP addresses or use127.0.0.1
. Otherwise Agent does not run. -
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.