What is the best way to migrate 200G database

Hello,

I’ve mysql 5.6 running on production server. And now i’ve a new VM with mysql version 8.0, I need to migrate 200G database from the old vm to the new vm with version 8.0…I’ve tried mysqldump and mysql restore but it takes about 24 hours to restore the 200G database.

So the question is:

  1. what is the best option to migrate the 200G database from the old vm to the new vm?
  2. Is there any option to increase the mysqldump restore? NOTE: the vm have many resources that not usable while restore process running.

Hello @elkhedewy,
You need to look at GitHub - mydumper/mydumper: Official MyDumper Project
mysqldump is single-threaded, which is why you are not seeing many resources used. mydumper is multi-threaded for both dump and restore (myloader). You will see much faster export times using mydumper.

1 Like

Hello,

Is that possible to restore sql file created using mysqldump and then use myloader to restore the sql file?
If yes, How to do that?

Regards,

@elkhedewy No, the result from mysqldump is not compatible with myloader. mysqldump outputs everything to a single file, where mydumper outputs to separate files which myloader expects.