MySQL dump large database to remote server

MySQL dump large database to remote server

I’m currently in the process of migrating one of my sites from Linode to Digital Ocean. The database for this site is quite large, approx ~25G and mysqldump kept crashing trying to xfer that much data. It’s not that it’s impossible, it’s just that you need to tell it to let some slack out so you have some room to move.

I will also be setting up a dual head master/slave replication so that my Digital Ocean servers will stay up-to-date with Linode until I have finished configuring the rest of the network. And, once I have flicked the DNS switch to point to Digital Ocean, Linode will continue to receive new data just in case it all fails and I need to switch back. It’s a safe method so that there’s no data loss for my users. But, I will write another post about all of that.

Anyway, this is the command I ended up with



About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!