【问题标题】:Can I move mongodb atlas data to aws ec2我可以将 mongodb atlas 数据移动到 aws ec2
【发布时间】:2021-11-27 17:21:40
【问题描述】:

我是编程初学者。 大约 3 个月前,我使用 MongoDB 创建了 App。 我使用 mongo db atlas M10 Tier。 但是,我想在新的 aws ec2 服务器中设置 mongo db,并希望将数据从 atlas 移动到这里。 没有这个想法吗?

【问题讨论】:

标签: mongodb amazon-web-services amazon-ec2 atlas


【解决方案1】:

如果我在 Atlas 中有一个 mongodb,它有三个名为 db1db2db3 的数据库

我在 D:\

执行以下命令
mongodump -h <connecting string to your mongodb Atlas>

D:\dump\db1

D:\dump\db2

D:\dump\db3

mongorestore -h <connecting string to your EC2 mongodb> -d dbAtlas D:\dump\db1

EC2 mongodb 现在将拥有dbAtlas,它是db1 的副本

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-12-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-20
    • 1970-01-01
    • 2019-08-02
    • 1970-01-01
    相关资源
    最近更新 更多