The one-click cloud migration feature of ApsaraDB RDS for PostgreSQL migrates a self-managed PostgreSQL database from an Elastic Compute Service (ECS) instance to an RDS PostgreSQL instance. Before migration, add two inbound rules to the ECS security group so that the RDS instance can reach the self-managed database.
Prerequisites
Before you begin, ensure that you have:
An ECS instance and an ApsaraDB RDS for PostgreSQL instance in the same Virtual Private Cloud (VPC)
A PostgreSQL database deployed on the ECS instance
Add inbound security group rules
Log on to the ECS console.
In the left navigation pane, choose Instances & Images > Instances.
In the top navigation bar, select the region where your ECS instance resides.
Find the target ECS instance and click its instance ID.
On the Security Groups tab, click the ID of the security group.
On the Security Group Details page, go to the Rules section. On the Inbound tab, click Add Rule and add the following two rules.
Protocol Destination (This Instance) Source All ICMP No configuration required. The default is All( -1/-1).VPC CIDR Block of the ApsaraDB RDS for PostgreSQL instance. See Find the VPC CIDR block below. Custom TCP Port of the self-managed PostgreSQL database. Run
netstat -a | grep PGSQLon the ECS instance to find the port.
