Skip to content

Commit

Permalink
faq: update backup and restore (#4362) #4491 (#4498)
Browse files Browse the repository at this point in the history
* cherry pick #4362 to release-3.1

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

* faq: update backup and restore (#4362)

* Update br/backup-and-restore-tool.md

* Update faq/tidb-faq.md

* Update faq/tidb-faq.md
  • Loading branch information
ireneontheway authored Sep 14, 2020
1 parent 638c1c7 commit 13475cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion br/backup-and-restore-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ aliases: ['/docs-cn/v3.1/br/backup-and-restore-tool/','/docs-cn/v3.1/reference/t

# 使用 BR 进行备份与恢复

[Backup & Restore](https://github.com/pingcap/br)(以下简称 BR)是 TiDB 分布式备份恢复的命令行工具,用于对 TiDB 集群进行数据备份和恢复。相比 [`mydumper`/`loader`](/backup-and-restore-using-mydumper-lightning.md),BR 更适合大数据量的场景。本文档介绍了 BR 的使用限制、工作原理、命令行描述、备份恢复用例以及最佳实践。
[Backup & Restore](https://github.com/pingcap/br)(以下简称 BR)是 TiDB 分布式备份恢复的命令行工具,用于对 TiDB 集群进行数据备份和恢复。相比 [`dumpling`](/export-or-backup-using-dumpling.md)[`mydumper`/`loader`](/backup-and-restore-using-mydumper-lightning.md),BR 更适合大数据量的场景。本文档介绍了 BR 的使用限制、工作原理、命令行描述、备份恢复用例以及最佳实践。

## 使用限制

Expand Down
6 changes: 1 addition & 5 deletions faq/tidb-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -733,11 +733,7 @@ TiDB 设计的目标就是针对 MySQL 单台容量限制而被迫做的分库
#### 3.6.1 TiDB 主要备份方式?
目前,推荐的备份方式是使用 [PingCAP fork 的 Mydumper](/mydumper-overview.md)。尽管 TiDB 也支持使用 MySQL 官方工具 `mysqldump` 进行数据备份、恢复,但其性能低于 [`mydumper`](/mydumper-overview.md)/[`loader`](/loader-overview.md),并且该工具备份、恢复大量数量时,要耗费更多时间。
使用 Mydumper 导出来的数据文件尽可能的小, 最好不要超过 64M, 可以设置参数 -F 64;
loader 的 -t 参数可以根据 TiKV 的实例个数以及负载进行评估调整,例如 3 个 TiKV 的场景, 此值可以设为 3 * (1 ~ n),当 TiKV 负载过高,loader 以及 TiDB 日志中出现大量 `backoffer.maxSleep 15000ms is exceeded` 可以适当调小该值,当 TiKV 负载不是太高的时候,可以适当调大该值。
目前,数据量大时推荐使用 [BR](/br/backup-and-restore-tool.md) 进行备份。其他场景推荐使用 [Dumpling](/export-or-backup-using-dumpling.md) 进行备份。尽管 TiDB 也支持使用 MySQL 官方工具 `mysqldump` 进行数据备份和恢复,但其性能低于 [BR](/br/backup-and-restore-tool.md),并且 `mysqldump` 备份和恢复大量数据的耗费更长。
## 四、数据、流量迁移
Expand Down

0 comments on commit 13475cd

Please sign in to comment.