Score:1

Is there a simple way to synch up two AWS RDS Mysql Instances?

th flag

I have two databases. One for development and one for production. The production database has been used for while now and we need to start development of new features, so we obviously want to try out everything in the development DB. These are two RDS MySQL instances which are configured exactly the same.

My question is: is there a simple way where I can make the development DB have the same information as the production DB? So that I can start developing using realistic info?

I obviously can dump and upload, but I thought there might be a more elegant way

Score:1
id flag
MLu

Check out AWS Database Migration Service (DMS) - that's what you need. It can run continuously, replicating Prod to Dev. Or you can run it manually from time to time, but be aware that if you use the Dev DB the subsequent sync may fail due to conflicts.

Another possible option is to create a Read Replica for your Prod database, let it sync, and then disconnect and promote to be the Dev DB.

Hope that helps :)

th flag
The second option is what I usually do. But since it meand deleteing the currnet DB and then doing the recreation, it's kind of a pain. Did not know about the first, though. Will try it out.
Score:0
gp flag
Tim

MLu's answer is great to solve the problem the way you've asked. DMS is fairly easy to get working, and works well. It can do on-off or ongoing migrations. Read replicas are also a good solution. However, I don't know if what you're planning is a good idea.

Generally putting production data into development environments is a Very Bad Idea. It means your production data is in an environment which usually isn't protected as well as production, and many more people such as developers have access to production data. I suggest that you not do this unless your data is effectively public or you can put other controls in place to ensure data security.

A better option is to write custom code that pulls from the production database, inserts random data, masks fields, and such. There's some suggestions here. There might be a product or service that makes this easier, searching the internet might find something to make it easier.

th flag
Thank you, but the environment shared by the development data and production data is effectively the same. So same security measures and the our team is just me and one other developer and he is wrinting front end so he will get access to the data eventually. Thank yo for your suggestions though.
Tim avatar
gp flag
Tim
Ok. I'll leave this answer here because it is relevant to many people considering doing this.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.