From d710f91ef0d85d4a79a49eba25f10293e9bc00f3 Mon Sep 17 00:00:00 2001 From: foesa <35463247+foesa-yang@users.noreply.github.com> Date: Fri, 11 Feb 2022 16:13:20 +0800 Subject: [PATCH 1/6] update br 0211 --- .../2.backup-restore/2.compile-br.md | 4 +-- .../2.backup-restore/3.br-backup-data.md | 27 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/docs-2.0/7.data-security/2.backup-restore/2.compile-br.md b/docs-2.0/7.data-security/2.backup-restore/2.compile-br.md index d6b4116510f..3ad20c7e380 100644 --- a/docs-2.0/7.data-security/2.backup-restore/2.compile-br.md +++ b/docs-2.0/7.data-security/2.backup-restore/2.compile-br.md @@ -31,8 +31,8 @@ ```bash [nebula-br]$ bin/br version -Nebula Backup And Restore Ultility Tool,V-0.1.0 - GitSha: 8e994dc +Nebula Backup And Restore Utility Tool,V-0.1.0 + GitSha: 079e7c7 GitRef: master please run "help" subcommand for more infomation. ``` diff --git a/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md b/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md index 6bad9f2e070..947fca53de3 100644 --- a/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md +++ b/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md @@ -8,7 +8,7 @@ BR 编译成功后,可以备份整个图空间的数据,本文介绍如何 - 确认 Nebula Graph 服务正在运行中。 -- BR 可以免密登录服务器,即在 BR 机器上的账号可以通过 SSH 免密登录到 Meta 服务器和 Storage 服务器。详情请参见 [SSH tunnels with keys](http://alexander.holbreich.org/ssh-tunnel-without-password/)。 +- 已下载 [nebula-agent](https://github.com/vesoft-inc/nebula-agent) 并在集群中的每个主机上启动代理服务。 - 如果使用 Alibaba Cloud OSS 或 Amazon S3 保存备份文件,请确保 Meta 服务器、Storage 服务器和 BR 机器都已安装相应的客户端。详情请参见 [Alibaba Cloud ossutil 文档](https://www.alibabacloud.com/help/zh/doc-detail/120075.htm#concept-303829) 和 [Amazon S3 CLI 文档](https://docs.amazonaws.cn/cli/latest/userguide/cli-services-s3.html)。 @@ -31,28 +31,27 @@ BR 编译成功后,可以备份整个图空间的数据,本文介绍如何 确保本地存储备份文件的路径存在。 ```bash -$ ./bin/br backup full --meta --storage --user --verbose +$ ./bin/br backup full --meta --storage ``` -例如运行以下命令对 meta 服务的地址为`192.168.*.*:9559`,用户名为`test`的整个集群进行全量备份操作,并将备份文件保存到本地的 `/home/test/backup`。 +例如运行以下命令对 meta 服务的地址为`127.0.0.1:9559`的整个集群进行全量备份操作,并将备份文件保存到本地的 `/home/nebula/backup/`。 ```bash - $ ./bin/br backup full --meta "192.168.*.*:9559" --storage "local:///home/test/backup" --user "test" --verbose + $ ./bin/br backup full --meta "127.0.0.1:9559" --storage "local:///home/nebula/backup/" ``` 以下列出命令的相关参数。 -| 参数 | 是否必需 | 默认值 | 说明 | 数据类型 | +| 参数 | 数据类型 | 是否必需 | 默认值 | 说明 | | --- | --- | --- | --- | --- | -| --concurrent | 否 | 5 | 针对阿里云 OSS 最大并发数。 | int | -| --connection | 否 | 5 | 最大 ssh 连接数。 | int | -| --extra_args | 否 | 无 | 备份存储工具(OSS/HDFS/S3)用于备份的参数。 | string | -| --log | 否 | "br.log" | 日志路径。 | string | -| --meta | 是| 无 | meta 服务的地址和端口号。 | string | -| --stroage | 是 | 无 | BR 备份数据存储位置,格式为:\://\
Schema:可选值为 `local` 和 `hdfs`。
PATH:存储位置的路径。 | string | -| --user | 是 | 无 | 登录到 meta/storage 服务所在主机的用户名。 | string | -| --verbose | 否 | 无 | 显示的详细信息。 | - | - +| --log | string | 否 | "br.log" | 日志路径。 | +| --meta | string | 是| 无 | meta 服务的地址和端口号。 | +| --spaces | stringArray | 否 | 无 | (实验性功能)指定要备份的图空间名字,未指定将备份所有图空间。 | +| --stroage | string | 是 | 无 | BR 备份数据存储位置,格式为:\://\
Schema:可选值为 `local` 和 `s3`。选择 s3 时,需要填写`s3.access_key`、`s3.endpoint`、`s3.region`和 `s3.secret_key`。
PATH:存储位置的路径。| +| --s3.access_key | string | 否 | 无 | 访问密钥的ID。 | +| --s3.endpoint | string | 否 | 无 | 设置 S3 端点的 URL,指定 http 或 https。 | +| --s3.region | string | 否 | 无 | 设置区域或位置。 | +| --s3.secret_key| string | 否 | 无 | 设置访问 ID 的密钥。 | ## 下一步 备份文件生成后,可以使用 BR 将备份文件的数据恢复到 Nebula Graph 中。具体操作,请参见[使用 BR 恢复数据](4.br-restore-data.md)。 From 3153a425cce9df9cee7c08f17127e2f2bafcc7da Mon Sep 17 00:00:00 2001 From: foesa <35463247+foesa-yang@users.noreply.github.com> Date: Fri, 11 Feb 2022 17:45:47 +0800 Subject: [PATCH 2/6] update --- .../2.backup-restore/3.br-backup-data.md | 22 +++++---- .../2.backup-restore/4.br-restore-data.md | 48 ++++++++++++------- 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md b/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md index 947fca53de3..c6a2568eea1 100644 --- a/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md +++ b/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md @@ -8,7 +8,7 @@ BR 编译成功后,可以备份整个图空间的数据,本文介绍如何 - 确认 Nebula Graph 服务正在运行中。 -- 已下载 [nebula-agent](https://github.com/vesoft-inc/nebula-agent) 并在集群中的每个主机上启动代理服务。 +- 已下载 [nebula-agent](https://github.com/vesoft-inc/nebula-agent) 并在集群中的每个主机上运行代理服务。 - 如果使用 Alibaba Cloud OSS 或 Amazon S3 保存备份文件,请确保 Meta 服务器、Storage 服务器和 BR 机器都已安装相应的客户端。详情请参见 [Alibaba Cloud ossutil 文档](https://www.alibabacloud.com/help/zh/doc-detail/120075.htm#concept-303829) 和 [Amazon S3 CLI 文档](https://docs.amazonaws.cn/cli/latest/userguide/cli-services-s3.html)。 @@ -28,17 +28,22 @@ BR 编译成功后,可以备份整个图空间的数据,本文介绍如何 !!! Note - 确保本地存储备份文件的路径存在。 + 确保备份文件的路径存在。 ```bash $ ./bin/br backup full --meta --storage ``` -例如运行以下命令对 meta 服务的地址为`127.0.0.1:9559`的整个集群进行全量备份操作,并将备份文件保存到本地的 `/home/nebula/backup/`。 +例如运行以下命令对 meta 服务的地址为`127.0.0.1:9559`的整个集群进行全量备份操作,并将备份文件保存到本地的 `/home/nebula/backup/`路径下。 ```bash $ ./bin/br backup full --meta "127.0.0.1:9559" --storage "local:///home/nebula/backup/" - ``` +``` + +运行以下命令对 meta 服务的地址为`127.0.0.1:9559`的整个集群进行全量备份操作,并将备份文件保存到兼容 s3 协议的对象存储服务 `br-test` 桶下的`backup`中。 +```bash +br backup full --meta "127.0.0.1:9559" --s3.endpoint "http://127.0.0.1:9000" --storage="s3://br-test/backup/" --s3.access_key=minioadmin --s3.secret_key=minioadmin --s3.region=default +``` 以下列出命令的相关参数。 @@ -48,10 +53,11 @@ $ ./bin/br backup full --meta --storage | --meta | string | 是| 无 | meta 服务的地址和端口号。 | | --spaces | stringArray | 否 | 无 | (实验性功能)指定要备份的图空间名字,未指定将备份所有图空间。 | | --stroage | string | 是 | 无 | BR 备份数据存储位置,格式为:\://\
Schema:可选值为 `local` 和 `s3`。选择 s3 时,需要填写`s3.access_key`、`s3.endpoint`、`s3.region`和 `s3.secret_key`。
PATH:存储位置的路径。| -| --s3.access_key | string | 否 | 无 | 访问密钥的ID。 | -| --s3.endpoint | string | 否 | 无 | 设置 S3 端点的 URL,指定 http 或 https。 | -| --s3.region | string | 否 | 无 | 设置区域或位置。 | -| --s3.secret_key| string | 否 | 无 | 设置访问 ID 的密钥。 | +| --s3.access_key | string | 否 | 无 | 用于标识用户。 | +| --s3.endpoint | string | 否 | 无 | S3 对外服务的访问域名的 URL,指定 http 或 https。 | +| --s3.region | string | 否 | 无 | 数据中心所在物理位置。 | +| --s3.secret_key| string | 否 | 无 | 用户用于加密签名字符串和用来验证签名字符串的密钥,必须保密。 | + ## 下一步 备份文件生成后,可以使用 BR 将备份文件的数据恢复到 Nebula Graph 中。具体操作,请参见[使用 BR 恢复数据](4.br-restore-data.md)。 diff --git a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md index b4cf1973535..0e5f585447d 100644 --- a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md +++ b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md @@ -14,18 +14,12 @@ - BR 编译完成。如何编译 BR,请参见[编译 BR](2.compile-br.md)。 +- 已下载 [nebula-agent](https://github.com/vesoft-inc/nebula-agent) 并在集群中的每个主机上运行代理服务。 + - 确认没有应用程序连接到待恢复数据的 Nebula Graph 集群。 - 确认集群的拓扑结构一致,即原集群和目标集群的主机数量一致。 -- BR 可以免密登录服务器,即在 BR 机器上的账号可以通过 SSH 免密登录到 Meta 服务器和 Storage 服务器。详情请参见 [SSH tunnels with keys](http://alexander.holbreich.org/ssh-tunnel-without-password/)。 - - !!! caution - - 该账号必须有 Nebula Graph 安装目录的写权限,meta/storage 服务的数据目录(--data_path)的写权限。 - -- 执行恢复操作时需使用 `root` 用户。 - - 如果使用 Alibaba Cloud OSS 或 Amazon S3 保存备份文件,请确保 Meta 服务器、Storage 服务器和 BR 机器都已安装相应的客户端。详情请参见 [Alibaba Cloud ossutil 文档](https://www.alibabacloud.com/help/zh/doc-detail/120075.htm#concept-303829) 和 [Amazon S3 CLI 文档](https://docs.amazonaws.cn/cli/latest/userguide/cli-services-s3.html)。 !!! caution @@ -39,26 +33,43 @@ ```bash $ ./bin/br show --storage ``` - 例如,可以使用以下命令列出在本地 `/home/test/backup` 路径中的备份的信息。 + + 例如,可以使用以下命令列出在本地 `/home/nebula/backup` 路径中的备份的信息。 ```bash - $ ./bin/br show --storage "local:///home/test/backup" - +----------------------------+---------------------+------------------+-------------+---------------+ - | NAME | CREATE TIME | SPACES | FULL BACKUP | SPECIFY SPACE | - +----------------------------+---------------------+------------------+-------------+---------------+ - | BACKUP_2021_07_29_06_51_09 | 2021-07-29 06:51:09 | basketballplayer | true | true | - | BACKUP_2021_07_29_07_55_08 | 2021-07-29 07:55:09 | basketballplayer | true | true | - +----------------------------+---------------------+------------------+-------------+---------------+ + $ ./bin/br show --storage "local:///home/nebula/backup" + +----------------------------+---------------------+------------------------+-------------+------------+ + | NAME | CREATE TIME | SPACES | FULL BACKUP | ALL SPACES | + +----------------------------+---------------------+------------------------+-------------+------------+ + | BACKUP_2022_02_10_07_40_41 | 2022-02-10 07:40:41 | basketballplayer | true | true | + | BACKUP_2022_02_11_08_26_43 | 2022-02-11 08:26:47 | basketballplayer,foesa | true | true | + +----------------------------+---------------------+------------------------+-------------+------------+ ``` + 或使用以下命令列出在兼容 s3 协议的对象存储服务 `br-test` 桶下的`backup`中的备份的信息。 + ```bash + $ ./bin/br show --s3.endpoint "http://127.0.0.1:9000" --storage="s3://br-test/backup/" --s3.access_key=minioadmin --s3.secret_key=minioadmin --s3.region=default + ``` + + 以下列出命令的相关参数。 + + | 参数 | 数据类型 | 是否必需 | 默认值 | 说明 | + | --- | --- | --- | --- | --- | + | --log | string | 否 | "br.log" | 日志路径。 | + | --stroage | string | 是 | 无 | BR 备份数据存储位置,格式为:\://\
Schema:可选值为 `local` 和 `s3`。选择 s3 时,需要填写`s3.access_key`、`s3.endpoint`、`s3.region`和 `s3.secret_key`。
PATH:存储位置的路径。| + | --s3.access_key | string | 否 | 无 | 用于标识用户。 | + | --s3.endpoint | string | 否 | 无 | S3 对外服务的访问域名的 URL,指定 http 或 https。 | + | --s3.region | string | 否 | 无 | 数据中心所在物理位置。 | + | --s3.secret_key| string | 否 | 无 | 用户用于加密签名字符串和用来验证签名字符串的密钥,必须保密。 | + \ No newline at end of file From 7045909ffd0fec35a56f591b3ec3c26b7e5a0c5a Mon Sep 17 00:00:00 2001 From: foesa <35463247+foesa-yang@users.noreply.github.com> Date: Fri, 11 Feb 2022 18:27:36 +0800 Subject: [PATCH 3/6] add --- .../2.backup-restore/3.br-backup-data.md | 9 +- .../2.backup-restore/4.br-restore-data.md | 123 +++++++++--------- 2 files changed, 64 insertions(+), 68 deletions(-) diff --git a/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md b/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md index c6a2568eea1..01934deeb08 100644 --- a/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md +++ b/docs-2.0/7.data-security/2.backup-restore/3.br-backup-data.md @@ -9,12 +9,6 @@ BR 编译成功后,可以备份整个图空间的数据,本文介绍如何 - 确认 Nebula Graph 服务正在运行中。 - 已下载 [nebula-agent](https://github.com/vesoft-inc/nebula-agent) 并在集群中的每个主机上运行代理服务。 - -- 如果使用 Alibaba Cloud OSS 或 Amazon S3 保存备份文件,请确保 Meta 服务器、Storage 服务器和 BR 机器都已安装相应的客户端。详情请参见 [Alibaba Cloud ossutil 文档](https://www.alibabacloud.com/help/zh/doc-detail/120075.htm#concept-303829) 和 [Amazon S3 CLI 文档](https://docs.amazonaws.cn/cli/latest/userguide/cli-services-s3.html)。 - - !!! Note - - 请创建软链接方便使用 ossutil 命令。命令为`ln -s // /usr/local/bin/ossutil`,根据实际路径和系统替换内容。 - 如果在本地保存备份文件,需要在 Meta 服务器、Storage 服务器和 BR 机器上创建绝对路径相同的目录,并记录绝对路径,同时需要保证账号对该目录有写权限。 @@ -49,10 +43,11 @@ br backup full --meta "127.0.0.1:9559" --s3.endpoint "http://127.0.0.1:9000" --s | 参数 | 数据类型 | 是否必需 | 默认值 | 说明 | | --- | --- | --- | --- | --- | +| -h,-help | - | 否 | 无 | 查看帮助。 | | --log | string | 否 | "br.log" | 日志路径。 | | --meta | string | 是| 无 | meta 服务的地址和端口号。 | | --spaces | stringArray | 否 | 无 | (实验性功能)指定要备份的图空间名字,未指定将备份所有图空间。 | -| --stroage | string | 是 | 无 | BR 备份数据存储位置,格式为:\://\
Schema:可选值为 `local` 和 `s3`。选择 s3 时,需要填写`s3.access_key`、`s3.endpoint`、`s3.region`和 `s3.secret_key`。
PATH:存储位置的路径。| +| --storage | string | 是 | 无 | BR 备份数据存储位置,格式为:\://\
Schema:可选值为 `local` 和 `s3`。选择 s3 时,需要填写`s3.access_key`、`s3.endpoint`、`s3.region`和 `s3.secret_key`。
PATH:存储位置的路径。| | --s3.access_key | string | 否 | 无 | 用于标识用户。 | | --s3.endpoint | string | 否 | 无 | S3 对外服务的访问域名的 URL,指定 http 或 https。 | | --s3.region | string | 否 | 无 | 数据中心所在物理位置。 | diff --git a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md index 0e5f585447d..f2cc7055c96 100644 --- a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md +++ b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md @@ -20,72 +20,73 @@ - 确认集群的拓扑结构一致,即原集群和目标集群的主机数量一致。 -- 如果使用 Alibaba Cloud OSS 或 Amazon S3 保存备份文件,请确保 Meta 服务器、Storage 服务器和 BR 机器都已安装相应的客户端。详情请参见 [Alibaba Cloud ossutil 文档](https://www.alibabacloud.com/help/zh/doc-detail/120075.htm#concept-303829) 和 [Amazon S3 CLI 文档](https://docs.amazonaws.cn/cli/latest/userguide/cli-services-s3.html)。 - - !!! caution - - 请创建软链接方便使用 ossutil 命令。命令为`ln -s // /usr/local/bin/ossutil`,根据实际路径和系统替换内容。 - ## 操作步骤 1. 用户可以使用以下命令列出现有备份信息: - ```bash - $ ./bin/br show --storage - ``` - - 例如,可以使用以下命令列出在本地 `/home/nebula/backup` 路径中的备份的信息。 - ```bash - $ ./bin/br show --storage "local:///home/nebula/backup" - +----------------------------+---------------------+------------------------+-------------+------------+ - | NAME | CREATE TIME | SPACES | FULL BACKUP | ALL SPACES | - +----------------------------+---------------------+------------------------+-------------+------------+ - | BACKUP_2022_02_10_07_40_41 | 2022-02-10 07:40:41 | basketballplayer | true | true | - | BACKUP_2022_02_11_08_26_43 | 2022-02-11 08:26:47 | basketballplayer,foesa | true | true | - +----------------------------+---------------------+------------------------+-------------+------------+ - ``` - - 或使用以下命令列出在兼容 s3 协议的对象存储服务 `br-test` 桶下的`backup`中的备份的信息。 - ```bash - $ ./bin/br show --s3.endpoint "http://127.0.0.1:9000" --storage="s3://br-test/backup/" --s3.access_key=minioadmin --s3.secret_key=minioadmin --s3.region=default - ``` - - 以下列出命令的相关参数。 - - | 参数 | 数据类型 | 是否必需 | 默认值 | 说明 | - | --- | --- | --- | --- | --- | - | --log | string | 否 | "br.log" | 日志路径。 | - | --stroage | string | 是 | 无 | BR 备份数据存储位置,格式为:\://\
Schema:可选值为 `local` 和 `s3`。选择 s3 时,需要填写`s3.access_key`、`s3.endpoint`、`s3.region`和 `s3.secret_key`。
PATH:存储位置的路径。| - | --s3.access_key | string | 否 | 无 | 用于标识用户。 | - | --s3.endpoint | string | 否 | 无 | S3 对外服务的访问域名的 URL,指定 http 或 https。 | - | --s3.region | string | 否 | 无 | 数据中心所在物理位置。 | - | --s3.secret_key| string | 否 | 无 | 用户用于加密签名字符串和用来验证签名字符串的密钥,必须保密。 | - \ No newline at end of file + 如果返回如下信息,表示数据已经恢复成功。 + ```bash + Restore succeed. + ``` + + 或者使用以下命令,将兼容 s3 协议的对象存储服务 `br-test` 桶下的`backup`的备份,恢复到 meta 服务的地址为`127.0.0.1:9559`的集群中。 + ```bash + br restore full --meta "127.0.0.1:9559" --s3.endpoint "http://127.0.0.1:9000" --storage="s3://br-test/backup/" --s3.access_key=minioadmin --s3.secret_key=minioadmin --s3.region="default" --name BACKUP_2021_12_08_18_38_08 + ``` + + 以下列出命令的相关参数。 + + | 参数 | 数据类型 | 是否必需 | 默认值 | 说明 | + | --- | --- | --- | --- | --- | + | -h,-help | - | 否 | - | 查看帮助。 | + | --log | string | 否 | "br.log" | 日志路径。 | + | --meta | string |是| 无 | meta 服务的地址和端口号。 | + | --name | string | 是 | 无 | 备份名字。 | + | --storage | string | 是 | 无 | BR 备份数据存储位置,格式为:\://\
Schema:可选值为 `local` 和 `s3`。选择 s3 时,需要填写`s3.access_key`、`s3.endpoint`、`s3.region`和 `s3.secret_key`。
PATH:存储位置的路径。| + | --s3.access_key | string | 否 | 无 | 用于标识用户。 | + | --s3.endpoint | string | 否 | 无 | S3 对外服务的访问域名的 URL,指定 http 或 https。 | + | --s3.region | string | 否 | 无 | 数据中心所在物理位置。 | + | --s3.secret_key| string | 否 | 无 | 用户用于加密签名字符串和用来验证签名字符串的密钥,必须保密。 | \ No newline at end of file From 84c429f66b55875a606cb01e0c373bcca3b7b86f Mon Sep 17 00:00:00 2001 From: foesa <35463247+foesa-yang@users.noreply.github.com> Date: Mon, 14 Feb 2022 13:54:44 +0800 Subject: [PATCH 4/6] Update 4.br-restore-data.md --- .../2.backup-restore/4.br-restore-data.md | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md index f2cc7055c96..5ad87b6346d 100644 --- a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md +++ b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md @@ -66,16 +66,20 @@ ``` $ ./bin/br restore full --meta "127.0.0.1:9559" --storage "local:///home/nebula/backup/" --name BACKUP_2021_12_08_18_38_08 ``` - - 如果返回如下信息,表示数据已经恢复成功。 - ```bash - Restore succeed. - ``` 或者使用以下命令,将兼容 s3 协议的对象存储服务 `br-test` 桶下的`backup`的备份,恢复到 meta 服务的地址为`127.0.0.1:9559`的集群中。 ```bash br restore full --meta "127.0.0.1:9559" --s3.endpoint "http://127.0.0.1:9000" --storage="s3://br-test/backup/" --s3.access_key=minioadmin --s3.secret_key=minioadmin --s3.region="default" --name BACKUP_2021_12_08_18_38_08 ``` + + 如果返回如下信息,表示数据已经恢复成功。 + ```bash + Restore succeed. + ``` + + !!! caution + + 如果用户新集群的IP和备份集群不同,在恢复集群后需要使用`add host`向新集群中添加 Storage 主机。 以下列出命令的相关参数。 @@ -89,4 +93,24 @@ | --s3.access_key | string | 否 | 无 | 用于标识用户。 | | --s3.endpoint | string | 否 | 无 | S3 对外服务的访问域名的 URL,指定 http 或 https。 | | --s3.region | string | 否 | 无 | 数据中心所在物理位置。 | - | --s3.secret_key| string | 否 | 无 | 用户用于加密签名字符串和用来验证签名字符串的密钥,必须保密。 | \ No newline at end of file + | --s3.secret_key| string | 否 | 无 | 用户用于加密签名字符串和用来验证签名字符串的密钥,必须保密。 | + +3. 如果在备份期间发现任何错误,用户可以使用以下命令清理临时文件。该命令将清理集群和外部存储中的文件,同时用户也可以使用该命令清理外部存储中的旧的备份文件。 + + ``` + $ ./bin/br clearnup --meta --storage --name + ``` + + 以下列出命令的相关参数。 + + | 参数 | 数据类型 | 是否必需 | 默认值 | 说明 | + | --- | --- | --- | --- | --- | + | -h,-help | - | 否 | - | 查看帮助。 | + | --log | string | 否 | "br.log" | 日志路径。 | + | --meta | string |是| 无 | meta 服务的地址和端口号。 | + | --name | string | 是 | 无 | 备份名字。 | + | --storage | string | 是 | 无 | BR 备份数据存储位置,格式为:\://\
Schema:可选值为 `local` 和 `s3`。选择 s3 时,需要填写`s3.access_key`、`s3.endpoint`、`s3.region`和 `s3.secret_key`。
PATH:存储位置的路径。| + | --s3.access_key | string | 否 | 无 | 用于标识用户。 | + | --s3.endpoint | string | 否 | 无 | S3 对外服务的访问域名的 URL,指定 http 或 https。 | + | --s3.region | string | 否 | 无 | 数据中心所在物理位置。 | + | --s3.secret_key| string | 否 | 无 | 用户用于加密签名字符串和用来验证签名字符串的密钥,必须保密。 | From 0695404420e12a05e55bf183daa4701ffa214ca2 Mon Sep 17 00:00:00 2001 From: foesa <35463247+foesa-yang@users.noreply.github.com> Date: Mon, 14 Feb 2022 15:00:20 +0800 Subject: [PATCH 5/6] Update 4.br-restore-data.md --- .../7.data-security/2.backup-restore/4.br-restore-data.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md index 5ad87b6346d..6a7bba1d7a0 100644 --- a/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md +++ b/docs-2.0/7.data-security/2.backup-restore/4.br-restore-data.md @@ -14,11 +14,11 @@ - BR 编译完成。如何编译 BR,请参见[编译 BR](2.compile-br.md)。 -- 已下载 [nebula-agent](https://github.com/vesoft-inc/nebula-agent) 并在集群中的每个主机上运行代理服务。 +- 已下载 [nebula-agent](https://github.com/vesoft-inc/nebula-agent) 并在集群中的**每个**主机上运行代理服务。 - 确认没有应用程序连接到待恢复数据的 Nebula Graph 集群。 -- 确认集群的拓扑结构一致,即原集群和目标集群的主机数量一致。 +- 确认集群的拓扑结构一致,即原集群和目标集群的主机数量一致,且每个主机数据文件夹数量分布一致。 ## 操作步骤 @@ -61,7 +61,7 @@ $ ./bin/br restore full --meta --storage --name ``` - 例如,可以使用以下命令,将本地 `/home/foesa/backup` 路径中的数据恢复到地址为`192.168.*.*:9559`,meta/storage 服务所在主机的用户名为`root`的集群: + 例如,可以使用以下命令,将本地 `/home/nebula/backup/` 路径中的数据恢复到为 meta 地址为`127.0.0.1:9559`集群中: ``` $ ./bin/br restore full --meta "127.0.0.1:9559" --storage "local:///home/nebula/backup/" --name BACKUP_2021_12_08_18_38_08 @@ -98,7 +98,7 @@ 3. 如果在备份期间发现任何错误,用户可以使用以下命令清理临时文件。该命令将清理集群和外部存储中的文件,同时用户也可以使用该命令清理外部存储中的旧的备份文件。 ``` - $ ./bin/br clearnup --meta --storage --name + $ ./bin/br cleanup --meta --storage --name ``` 以下列出命令的相关参数。 From d29ab3af570bc94c8e370f422df655f14351b764 Mon Sep 17 00:00:00 2001 From: foesa <35463247+foesa-yang@users.noreply.github.com> Date: Mon, 14 Feb 2022 15:06:22 +0800 Subject: [PATCH 6/6] Update 2.compile-br.md --- docs-2.0/7.data-security/2.backup-restore/2.compile-br.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-2.0/7.data-security/2.backup-restore/2.compile-br.md b/docs-2.0/7.data-security/2.backup-restore/2.compile-br.md index 3ad20c7e380..ad9573458b2 100644 --- a/docs-2.0/7.data-security/2.backup-restore/2.compile-br.md +++ b/docs-2.0/7.data-security/2.backup-restore/2.compile-br.md @@ -9,7 +9,7 @@ ## 操作步骤 -1. 克隆`nebula-storage`库至机器。 +1. 克隆`nebula-br`库至机器。 ```bash git clone https://github.com/vesoft-inc/nebula-br.git