简体   繁体   English

Google 云数据库迁移服务 - 是否有人使用 DMS 使用 VPC 对等将 GCP postgres 实例从一个服务项目迁移到另一个服务项目?

[英]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.我已经使用 IP 白名单连接类型(外部 IP)成功完成了这项工作,将一个 postgres 实例从一个服务项目迁移到另一个服务项目,但是当我尝试使用 VPC 对等互连时,我有一个错误提示它无法连接到源D B。 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.如果我尝试使用 VPC 对等互连,它会起作用,源和目标位于同一服务项目中的同一 VPC.network 中,但如果它不同,则不起作用。network 和服务项目。 It also does not work if it is same service project but different.network vpc.如果它是相同的服务项目但不同的网络 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.在源服务项目中,在一个 VPC 中创建 SourceDB 并分配一个 GCP 管理的私有 IP 并启用私有服务连接。
  2. Create the connection profile and selected "PostgresSQL" as Database engine and use the private IP in hostname/IP:port创建连接配置文件并选择“PostgresSQL”作为数据库引擎,并在主机名/IP:端口中使用私有 IP
  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.在迁移作业中,在目标部分,选择A.NETWORK路径时,我选择了“私有IP”并选择了目标VPC的VPC,并且我想进入select A不同的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".底部有一条注释“如果您计划通过 VPC 对等连接到迁移源,请选择它所在的 VPC”。 Does that mean you can only do VPC peering on the same VPC?这是否意味着您只能在同一个 VPC 上进行 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.同样在定义连接方法中,你的来源是 select VPC.network“它说 select 你的来源的网络”所以我别无选择将目标数据库放置在何处进行 VPC 对等,我必须使用与我相同的 VPC在中创建源。

Does this mean the only way to migrate to different service projects or different vpc.network is using external IP?这是否意味着迁移到不同服务项目或不同 vpc.network 的唯一方法是使用外部 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.共享 VPC 应该允许使用 DMS 在 2 个不同的 GCP 项目之间迁移,只要你有一个共同的共享 VPC.network,就像 Goli 共享的那样。

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.例如 - 将项目 A 作为服务项目,将项目 B 作为同一共享 VPC 宿主项目的服务 - 共享 VPC.network 1 中项目 A 中的现有数据库应该能够迁移到项目 B,只要它是还有一个服务项目,并且 VPC.network 1 与之共享。

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).请注意,在另一种情况下,项目A可以是宿主项目,B可以是服务项目,其中B共享(并有权访问)源DB所在的共享VPC.network 1(在项目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 .共享 vpc 跨项目迁移所需的 DMS 迁移作业连接方法是“VPC peering”,因此您需要按照本文档中的说明进行操作。

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.拥有源数据库后,根据 DMS 文档( 此处)为其设置所有必要的配置,包括共享 VPC 的所有其他相关初始设置(例如,设置相关服务项目并与共享相关 VPC.network)它)以及按照本文档完成共享 VPC.network 的私有服务访问(和 VPC 对等连接)设置,您应该能够在目标数据库服务项目中设置新的 DMS 迁移作业,并选择成功共享 VPC.network。

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.如果迁移作业配置结束时的测试因任何原因失败,请尝试验证您是否已设法执行文档中提到的所有必要步骤。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Postgres 的 GCP 数据库迁移服务 - 如何迁移名称不是“postgres”的数据库? - GCP Database migration service for Postgres - how to migrate a database with a name other than "postgres"? Amazon DMS(数据库迁移服务)端点兼容性 - Amazon DMS (Database Migration Service) endpoints compatibility 无法找出 Terraform 配置等效于为 GCP 的 VPC 对等和.networking 服务创建地址 - Can't figure out the Terraform configuration equivalent for creating address for VPC Peering and networking service for GCP 需要将 Spanner 数据库从一个 GCP 项目迁移到另一个 - Need to migrate Spanner db from one GCP Project to another GCP:如果我从同一 VPC 中的另一项服务向公开可用的 API 发出 HTTP 请求,该请求会离开 VPC 吗? - GCP: If I make an HTTP request to a publicly available API from another service within the same VPC will the request leave the VPC? 我是否需要 Provate VPC 以允许从另一个 GCP 项目访问云 SQL? - Do I need a Provate VPC to Allow Cloud SQL Access from another GCP project? 使用 GCP 的数据库迁移服务迁移过程中出错 MySQL - Error during migration process using GCP's Database Migration Service for MySQL AWS DMS 迁移 - 这种情况可行吗? (从非加密的 MYSQL/POSTGRES 迁移到加密的 MYSQL/POSTGRES)? - AWS DMS Migration - Will this scenario work? (Migrate from Non-Encrypted MYSQL/POSTGRES to an Encrypted MYSQL/POSTGRES)? GCP 云任务是按项目或服务定义的吗? - GCP Cloud Tasks are defined per project or service? 无法使用来自另一个项目的图像部署 Cloud Run 服务 - Unable to deploy a Cloud Run Service using an image from another project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM