Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I copy one RDS to another RDS, of which it is a subset?

Assume RDS A has the following tables: table1, table2, table3;

And RDS B has the above tables and then more: table1, table2, table3, table4, table5.

Can I do a one-way copy from RDS A to RDS B?

That is, the data in the three tables (table1, table2, table3) in RDS A is copied to the corresponding three tables (table1, table2, table3) in RDS B simultaneously.

Moreover, can I modify the other two table i.e. table4 and table5 of RDS B, afterwards?

If this is possible, what will be the proper steps to achieve that?

like image 819
Andrew Avatar asked Oct 24 '25 23:10

Andrew


2 Answers

There are multiple ways to achieve this. Each approach has its tradeoffs interms of staleness of data, efficiency, cost & etc.

  • Using AWS Glue you can do timely data migrations in the form so of ETL. Few advantages of this approach is that you can select idividual tables for migration as well as do any transformation before data puts in to RDS B. If you are familiar with Python this will be a great choice since its serverless and less moving parts to manage.
  • Using AWS Data Migration Service. Suits both for timely migrations as well as continuous migrations.
  • Using AWS Data Pipeline. More suitable for very large databases and if you also have plans to do any computational heavy transformatins. For small databases this can be a overkill.
  • For timely migrations, you can create a Snapshot of RDS A and Restore it to RDS B or promote a Read Replica to RDS B.

More details in comparing AWS Glue and other Services refer the AWS FAQ.

Note: All of these approaches are one way trasfer so you can edit the tables on the RDS B.

like image 110
Ashan Avatar answered Oct 27 '25 13:10

Ashan


Yes! You can do it using Aws Database Migration Service. Please take a look at https://aws.amazon.com/dms/

You can use AWS console to create and map the source and destination or install the schema something from amazon to do it.

like image 37
Michel Borges Avatar answered Oct 27 '25 11:10

Michel Borges



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!