Accessing the Public Cloud Through a VPC (Same Region and Different VPCs)
Figure 1 shows how to use DRS to migrate data from an ECS database to a database in the same region but different VPCs on the public cloud.
You can use an ECS database as the source. If the source and destination databases are in two different VPCs in the same region, create a VPC peering connection between the two VPCs. Ensure that the network ACL and security group associated with the source database allow inbound traffic from the DRS replication instance. In addition, add the replication instance IP address to the whitelist of the source database, and ensure that the network ACL and security group associated with the DRS replication instance allow outbound traffic. If the source and destination databases are not in the same VPC, the CIDR blocks of the source and destination databases must be different.
DRS automatically establishes a route through a single IP address when you test the network connectivity.
Figure 2 shows the process.
Network Configurations
- Create a DRS instance and obtain the private IP address of the DRS instance.
After the DRS replication instance is created, the private IP address of the replication instance is displayed.
- Configure inbound rules for the network ACL and security group associated with the source database.
Security group: Add an inbound rule to allow traffic from the private IP address of the DRS replication instance to the database listening port.
Network ACL: By default, a VPC does not have a network ACL. If you have a network ACL, add an inbound rule to allow traffic from the private IP address and random port of the DRS replication instance to the IP address and listening port of the source database.
- Configure the IP address whitelist for the ECS database.
Add the private IP address of the DRS instance to the whitelist of the ECS database. The method for configuring the whitelist depends on the cloud database type. For details, see the official documents of the corresponding database.
- Configure outbound rules for the network ACL and security group associated with the replication instance.
By default, a VPC does not have a network ACL, and the default security group rules allow all outbound traffic. The replication instance and destination RDS database in the same security group can communicate with each other by default, so you do not need to configure a network ACL.
If you have configured a network ACL or security group, log in to the VPC management console and check the settings:
Security group: Ensure that the outbound traffic from the DRS private network IP address to the IP address and listening port of the source database is allowed.
Network ACL: Ensure that the outbound traffic from the DRS private network IP address and random port to the IP address and listening port of the source database is allowed.
- Test the connection.
Log in to the DRS console. Locate the DRS task and click Edit in the Operation column. On the displayed Configure Source and Destination Databases page, enter the IP address, port, username, and password of the source database for the connection test. DRS will automatically establish a VPC peering connection.
- Add routes for the VPC peering connection.
After the VPC peering connection is established, you need to add routes for the peer subnets in both the local and peer VPCs. For details, see Virtual Private Cloud User Guide.
- Test the connection again.
The connection test is successful.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot