github / gh-ost

GitHub's Online Schema-migration Tool for MySQL
MIT License
12.44k stars 1.26k forks source link

Just moving a table to another DB #417

Open umutm opened 7 years ago

umutm commented 7 years ago

Sorry if the docs cover that but I couldn't be sure.

Does gh-ost cover the scenario of:

Thanks very much.

shlomi-noach commented 7 years ago

@umutm Not yet. You will note we projected this, see https://speakerdeck.com/shlominoach/githubs-online-schema-migrations-for-mysql#33, but we're not actively working on this, and it's on our that-would-be-awesome-but-not-for-immediate-use roadmap.

umutm commented 7 years ago

@shlomi-noach Sorry to hear that :) and thanks so much for the quick update.

shlomi-noach commented 7 years ago

@umutm we're always open to contributions; if you are able to, or know someone who is able to, and has the resources to work on this, please let me know.

tomkrouper commented 7 years ago

With this feature, I'd love to also see a --where option that would allow you to move part of a table. I could see this being useful in a shard splitting type scenario. (The cleanup of the old data would need to be an external script I would think.)

umutm commented 7 years ago

@shlomi-noach Wish I was able to. Yet, I'll definitely share this challenge with other that I know are capable of :).

druud62 commented 7 years ago

I generally use a 'mysqldump --where' for this. Very convenient for initialising shards. So not 'online' but with replication locally paused.

tomkrouper commented 7 years ago

@druud62, mysqldump will certainly work. What I was thinking with gh-ost was that it would be replication lag aware and could throttle easily. In addition it would keep data up to date in both places until you were ready to cut-over.

druud62 commented 7 years ago

Hi Tom, yes, different use case. Good to have the choice.