简体   繁体   中英

Google Cloud Database Migration Service - Has anyone used DMS to migrate GCP postgres instance from one service project to another using VPC Peering?

I have done this successfully using IP allowlist connectivity type (external IP), migrated one postgres instance from one service project to another service project, but when I do try to do it using VPC peering I have an error that says it cannot connect to source DB. VPC Peering works if I try it the source and destination is in the same VPC.network within the same service project but does not work if it is different.network and service project. It also does not work if it is same service project but different.network vpc.

I have tried the following:

  1. Within the source service project, created the SourceDB in one VPC and allocated a GCP managed private IP and enabled connection for private services.
  2. Create the connection profile and selected "PostgresSQL" as Database engine and use the private IP in hostname/IP:port
  3. In Migration Job, in destination part, when choosing a.network path, I selected "private ip" and selected the VPC of the target VPC and i want to select a different VPC.

There is a note in the bottom where it is "if you plan on connecting to the migration source via VPC peering choose the VPC where it resides". Does that mean you can only do VPC peering on the same VPC?

  1. Also in Define connectivity method, where you select VPC.network of your source "it says select the.network of your source" So i have no choice to where i place the target DB for VPC peering, I must use the same VPC i had created the source in.

Does this mean the only way to migrate to different service projects or different vpc.network is using external IP?

在此处输入图像描述

Shared VPC should allow migration between 2 different GCP projects using DMS, as long as you have a common shared VPC.network, as Goli shared.

For example - Having project A as service project, and project B as service of the same shared VPC host project - an existing DB in project A in a shared VPC.network 1, should be able to migrate to project B as long as it is a service project as well and the VPC.network 1 is shared with it.

Please note that in another scenario project A can be a host project, and B can be a service project, where B is shared with (and has access to) the shared VPC.network 1 where the source DB is located (in project A).

The DMS migration job connectivity method required for shared vpc cross-project migration would be 'VPC peering', therefore you will need to follow instructions in this documentation .

Once you have a source Database, have set up all the necessary configurations for it according to the DMS documentation ( here ) including all the other relevant initial settings for shared VPC (eg setting up the relevant service project and sharing the relevant VPC.network with it) as well as finished setting up the private services access (and the VPC peering connection) for the shared VPC.network following this documentation , you should be able to set up a new DMS migration job in the destination database service project, and choose that shared VPC.network successfully.

If the test at the end of configuration in the migration job is failing for any reason, try to verify if you've managed to execute all the necessary steps mentioned in the documentation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM