The cloud migration feature of ApsaraDB RDS for PostgreSQL allows you to migrate the data of a self-managed PostgreSQL database that is deployed on an Elastic Compute Service (ECS) instance to an ApsaraDB RDS for PostgreSQL instance. This topic describes how to configure an ECS security group on a self-managed PostgreSQL database before cloud migration to allow an RDS instance to access the self-managed PostgreSQL database.
Prerequisites
If you want to migrate the data of a self-managed PostgreSQL database that is deployed on an ECS instance to an RDS instance, you must perform the operations described in this topic. The ECS instance on which the self-managed PostgreSQL database is deployed must meet the following requirements:
The ECS instance and the RDS instance reside in the same virtual private cloud (VPC).
The self-managed PostgreSQL database runs as expected on the ECS instance.
Procedure
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select a region.
Find the ECS instance and click the instance ID.
On the Instance Details tab of the page that appears, click the name of the security group in the Basic Information section.
In the Access Rule section of the security group details page, click the Inbound tab. Then, click Add Rule to create a security group rule.
The following table describes the key parameters for you to create a rule.
Protocol Type
Port Range
Authorization Object
All ICMP (IPv4)
Source: -1/-1
Destination: -1/-1
The VPC CIDR Block of the RDS instance.
TCP
The port that is used to connect to the self-managed PostgreSQL database on the ECS instance. You can run the
netstat -a | grep PGSQL
command to query the port.
What to do next
Configure the postgresql.conf file of a self-managed PostgreSQL instance