Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Quick way to clone a production RDS instance

I have an RDS Instance which is currently in production and all the apps are using the same RDS instance. Now when I want to make separate RDS instances for each app, I tried using RDS feature called restore to point in time but it took nearly one hour to create a new RDS instance.

Can someone suggest me some good way to perform it so that i can create an exact replica of running rds instance.

like image 915
pradeepchhetri Avatar asked Nov 29 '12 10:11

pradeepchhetri


People also ask

How does Amazon RDS Multi-AZ replicate a database?

How it works. In an Amazon RDS Multi-AZ deployment, Amazon RDS automatically creates a primary database (DB) instance and synchronously replicates the data to an instance in a different AZ. When it detects a failure, Amazon RDS automatically fails over to a standby instance without manual intervention.


1 Answers

You should really consider using Aurora Mysql as opposed to RDS Mysql fr the clone use case. You can spin up a clone in a matter of minutes, and it does not even duplicate your database pages unless you mutate them (copy on write protocol).

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Aurora.Managing.Clone.html

Restoring snapshots are definitely not going to be as fast as cloning as they incur data copying over head. If you need to continue using RDS, then yes, having a hot replica stand-by is the best bet, although I'm not entirely convinced that that's what you're looking for.

like image 71
The-Big-K Avatar answered Oct 03 '22 15:10

The-Big-K