Migrate your AWS RDS Postgres database to the Hybrid Control Plane

AWS RDS database clusters are CSP-managed databases.

To migrate data from an AWS RDS Postgres database to an HM-managed database:

  1. Deploy the Beacon Agent to the AWS RDS database

  2. Prepare the AWS RDS source databases

  3. Create a destination database cluster managed by the Hybrid Control Plane

  4. Import the schema to the destination database

  5. Deploy the EDB DMS Reader to an auxiliary machine

  6. Configure the EDB DMS Reader, so it can access source data

  7. Create a migration

  8. Complete the migration

  9. Apply constraints

  10. Verify the migration

Deploy the Beacon Agent to the AWS RDS database

Deploying the Beacon agent on your database server allows the Hybrid Control Plane to generate observability and monitoring data. While this step isn't strictly necessary for migrating your databases, it offers the significant benefit of providing a single, unified view of all your database instances, including those external to the Hybrid Control Plane.

For configuration instructions, see Monitoring AWS RDS deployments on AWS. Access the Estate to see an overview of the RDS instance.

Decide which database or databases you want to migrate to the Hybrid Control Plane.

Prepare the AWS RDS source databases

Before migrating data from an AWS RDS database using the EDB Data Migration Service, you must prepare the source database to allow the EDB DMS Reader to connect to the source and perfom replication.

See Preparing AWS RDS source databases for more information on how to enable logical replication and create a user for migration.

Create a destination database cluster managed by the Hybrid Control Plane

You can either use an existing HM-managed cluster or create a new cluster to use it as destination for the migration.

For more information, see Creating a database cluster.

Import the schema to the destination database

For migrations from RDS databases, we recommend using Migration Toolkit in offline mode for the export of schemas and handling constraints.

See Preparing schema for instructions on how to export your source schema, handle constraints and import the schema to your destination database.

Deploy the EDB DMS Reader to an auxiliary machine

Deploy the EDB DMS Reader on a machine that has access to your RDS database. We will call this the auxiliary machine.

Note

One way to ensure your auxiliary machine has access to the RDS instance is to add an inbound rule to the RDS instance. On the VPC security group assigned to the RDS instance, add an Inbound rule with the Type PostgreSQL and the IP address of the auxiliary machine.

See Installing EDB Data Migration Service Reader for more information.

Configure and start the EDB DMS Reader

To configure and run the EDB DMS Reader on your auxiliary machine, you need to obtain HM migration credentials, and then provide the EDB DMS Reader with access to this credentials and other settings.

This will allow the EDB DMS Reader to have access the source database, and connect it to the HM migration service.

See Configuring and running the EDB DMS Reader for more information.

Note

For RDS databases, ensure the DBZ_DATABASES_0__HOSTNAME value points to the RDS endpoint you can find under the Connectivity & security in the AWS Console. A redacted example is foo_database.cb7asw1xxxxx.eu-west-0.rds.amazonaws.com.

Create a migration

After you have configured the EDB DMS Reader to establish connections to the HM, create a new migration in the HM Portal. A migration establishes a sync between the source database and a destination database with the help of EDB DMS.

See Creating migration for instructions.

Complete the migration

If you selected the Snapshot option, you can skip this step, as the DMS will automatically mark the migration as completed after it finishes copying the entire snapshot to the destination.

If you selected the Snapshot + Streaming option during Migration creation, the EDB DMS Reader will continue to stream any data updates performed on the source database to the target database until you mark the migration as completed.

See Stop the streaming process for instructions.

Apply constraints

At the beginning of your data migration journey with EDB Data Migration Service (EDB DMS), you prepared and imported the schema of your source database. Now, connect to the target database and re-apply the constraints that were excluded from the schema and data migration.

Verify migration

Compare the source and target databases to verify that the all data was migrated.

You can use LiveCompare.


Could this page be better? Report a problem or suggest an addition!