skip to Main Content

I have 2x RDS single instances (MySQL) in the same region.

The goal is to copy (A) RDS to (B) RDS on nightly basis.

Is there any way to have this configuration auto sync between 2 RDS instances?

3

Answers


  1. I would suggest looking into DMS ongoing replication as it seems like a potential solution for your use case https://docs.aws.amazon.com/dms/latest/userguide/CHAP_BestPractices.html#CHAP_BestPractices.OnGoingReplication

    Login or Signup to reply.
  2. If your goal is to copy the contents of one Amazon RDS database such that another RDS database contains identical content, then it is easiest to use a snapshot:

    • Create an Amazon RDS Snapshot of the source database
    • Launch a new Amazon RDS database instance from the Snapshot
    • Delete the previous Amazon RDS database ‘B’ database, since it is now out-of-date

    The new database launched from the Snapshot will be identical to the source database (except for the instance DNS name).

    This operation can be done via AWS CLI commands.

    Login or Signup to reply.
  3. There are three approaches here.

    One is that if you want to "refresh" the database schema on nightly basis, you can use logical backup by using mysqldump/mydumper to export/import the schema and put the script in the scheduler (eg. cron).

    The second one you can use is snapshot backup that is provided by AWS, but you need to destroy the previous RDS instances, otherwise you will have many restored RDS from daily snapshot. Ideally, you can create some script that call AWS CLI to remove the previous RDS and restore the snapshot from daily backup. Put the script in the scheduler as well as first option.

    A third option is that you can create synchronization using Amazon DMS (Data Migration Service) to migrate the data in a real-time fashion.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search