xelabs / go-mydumper

A multi-threaded MySQL backup and restore tool, faster than mysqldump

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mystreamer不支持在downstream侧重命名database

blackghost-01 opened this issue · comments

commented
commented

这是一个需求,比如我用来做历史数据归档时,可能有相同的库名,希望能够通过定义不同的库名对上游加以区分

commented

@blackghost-01

Thank you for your report.
The next release will support this feature.

commented

@blackghost-01

The master branch have add -2db flag for you.
Usage:

./bin/mystreamer -h 192.168.0.2 -P 3306 -u mock -p mock -db sbtest -2h 192.168.0.3 -2P 3306 -2u mock -2p mock -2db tpsbtest
  -2db string
    	Downstream database, default(if NULL) is same as upstream db

commented

已测,功能ok,但是需要提前建好2db指定的database,是否可以再优化一下,自动创建?

commented

@blackghost-01

Please re-pull the master branch, the commit id: f85096d

commented

已测试,功能ok,赞响应速度