Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: haojinming <jinming.hao@pingcap.com>
  • Loading branch information
haojinming committed Sep 27, 2022
1 parent 7c21199 commit 0a3d020
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions br/README-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ tikv-br backup raw \
--dst-api-version v2 \
--log-file="/tmp/br_backup.log \
--gcttl=5m \
--start=&{START_KEY} \
--end=&{END_KEY} \
--start="a" \
--end="z" \
--format="raw"
```
命令行各部分的解释如下:
Expand All @@ -69,9 +69,9 @@ tikv-br backup raw \
- `"${PDIP}:2379"``--pd` 的参数
- `--dst-api-version`: 指定备份文件的 `api-version`,请见 [tikv-server config](https://docs.pingcap.com/zh/tidb/stable/tikv-configuration-file#api-version-%E4%BB%8E-v610-%E7%89%88%E6%9C%AC%E5%BC%80%E5%A7%8B%E5%BC%95%E5%85%A5)
- `v2`: `--dst-api-version` 的参数,可选参数为 `v1``v1ttl``v2`(不区分大小写),如果不指定 `dst-api-version` 参数,则备份文件的 `api-version` 与指定 `--pd` 所属的 TiKV 集群 `api-version` 相同。
- `gcttl`: GC 暂停时间周期。可用于确保从存量数据备份到启动 TiKV-CDC 的这段时间内,增量数据不会被 GC 清除。默认为 5 分钟。
- `gcttl`: GC 暂停时长。可用于确保从存量数据备份到 [启动 TiKV-CDC 同步任务](https://github.com/tikv/migration/blob/main/cdc/manual-cn.md#%E5%88%9B%E5%BB%BA%E5%90%8C%E6%AD%A5%E4%BB%BB%E5%8A%A1) 的这段时间内,增量数据不会被 GC 清除。默认为 5 分钟。
- `5m`: `gcttl` 的参数,数据格式为`数字 + 时间单位`, 例如 `24h` 表示 24 小时,`60m` 表示 60 分钟。
- `start`, `end`: 用于生成需要备份的数据区间,为左闭右开区间 `[start, end)`。默认为`["", "")`, 即全部数据。
- `start`, `end`: 用于指定需要备份的数据区间,为左闭右开区间 `[start, end)`。默认为`["", "")`, 即全部数据。
- `format``start``end` 的格式,支持 `raw`[`hex`](https://zh.wikipedia.org/wiki/%E5%8D%81%E5%85%AD%E8%BF%9B%E5%88%B6)[`escaped`](https://zh.wikipedia.org/wiki/%E8%BD%AC%E4%B9%89%E5%AD%97%E7%AC%A6) 三种格式。

备份期间会有进度条在终端中显示,当进度条前进到 100% 时,说明备份已完成。
Expand Down Expand Up @@ -103,7 +103,7 @@ checksum 开启时,备份或恢复操作完成后,会使用 [client-go](http

### 备份恢复操作的安全性

TiKV-BR 支持在开启了 [TLS 配置](https://docs.pingcap.com/zh/tidb/dev/enable-tls-between-components)的 TiKV 集群中执行备份和恢复操作,用户可以通过设置 `--ca``--cert``--key` 参数来指定客户端证书。
TiKV-BR 支持在开启了 [TLS 配置](https://docs.pingcap.com/zh/tidb/dev/enable-tls-between-components) 的 TiKV 集群中执行备份和恢复操作,用户可以通过设置 `--ca``--cert``--key` 参数来指定客户端证书。

## License

Expand Down
8 changes: 4 additions & 4 deletions br/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ tikv-br backup raw \
--dst-api-version v2 \
--log-file="/tmp/br_backup.log \
--gcttl=5m \
--start=&{START_KEY} \
--end=&{END_KEY} \
--start="a" \
--end="z" \
--format="raw"
```
Explanations for some options in the above command are as follows:
Expand All @@ -113,8 +113,8 @@ Explanations for some options in the above command are as follows:
- `"${PDIP}:2379"`: Parameter of `--pd`.
- `--dst-api-version`: The `api-version`, please see [tikv-server config](https://docs.pingcap.com/tidb/stable/tikv-configuration-file#api-version-new-in-v610).
- `v2`: Parameter of `--dst-api-version`, the optionals are `v1`, `v1ttl`, `v2`(Case insensitive). If no `dst-api-version` is specified, the `api-version` is the same with TiKV cluster of `--pd`.
- `gcttl`: The stop duration of GC. This can be used to make sure that the incremental data from backup start to TiKV-CDC take effective will NOT be deleted by GC. 5 minutes by default.
- `5m`: Paramater of `gcttl`. It's format is `number + unit`, e.g. `24h` means 24 hours, `60m` means 60 minutes.
- `gcttl`: The pause duration of GC. This can be used to make sure that the incremental data from backup start to TiKV-CDC [create changefeed](https://github.com/tikv/migration/blob/main/cdc/README.md#create-a-replication-task) will NOT be deleted by GC. 5 minutes by default.
- `5m`: Paramater of `gcttl`. Its format is `number + unit`, e.g. `24h` means 24 hours, `60m` means 60 minutes.
- `start`, `end`: The backup key range. It's closed left and open right `[start, end)`.
- `format`:Format of `start` and `end`. Supported formats are `raw`[`hex`](https://en.wikipedia.org/wiki/Hexadecimal) and [`escaped`](https://en.wikipedia.org/wiki/Escape_character).

Expand Down

0 comments on commit 0a3d020

Please sign in to comment.