amazon-web-services - 将数据从与一个 AWS 账户关联的实时 RDS 数据库实例迁移到与另一个 AWS 账户关联的新 RDS 数据库实例
问题描述
我正在使用托管在 AWS 上的 Sprint 启动应用程序。应用程序数据存储在 AWS RDS 中。现在我已经设置了另一个 AWS 账户,我想从与当前 AWS 账户关联的 RDS 实例中迁移数据。
在这方面,经过这里的几个帖子后,似乎,做同样的步骤如下:
1. Create a snapshot of the database in the RDS database instance associated with the current AWS account.
2. Share the snapshot with the new AWS account.
3. Import the data from this snapshot to the RDS instance associated with the new AWS account.
这种方法的一个问题是:我必须使应用程序对最终用户不可用,直到所有步骤都完成并且具有托管在新 AWS 账户中的数据库的应用程序开始运行,否则总会有一些增量剩余被迁移。
但是,我想将数据从现有实例迁移到新实例而不使应用程序对最终用户不可用,我没有找到任何合适的方法来实现相同的目标。
有人可以帮忙吗?谢谢。
解决方案
创建只读副本
使用停止 MySQL.rds_stop_replication 在只读副本中停止从属
捕获 mysql_binary_log_file_name、mysql_binary_log_file_location
停止实例
拍摄快照
在另一个 AWS 账户中恢复
在 master 中创建复制用户名
在新创建的 RDS 中使用所需值运行以下命令
调用 mysql.rds_set_external_master ( host_name , host_port , replication_user_name , replication_user_password , mysql_binary_log_file_name , mysql_binary_log_file_location
);
移动连接和计划正确切换
推荐阅读
- django - jqgrid 在 Django 模板中的使用:“item-jqgrid-entity1”的反向
- jenkins - 从工件中选择工件以在 Jenkins 中部署管道作业
- elasticsearch - 新记录未出现在弹性搜索结果中
- c# - C# nuspec 中的多平台本机库
- python - Python内存消耗导致网络套接字连接崩溃
- windows - Ansible win_shell ad-hoc 语法
- scala - 如何迭代 Kafka Streams 表的键值
- ffmpeg - FFmpeg如何在过滤器复合体上添加drawtext以及水印和调色板
- azure-cosmosdb - 返回一个标量对象
- python - Pandas 和 Numpy 程序比相同功能的循环版本慢,如何加快速度?