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

tools: update document about migration data from mysql #1921

Closed
wants to merge 16 commits into from

Conversation

WangXiangUSTC
Copy link
Contributor

What is changed, added or deleted?

mydumper, loader and synced is not recommend to use, need update the docs.

Which version does your change affect?

update dev now, and after get two LGTM I will update v2.1 and v3.0

@WangXiangUSTC WangXiangUSTC changed the title update document about migration data from mysql tools: update document about migration data from mysql Oct 8, 2019
@WangXiangUSTC
Copy link
Contributor Author

@CaitinChen @GregoryIan PTAL

dev/how-to/migrate/from-mysql.md Outdated Show resolved Hide resolved
dev/how-to/migrate/from-mysql.md Outdated Show resolved Hide resolved
WangXiangUSTC and others added 4 commits October 9, 2019 15:57
Co-Authored-By: Xuecheng Zhang <csuzhangxc@gmail.com>
Co-Authored-By: Xuecheng Zhang <csuzhangxc@gmail.com>
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rest LGTM

dev/how-to/migrate/full-from-mysql.md Outdated Show resolved Hide resolved
dev/how-to/migrate/full-from-mysql.md Outdated Show resolved Hide resolved
dev/how-to/migrate/overview.md Outdated Show resolved Hide resolved
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -11,37 +11,24 @@ category: how-to

在上述数据迁移过程中会用到如下工具:

- [DM (Data Migration)](/dev/reference/tools/data-migration/overview.md):集成了 Mydumper、Loader、Syncer 的功能,支持 MySQL 数据的全量导出和到 TiDB 的全量导入,还支持 MySQL binlog 数据到 TiDB 的增量同步。
- [TiDB Lightning](/dev/reference/tools/tidb-lightning/overview.md):用于将全量数据高速导入到 TiDB 集群。例如,如果要导入超过 1TiB 的数据,使用 Loader 往往需花费几十个小时,而使用 TiDB-Lightning 的导入速度至少是 Loader 的三倍。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

说明一下只能进行离线导入吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已改 e86bcc7

> 目前 TiDB 支持 UTF8mb4 [字符编码](/dev/reference/sql/character-set.md),假设 Mydumper 导出数据为 latin1 字符编码,请使用 `iconv -f latin1 -t utf-8 $file -o /data/imdbload/$basename` 命令转换,$file 为已有文件,$basename 为转换后文件
- **DM**:先使用 DM 将数据从 MySQL 全量迁移至 TiDB,然后使用 DM 将 MySQL binlog 数据增量同步至 TiDB。一般场景推荐使用 DM,详细使用方法参见 [DM (Data Migration)](/dev/reference/tools/data-migration/overview.md)。
- **Mydumper + TiDB Lightning + DM**:先使用 Mydumper 将数据从 MySQL 导出,然后使用 TiDB Lightning 将数据导入至 TiDB,再使用 DM 创建增量同步任务将 MySQL binlog 数据同步至 TiDB。仅在全量数据在 T 级别以上以及对全量数据的导入速度有较高要求的场景下推荐使用该方案,详细使用方法参见 [Mydumper](/dev/reference/tools/mydumper.md)、[TiDB Lightning](/dev/reference/tools/tidb-lightning/overview.md) 和 [DM (Data Migration)](/dev/reference/tools/data-migration/overview.md)。
- **Mydumper + Loader + Syncer**:先使用 Mydumper 将数据从 MySQL 导出,然后使用 Loader 将数据导入至 TiDB,再使用 Syncer 将 MySQL binlog 数据增量同步至 TiDB。适合在数据量较少的场景及测试环境中使用该方案,详细操作参见 [MySQL 数据到 TiDB 的增量同步](/dev/how-to/migrate/incrementally-from-mysql.md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

尽量不推进 loader 了,使用 lightning 的 tidb backend 模式吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前 lightning 的文档还没有更新,等文档更新后我再更新下描述吧

Copy link
Contributor

@IANTHEREAL IANTHEREAL Oct 10, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

等 lightning 文档合并吧,应该可以用这个文章 https://docs.google.com/document/d/13U0Cud3YSThQFOzIQwt-aWjwd4M4fOKBb3JMtlQYQV4/edit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好,那再等等

@anotherrachel anotherrachel removed their request for review October 10, 2019 02:24
@yikeke yikeke self-requested a review October 10, 2019 02:58
@yikeke yikeke added the translation/doing This PR’s assignee is translating this PR. label Oct 15, 2019
@@ -0,0 +1,124 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend using the file name "full-data-from-mysql.md", so the directory will be dev/how-to/migrate/full-data-from-mysql.md which conveys a clearer meaning~

Copy link
Contributor

@yikeke yikeke Oct 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And no need to add this file to TOC.md?

Also this file /dev/how-to/migrate/incrementally-from-mysql.md is not in TOC.md now.

dev/how-to/migrate/full-from-mysql.md Outdated Show resolved Hide resolved
dev/how-to/migrate/from-mysql.md Outdated Show resolved Hide resolved
dev/how-to/migrate/from-mysql.md Outdated Show resolved Hide resolved
dev/how-to/migrate/from-mysql.md Outdated Show resolved Hide resolved
dev/how-to/migrate/from-mysql.md Outdated Show resolved Hide resolved
dev/how-to/migrate/from-mysql.md Outdated Show resolved Hide resolved
dev/how-to/migrate/from-mysql.md Outdated Show resolved Hide resolved
dev/how-to/migrate/overview.md Outdated Show resolved Hide resolved
dev/how-to/migrate/overview.md Outdated Show resolved Hide resolved
category: how-to
---

# 全量数据迁移
# 从 MySQL 迁移数据

Copy link
Contributor

@yikeke yikeke Oct 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一二级标题间最好加一段介绍性概述,可以参考这一段或稍微写两句话总结一下这篇文章。

Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com>
@TomShawn
Copy link
Contributor

TomShawn commented Nov 11, 2019

@WangXiangUSTC 如果该更新也适用于 v3.1,也请更新至 v3.1,谢谢~

@WangXiangUSTC
Copy link
Contributor Author

@TomShawn need wait for other document ready, don't update now

@anotherrachel
Copy link
Contributor

#2184 is merged. Please update the content. @WangXiangUSTC

@yikeke
Copy link
Contributor

yikeke commented Feb 23, 2020

由于近期多版本维护方式的改变,我们将原来 master 下几个版本文件夹拆散到了不同的 release branch 里,用维护多版本代码的方式来维护多版本文档,从而减轻大家复制粘贴同一份更新到多个版本文件夹的工作量。

由于上游的文件结构改变了,我在给本 PR 处理冲突的过程中,发现原来的四个文件更新有三个已经在另一个 PR 里做了更改(因为这个 PR 比较久远了),所以冲突解决完后只剩一个文件了。

如果这个 PR 还有需要改的,或者我解决冲突的过程有不妥之处,请随时戳我,谢谢理解。 @WangXiangUSTC

FYI @csuzhangxc @GregoryIan

@yikeke
Copy link
Contributor

yikeke commented Feb 23, 2020

After this PR merges, sre-bot will automatically cherry-pick this PR to the release-3.1, release-3.0, and release-2.1 branches (the needs-cherry-pick-xxx labels will trigger the behavior). FYI. @WangXiangUSTC @csuzhangxc @GregoryIan

@TomShawn
Copy link
Contributor

TomShawn commented Apr 4, 2020

As confirmed by @WangXiangUSTC, the changes in this PR are outdated, so I'll close this PR.

@TomShawn TomShawn closed this Apr 4, 2020
@yikeke yikeke removed the translation/doing This PR’s assignee is translating this PR. label May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants