Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Most efficient way to clone an AWS RDS database?

I have 2 MySQL databases running on a server called X and Y, which both have identical content. A series of updates run throughout the day, which changes the content of X. At the end of the day, a process runs that compares the content of X with the content of Y (for various tables) in order to discover new rows, updated row data etc. Once the updates have been processed, mysqldump is used to dump X and then Y is overwritten with the dump. Both X and Y are now the same again, and the whole process repeats.

I'm investigating migration of these databases to Amazon RDS. What's the most efficient way to accomplish the process outlined above?

I understand that I can take a snapshot of a DB and restore it, but I think this is at the instance level only? That would mean I have to run 2 instances, which seems unnecessary. I don't have a problem running both databases on the same instance (I don't want to pay for more than one instance unnecessarily).

Do I just do what I'm doing now i.e. mysqldump X and restore it to Y, or is there some other method/shortcut that RDS provides?

like image 650
RTF Avatar asked Oct 18 '17 17:10

RTF


1 Answers

Since the title is concerned AWS instance migration the best way is with my case (can be vary to others case)

  1. Goto -> https://console.aws.amazon.com/rds
  2. Select your DB Instance
  3. Actions -> Take Snapshot
  4. Goto -> https://console.aws.amazon.com/rds
  5. Snapshots from left pane
  6. select your snapshot just created
  7. Action -> Restore Snapshot

After above steps you will be redirected to RDS instance creation page fill out required fields as per requirements and you are done with migration :D

like image 144
Mansur Ul Hasan Avatar answered Sep 21 '22 19:09

Mansur Ul Hasan