您可以使用以下任一方法将现有 MongoDB 部署、JSON 或 CSV 文件中的数据引入 Atlas 中的部署:
Atlas 协助进行的实时迁移,或者
将数据从现有部署自助迁移到 Atlas 的工具。
实时迁移到 Atlas
重要
The feature described on this page is not currently supported on Atlas Infinite clusters during public preview. For the features supported in public preview, see Public Preview Availability.
使用 Atlas 用户界面中的以下任意一个引导式实时迁移类型,将您的数据从源集群迁移到 Atlas MongoDB 集群:
实时迁移(拉取)。有关说明,请参阅将集群实时迁移(拉取)到Atlas。
实时迁移(推送)。如需有关说明,请参阅将 Cloud Manager 监控的集群实时迁移(推送)到 Atlas。
注意
无法迁移处于停机状态的集群。如要将集群实时迁移至 Atlas,运行 MongoDB 的集群必须处于正常运行状态,因为 Atlas 会逐个迁移集群节点(先迁移从节点,最后迁移主节点)。请在尝试迁移前确保集群处于运行状态。
自助迁移工具
要将数据加载到 Atlas 中的新集群,请参阅加载样本数据。
要为测试目的复制集群,请参阅 MongoDB 备份方法。
To load data from a JSON or a CSV file into an Atlas cluster, use the Compass GUI .
要创建备份和恢复数据,请使用 MongoCLI 实用程序 mongorestore 和 mongodump。
To migrate from legacy relational databases to MongoDB, use the Relational Migrator tool. Relational Migrator utilizes intelligent algorithms and generative AI to automate solutions to common data modeling, code conversion, and other migration challenges.
恢复数据从Atlas 集群备份到另一个Atlas 集群,请使用 Restore Your Cluster.
如果您要迁移的应用程序需要近乎持续的正常运行时,请联系 MongoDB 支持部门并提供您的正常运行时要求和集群配置。