I currently have my database on a MySQL server hosted in a dedicated EC2 instance and planning to migrate the DB to a RDS backed MySQL server.

Now the issue I have is with migrating the data from EC2 to RDS. The database is nearly 185 GB and at this point I do not worry about downtime or having the data in sync with production. All I need at the moment is to basically take a dump and import it to the RDS.

This is what I have tried so far,

  1. I took a mysql dump of the db that is running on EC2
  2. Accessed the RDS instance from the same EC2 instance
  3. Used the source command from MySQL to import the data dump to RDS

It takes almost one day for nearly 35Gb to be imported and never managed to completely import the DB. Appreciate if someone could tip me as to how I could do this.

  • 1
    It seems like your doing it the preferred way (or at least close to it) docs.aws.amazon.com/AmazonRDS/latest/UserGuide/… – Iain Dec 2 '16 at 13:43
  • @Hanginoninquietdesperation, that's right, only issue is that even after nearly two weeks I haven't succeeded on getting the db completely imported. So I am wondering if anyone has real experience on doing this. – avizzzy Dec 2 '16 at 14:01

AWS offers the Database Migration Service (DMS) for exactly this. DMS can migrate from on-premises, EC2 or RDS instances. It offers progress, statistics and more.

AWS blog: AWS Database Migration Service

  • Argh, exactly what I was looking for. Thanks a lot. – avizzzy Dec 2 '16 at 14:35
  • 3
    @Vinod Note: Read the DMS docs VERY carefully. There are particular oddities around migrating schemas - DMS won't take care of secondary indexes, default values, auto_increment, etc. for you - that you'll want to carefully read about and account for. – ceejayoz Dec 2 '16 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.