Best Approach for Rollback Aurora Postgres cluster

1

Hi experts,

Currently, we are using the point-in-time recovery for Aurora Postgres. However, this will create a new cluster which our service is not connected to. We are currently manually dumping all the data from the newly created cluster to the existing one. This feels very clunky. We are wondering if there are some alternative solution. Mainly, we want to limit the dev from directly writing (manually dumping in this case) into the database and wondering if there are some provided option.

Thank you so much

asked a year ago235 views
1 Answer
0

Hello,

If I understand it correctly, you are trying to copy data from one cluster to another and want to limit your dev team from directly writing to the main cluster.

In this case, you can try one of the below suggested option to write data from one cluster to another.

  1. Using PostgreSQL logical replication with Aurora:

By using PostgreSQL's logical replication feature with your Aurora PostgreSQL DB cluster, you can replicate and synchronize individual tables rather than the entire database instance. Logical replication uses a publish and subscribe model to replicate changes from a source to one or more recipients.

[+] Using PostgreSQL logical replication with Aurora - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Replication.Logical.html

  1. Logical replication using Aurora PostgreSQL and AWS Database Migration Service:

You can use the AWS Database Migration Service (AWS DMS) to replicate a database or a portion of a database. Use AWS DMS to migrate your data from an Aurora PostgreSQL database to another database.

[+] Using PostgreSQL logical replication with Aurora - Example: Logical replication using Aurora PostgreSQL and AWS Database Migration Service - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Replication.Logical.html#AuroraPostgreSQL.Replication.Logical.DMS-Example

[+] Using a PostgreSQL database as an AWS DMS source - https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Source.PostgreSQL.html

[+] Using a PostgreSQL database as a target for AWS Database Migration Service - https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.PostgreSQL.html

There is one more option but it is limited for testing purpose i.e. Cloning a volume for an Amazon Aurora DB cluster

By using Aurora cloning, you can create a new cluster that initially shares the same data pages as the original, but is a separate and independent volume. Aurora cloning is especially useful for quickly setting up test environments using your production data, without risking data corruption. You can use clones for many types of applications, such as the following:

  • Experiment with potential changes (schema changes and parameter group changes, for example) to assess all impacts.
    
  • Run workload-intensive operations, such as exporting data or running analytical queries on the clone.
    
  • Create a copy of your production DB cluster for development, testing, or other purposes.
    

[+] Cloning a volume for an Amazon Aurora DB cluster - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Clone.html

AWS
answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions