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
*: replace loader by lightning #2243
Conversation
@@ -60,7 +60,7 @@ | |||
+ 运维 | |||
- [Ansible 常见运维操作](/dev/how-to/maintain/ansible-operations.md) | |||
+ 备份与恢复 | |||
- [使用 Mydumper/Loader 进行备份与恢复](/dev/how-to/maintain/backup-and-restore/mydumper-loader.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果 lightning 完全可以代替 loader 的方式,loader 的文档可以去掉,否则建议保留 2 种
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不会移除 loader,只是不在官方备份恢复推荐使用方案中。
dev/TOC.md
Outdated
@@ -60,7 +60,7 @@ | |||
+ 运维 | |||
- [Ansible 常见运维操作](/dev/how-to/maintain/ansible-operations.md) | |||
+ 备份与恢复 | |||
- [使用 Mydumper/Loader 进行备份与恢复](/dev/how-to/maintain/backup-and-restore/mydumper-loader.md) | |||
- [使用 Mydumper/Loader 进行备份与恢复](/dev/how-to/maintain/backup-and-restore/mydumper-lightning.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [使用 Mydumper/Loader 进行备份与恢复](/dev/how-to/maintain/backup-and-restore/mydumper-lightning.md) | |
- [使用 Mydumper/Lightning 进行备份与恢复](/dev/how-to/maintain/backup-and-restore/mydumper-lightning.md) |
…into remove-loader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest LGTM
|
||
为了快速地备份恢复数据 (特别是数据量巨大的库),可以参考以下建议: | ||
|
||
* 使用 Mydumper 导出来的数据文件尽可能的小,最好不要超过 64M,可以将参数 `-F` 设置为 64。 | ||
* Loader的 `-t` 参数可以根据 TiKV 的实例个数以及负载进行评估调整,推荐设置为 32。当 TiKV 负载过高,Loader 以及 TiDB 日志中出现大量 `backoffer.maxSleep 15000ms is exceeded` 时,可以适当调小该值;当 TiKV 负载不是太高的时候,可以适当调大该值。 | ||
* 使用 `mydumper` 导出来的数据文件尽可能的小, 可以通过设置参数 `-F` 来控制导出来的文件大小。如果后续使用 TiDB Lightning 对备份文件进行恢复,建议把 `mydumper` -F 参数的值设置为 `256`(单位 MB);如果使用 `loader` 恢复,则建议设置为 `64`(单位 MB)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里要不要把 loader 删掉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里可以留在这里,提及一下
|
||
为了快速地备份恢复数据 (特别是数据量巨大的库),可以参考以下建议: | ||
|
||
* 使用 `mydumper` 导出来的数据文件尽可能的小, 可以通过设置参数 `-F` 来控制导出来的文件大小。如果后续使用 TiDB Lightning 对备份文件进行恢复,建议把 `mydumper` -F 参数的值设置为 `256`(单位 MB);如果使用 `loader` 恢复,则建议设置为 `64`(单位 MB)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same for v3.0 and v3.1.
|
||
本文档将详细介绍如何使用 `mydumper`/`tidb lightning` 对 TiDB 进行全量备份与恢复。增量备份与恢复可使用 [TiDB Binlog](/dev/reference/tidb-binlog/overview.md)。 | ||
|
||
这里我们假定 TiDB 服务信息如下: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里我们假定 TiDB 服务信息如下: | |
这里假定 TiDB 的服务信息如下: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在技术文档中,应避免使用第一人称“我”、“我们”。
|
||
|Name|Address|Port|User|Password| | ||
|----|-------|----|----|--------| | ||
|TiDB|127.0.0.1|4000|root|*| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*
= no password?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
|
||
# 备份与恢复 | ||
|
||
本文档将详细介绍如何使用 `mydumper`/`tidb lightning` 对 TiDB 进行全量备份与恢复。增量备份与恢复可使用 [TiDB Binlog](/dev/reference/tidb-binlog/overview.md)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either tidb-lightning
(the exe name) or "TiDB Lightning" (the product name)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Co-Authored-By: kennytm <kennytm@gmail.com> Co-Authored-By: TomShawn <41534398+TomShawn@users.noreply.github.com>
- [Mydumper](/dev/reference/tools/mydumper.md) 从 TiDB 导出数据 | ||
- [TiDB Lightning](/dev/reference/tools/tidb-lightning/overview.md) 导入数据到 TiDB | ||
|
||
## 使用 `mydumper`/`TiDB Lightning` 全量备份恢复数据 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TiDB Lightning 大写的话不用加反引号吧?
- [Mydumper](/v3.1/reference/tools/mydumper.md) 从 TiDB 导出数据 | ||
- [TiDB Lightning](/v3.1/reference/tools/tidb-lightning/overview.md) 导入数据到 TiDB | ||
|
||
## 使用 `mydumper`/`TiDB Lightning` 全量备份恢复数据 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是否要统一一下,mydumper/TiDB Lightning 还是 mydumper
/TiDB Lightning
?
Co-Authored-By: TomShawn <41534398+TomShawn@users.noreply.github.com>
…into remove-loader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same for v3.0 and v3.1.
|
||
`-t 32` 表明使用 32 个线程去导出数据。`-F 256` 是将实际的 table 切分成多大的 chunk,这里就是 256MB 一个 chunk。 | ||
|
||
`--skip-tz-utc` 添加这个参数忽略掉 TiDB 与导数据的机器之间时区设置不一致的情况,禁止自动转换。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
原句几乎读不通。
|
||
就再执行两步命令: | ||
|
||
1. 执行 `mydumper` 命令前,查询 TiDB 集群的 GC 值并使用 MySQL 客户端将其调整为合适的值。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
读者可能不知道什么是 GC,这里最好能写全 Garbage Collection (GC)
,或至少向用户读者提供可参考的页面。
|
||
上面,我们使用 `-B test` 表明是对 `test` 这个 database 操作,然后用 `-T t1,t2` 表明只导出 `t1`,`t2` 两张表。 | ||
|
||
`-t 32` 表明使用 32 个线程去导出数据。`-F 256` 是将实际的 table 切分成多大的 chunk,这里就是 256MB 一个 chunk。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
切分成多大的
不是正式用语。
|
||
本文档将详细介绍如何使用 `mydumper`/`tidb lightning` 对 TiDB 进行全量备份与恢复。增量备份与恢复可使用 [TiDB Binlog](/dev/reference/tidb-binlog/overview.md)。 | ||
|
||
这里我们假定 TiDB 服务信息如下: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在技术文档中,应避免使用第一人称“我”、“我们”。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What is changed, added or deleted?
we don't recommend to use
loader
any more in TiDB v3.0/3.1/.., andlightning
will take place ofloader
What is the related PR or file link(s)?
Which TiDB version(s) does your changes apply to?
Note: If your changes apply to multiple TiDB versions, make sure you update the documents in the corresponding version folders such as "dev", "v3.0", "v2.1" and "v3.1" in this PR.