【问题标题】:Migrate Aurora DB from one VPC to another将 Aurora 数据库从一个 VPC 迁移到另一个
【发布时间】:2017-09-21 06:15:37
【问题描述】:

我们在一个 VPC 中有 4 个独立的非多可用区 aurora 数据库实例,我们希望将它们移动到另一个 VPC 中的 aurora 实例。

据我了解,迁移数据库实例有 3 种方法:

1) 修改数据库实例的子网组以更改 VPC。

However this is not supported for Aurora instances yet.

2) 创建一个只读副本,当从属赶上时,停止从属并对其进行快照以在不同的 VPC 中创建一个数据库实例并使用外部从属然后再次恢复复制。

I have a few question around this second method. As Aurora is using some different
replication method, the result of show slave status; command is empty.
Also by default the binlog_format is OFF so not sure if I have to modify it and
then restart the instance to take note of the binlog etc.

Have anyone done this before and can guide me? I don't want to restart the instance
to later find out that it is not working, as it is a very critical DB and I want to 
minimize the downtime.

3) 使用 Amazon DMS 服务,但是我在文档 here 中找不到 Aurora 的源数据库详细信息。

I need to find out what all permissions to give to the replication user
I'll create for this. This command in aurora is not working,
GRANT REPLICATION CLIENT, REPLICATION SLAVE ON . TO 'replication_user'@'%'
IDENTIFIED BY 'aaaaaa';

任何帮助将不胜感激。

【问题讨论】:

  • 在这篇文章中你还有什么想要的吗?

标签: amazon-web-services amazon-rds amazon-aurora


【解决方案1】:

您应该能够从快照中恢复。我使用这种方法跨 VPC 迁移 aurora。我希望我们可以在不同的 VPC 中创建一个只读副本,但目前我认为您只能在不同的区域中创建一个。

我发现了一个奇怪的副作用,但我不确定为什么会发生这种情况,那就是在原始集群 multi-az 中是 2 Zones 而在恢复的集群中 multi-az No。这并没有影响我能看到的东西。我还有一个带有writerreader 的集群

【讨论】:

    【解决方案2】:

    创建快照并将其还原到新集群。执行此操作时,请使用为第二个 VPC 创建的新子网组。这是实现这一目标的最佳方式。就像您所说的那样,您不能更改现有集群的子网组。

    在您的方法 #2 中,您提到必须创建一个从属服务器然后拍摄快照。这不是必需的。集群中的所有实例都连接到同一个共享卷,因此您可以直接从单实例集群创建快照。请注意,快照是集群级别的操作,而不是 Aurora 中的实例级别操作。

    【讨论】:

      【解决方案3】:

      来自https://aws.amazon.com/premiumsupport/knowledge-center/rds-vpc-aurora-cluster/

      它表明

      在不同的 VPC 中创建克隆

      如果您在 Aurora 集群中克隆数据库,则可以更改克隆的 VPC。 > 但是,VPC 中的子网必须映射到同一组可用区。有关更多信息,请参阅克隆 Aurora 数据库集群中的数据库。

      虽然无法通过控制台看到中断复制的方法,但它确实有效。我们将其用作比快照和还原更快的迁移方式。停止原来的 master 会破坏复制,但你可以做得更干净

      【讨论】:

        猜你喜欢
        • 2020-03-16
        • 1970-01-01
        • 2023-01-11
        • 1970-01-01
        • 2011-08-07
        • 2015-11-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多