MYSQL Huge Data migration (5TB) from old server to new server

backupetlmigrationMySQL

We have an old MYSQL server contains huge data ~5TB and wanted to migrate to the new server in order to minimize the costs and get rid of very old hardware.

My one and only idea in my mind is using mysqldump for the migration but I’m pretty sure that it’s a poor and risk option with that huge data.

Then someone in my team came up with the idea for using ETL tools but we haven’t go into the deeper details and not really sure if this ETL way can literally help us.

Any idea are always welcomed

thanks

Best Answer

$ mysqldump -h source ... | mysql -h dest ...

I'm assuming:

  • You have the tow machines (source and dest) set up.
  • The two machines are "close" (not on opposite sides of the globe) so that network delays, etc would need to be considered
  • That script would be run on one machine -- either one.
  • If the versions are different, I cannot predict whether there will be some hiccups based on inconsistencies between versions. If it fails running on one server, try the other. If that fails come back with the error message(s).
  • It will take time because 5TB takes time to read and write.

If the versions are radically different, there could be major changes that we need to discuss.