使用一个 RDS 的快照将数据库恢复到另一个现有 RDS
我有 2 个正在使用的 RDS:
- Production RDS
- Preprod RDS
我正在寻找一种使用 Production RDS 快照的方法,并希望将数据恢复到现有的 Preprod RDS 中。
有什么办法可以做到这一点吗?
I have 2 RDS which are being used:
- Production RDS
- Preprod RDS
I am looking for a way to use the snapshot of the Production RDS and want to restore the data in to the existing Preprod RDS.
Is there any way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以从快照启动新数据库。因此,您可以:
然后 Preprod 数据库将包含快照的精确副本。
不可能将 Amazon RDS 快照恢复到现有数据库中。如果您希望将数据加载到现有数据库中,则需要使用自己的数据库工具来执行此操作 - AWS 不提供为您执行此操作的功能。
You can launch a new database from a snapshot. So, you could:
The Preprod database would then contain an exact copy of the Snapshot.
It is not possible to restore an Amazon RDS Snapshot into an existing database. If you wish to load the data into an existing database, you would need to do this with your own database tools -- AWS does not offer a function to do this for you.
将 Preprod RDS 实例与生产同步的一种潜在方法是使用 AWS DMS。使用 DMS,您可以将数据同步到现有的 Preprod 实例(无需删除该实例并创建新实例)。 DMS 的另一个潜在好处是能够在同步期间从 Preprod 环境中清除任何敏感数据。 此处描述了为此实施 DMS 的方法。
A potential approach for syncing a Preprod RDS instance with production is to use AWS DMS. Using DMS, you could sync the data into the existing Preprod instance (without deleting that instance and creating a new one). Another potential benefit of DMS is the ability to scrub any sensitive data from the Preprod environment during syncing. An approach for implementing DMS for this is described here.