我最近在 Atlas 上托管的 MongoDB 实例与托管使用数据库的应用程序的 AWS 实例之间有很多奇怪的用法。这就是为什么我考虑在我自己的 AWS 服务器上托管 MongoDB。
从那时起,我一直试图寻找有关如何将我的数据从 Atlas 迁移到我自己的设置的教程,但除了从其他东西迁移到 Atlas 的教程之外,没有找到任何其他东西(这不是我想要的)
我只是没有看到一些标准的方法,对低级 MongoDB 的东西相当缺乏经验,还是他们积极地保持沉默?
我非常感谢您的帮助,因为我正在主持一个业余项目,而大部分成本来自在我的 AWS 实例和 Atlas 之间移动数据的网络成本。
最佳答案
I've recently had a lot of weird usage between my MongoDB instance hosted on Atlas and my AWS instance hosting the application that uses the db. That's why i thought about hosting MongoDB on my own AWS server.
除了每小时的托管费用外,MongoDB Atlas还通过云提供商对集群节点之间的数据传输流量收费。数据传输包括:副本集监控、心跳、自动化和备份。
另见:
i'm hosting a hobby project and the most costs are created from network costs for moving data between my AWS instance and Atlas
根据您的用例要求,您可以尝试 MongoDB Atlas Free Tier反而。请注意,这一层的规范较低,有些 limitations与付费等级相比。
要回答您的问题,您可以使用 mongodump 从 MongoDB Atlas 导出数据.另见:
或者,如果您启用了连续备份功能,则可以使用 MongoDB Atlas 的恢复功能生成数据库副本供您自己使用,包括为您自己管理的新环境播种。
关于database - 从 MongoDB Atlas 迁移我的数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51157250/