by Andre Budiman Kramadibrata, Solution Architect Alibaba Cloud Indonesia
Migrating from AWS RDS PostgreSQL to Alibaba Cloud PolarDB presents a strategic opportunity for businesses to enhance database performance and scalability. PostgreSQL, known for its reliability and advanced features, is widely utilized in various applications. While AWS RDS simplifies PostgreSQL deployment by automating many administrative tasks, the need for more robust and cost-effective solutions is driving businesses to consider Alibaba PolarDB as a compelling alternative.
Alibaba Cloud PolarDB is a next-generation relational database that fully supports PostgreSQL, making migration straightforward. PolarDB's architecture decouples computing from storage, enabling automatic scaling, high performance, and vast storage capabilities. This design allows data sharing across all compute nodes, ensuring seamless scaling and rapid disaster recovery, which are critical for maintaining business continuity.
Migrating to PolarDB not only provides enhanced scalability and reliability but also integrates with the Alibaba Cloud ecosystem. This integration unlocks additional cost savings and efficiencies, making PolarDB a compelling choice for businesses looking to optimize their database operations while leveraging the full suite of Alibaba Cloud services.
Assume that both AWS and Alibaba VPCs are already configured with a Site-to-Site VPN (VPN S2S).
The migration process involves setting up a secure connection between AWS and Alibaba Cloud, using Database Gateway to connect AWS RDS PostgreSQL to PolarDB, and Data Transmission Service (DTS) for replication.
Before migrating, ensure that AWS RDS PostgreSQL and Alibaba PolarDB are properly configured. This involves enabling logical replication in AWS and setting up a Database Gateway on Alibaba Cloud. Refer to the official documentation for detailed instructions.
And below are the preparation steps:
1. Datasource: I'm using the Northwind sample database, which can be found at Northwind on GitHub.
2. AWS RDS PostgreSQL: For self-managed PostgreSQL databases, the wal_level
parameter must be set to logical
to migrate incremental data.
In AWS RDS PostgreSQL or Aurora PostgreSQL, set the rds.logical_replication
parameter in your DB cluster parameter group to 1. This static parameter change requires a reboot of the DB instance to take effect. Please also refer to User Guide for Aurora.
3. Alibaba Cloud Database Gateway: Connect your Database Gateway to AWS RDS PostgreSQL, for details about create Database gateway, you can refer to Database Gateway Documentation.
4. Alibaba Cloud PolarDB: Create the polarDB cluster as a target, for details you can refer to PolarDB for PostgreSQL Documentation.
After setting up AWS RDS PostgreSQL, Database Gateway, and PolarDB as the target, the next step is to configure DTS for replication.
Fill in the source and target database information. For the source, select Database Gateway as the access method. For the target, select the previously created PolarDB instance. DTS will then perform a connectivity test for both the source and target databases.
Choose the objects you want to replicate. In this use case, select all tables from the source database.
DTS will perform pre-checks before proceeding with the replication. If all checks pass, you can continue to purchase a DTS instance.
Complete the purchase process for the DTS instance.
Monitor the DTS task to ensure it runs smoothly and review the replication results to confirm that the data has been accurately replicated. Additionally, perform several DML operations on the source database and verify that they are correctly replicated on the target database.
Migrating and replicating databases from AWS RDS PostgreSQL or AWS Aurora PostgreSQL to Alibaba Cloud PolarDB can be efficiently achieved using Data Transmission Service (DTS). This process allows you to maintain data consistency while leveraging the advanced features of PolarDB.
A key difference to note is that while the wal_level
parameter is typically used in self-managed PostgreSQL for enabling logical replication, it is not available in AWS RDS or Aurora. Instead, you need to set the rds.logical_replication
parameter to 1 in your DB cluster parameter group. This configuration change requires a reboot of the DB instance to take effect.
By carefully following the steps outlined, you can ensure a smooth migration and replication process, enabling you to take full advantage of Alibaba Cloud's robust and scalable database solutions. We encourage you to explore the powerful capabilities of Alibaba PolarDB and start your migration journey today. If you need further guidance, Alibaba Cloud's comprehensive documentation and support are readily available to assist you.
100 posts | 17 followers
FollowAlibaba Cloud Community - August 30, 2024
Alibaba Clouder - April 9, 2018
Alibaba Clouder - July 5, 2019
Alibaba Clouder - February 7, 2018
Alibaba Clouder - February 2, 2021
Alibaba Clouder - April 10, 2018
100 posts | 17 followers
FollowAlibaba Cloud PolarDB for PostgreSQL is an in-house relational database service 100% compatible with PostgreSQL and highly compatible with the Oracle syntax.
Learn MoreMigrating to fully managed cloud databases brings a host of benefits including scalability, reliability, and cost efficiency.
Learn MoreMigrate your legacy Oracle databases to Alibaba Cloud to save on long-term costs and take advantage of improved scalability, reliability, robust security, high performance, and cloud-native features.
Learn MoreAlibaba Cloud PolarDB for Xscale (PolarDB-X) is a cloud-native high-performance distributed database service independently developed by Alibaba Cloud.
Learn MoreMore Posts by Alibaba Cloud Indonesia