xelabs / go-mydumper

A multi-threaded MySQL backup and restore tool, faster than mysqldump
GNU General Public License v3.0
346 stars 100 forks source link

【feature】mystreamer支持upstream和downstream使用不同的存储引擎 #5

Closed blackghost-01 closed 6 years ago

blackghost-01 commented 6 years ago

数据迁移过程中(例如历史数据归档),源库和目标库希望使用不同的存储引擎(比如tokudb或者myrocks),达到数据压缩等目的。所以就需要在导入时,支持指定存储引擎类型,或者导出时忽略存储引擎选项(目标库有设置选定的默认存储引擎)

BohuTANG commented 6 years ago

Hi @blackghost-01 ,

From the mystreamer side, we should to parse the table schema and change the ENGINE option to TokuDB/MyRocks or others, so we think this issue priority is lower.

As you said, we can do that by setting the default engine. Thanks.

blackghost-01 commented 6 years ago

期待实现

BohuTANG commented 6 years ago

@blackghost-01

This feature is done, the commit id is here: https://github.com/XeLabs/go-mydumper/commit/a0ee86efcbf1a7e2a3804c90c0370c188892a06f

Now, we can use the flage '--2engine=tokudb' to replace the upstream engine.

  -2engine string
        Downstream table engine
blackghost-01 commented 6 years ago

great job