Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faq: update backup and restore (#4362) #4491 #4498

Merged
merged 5 commits into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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