Migrate PostgreSQL production database from AWS RDS to Azure PostgreSQL Flexible Server

D4Dilip 30 Reputation points

We have moved our web apps from AWS ec2 instances to azure web apps but our database is still running on AWS RDS

it’s a high traffic application and we cannot afford any downtime .

any suggestion how can we move our production PostgreSQL db to azure and keep both db in sync for some time so we can test and change app connections ?

Azure Database Migration service
Azure Database for PostgreSQL
{count} votes

Accepted answer
  1. hossein jalilian 4,615 Reputation points

    Thanks for posting your question in the Microsoft Q&A forum.

    You can follow a strategy that involves using Azure Database Migration Service for the initial data transfer and setting up continuous replication for synchronization:

    1. Set up an Azure Database for PostgreSQL instance that matches the configuration (version, storage, etc.) of your AWS RDS PostgreSQL instance.
    2. Ensure that your Azure PostgreSQL instance can be accessed from your AWS RDS instance.
    3. Go to the Azure portal and create an Azure Database Migration Service instance. within Azure DMS, create a new migration project. choose the databases and tables you want to migrate. start the initial data migration. Azure DMS will copy the schema and data from your AWS RDS to Azure PostgreSQL.
    4. Ensure logical replication is enabled on your AWS RDS instance. This might involve modifying the RDS parameter group to set rds.logical_replication to 1.
    5. On your AWS RDS PostgreSQL, create a publication for the tables you want to replicate.
    6. On your Azure Database for PostgreSQL, create a subscription to the publication on AWS RDS.

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

0 additional answers

Sort by: Most helpful