

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# Atlas 实时迁移服务
<a name="live-migration"></a>

[Atlas Live Migration Service](https://www.mongodb.com/cloud/atlas/migrate) 会从源数据库（仅限 MongoDB 数据库）发起数据的初始复制，持续监控后续变更并确保数据同步，直至割接至 MongoDB Atlas。在整个过程中，应用程序可以继续对源数据库执行正常的读写操作。准备好执行割接时，应用程序中的连接字符串将从源数据库更改为 Atlas 集群，迁移即告成功。

一个典型的迁移工作流包含以下步骤：

**第 1 步：准备**
+ 评测您当前的 MongoDB 数据大小和工作负载。有关说明，请参阅 MongoDB 文档中的[识别应用程序工作负载](https://www.mongodb.com/docs/manual/data-modeling/schema-design-process/identify-workload/)。
+ 确定 AWS 上的 Atlas 集群大小。
+ 准备您的迁移和割接计划。

**第 2 步：部署** 
+ 根据您在第 1 步中确定的规模，在 AWS 上为 MongoDB Atlas 集群设置一个新环境。
+ 配置网络访问。有关说明，请参阅 MongoDB 文档中的[配置 IP 访问列表条目](https://www.mongodb.com/docs/atlas/security/ip-access-list/#configure-ip-access-list-entries)。
+ 为目标集群配置安全性。有关说明，请参阅 MongoDB 文档中的[为集群配置安全功能](https://www.mongodb.com/docs/atlas/setup-cluster-security/#configure-security-features-for-clusters)。

**步骤 3：迁移**
+ 在 Atlas 实时迁移服务中配置源和目标。
+ 运行迁移程序。
+ 割接到 AWS 上 MongoDB Atlas。

有关此迁移方案的更多信息，请参阅[将自托管 MongoDB 环境迁移到 AWS 上的 MongoDB Atlas](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/migrate-a-self-hosted-mongodb-environment-to-mongodb-atlas-on-the-aws-cloud.html)。

**适用于 MongoDB 6.0.8 及更高版本**

如果您的源集群和目标集群都运行 MongoDB 6.0.8 或更高版本，可以使用引导式实时迁移选项（拉取或推送）将数据从源集群迁移到 Atlas MongoDB 集群：
+ [实时迁移（拉取）](https://docs.atlas.mongodb.com/import/live-import/)
+ [实时迁移（推送）](https://www.mongodb.com/docs/atlas/import/c2c-push-live-migration/)

**适用于早期的 MongoDB 版本**

要迁移 6.0.8 之前的 MongoDB 版本，请依循 [MongoDB 文档](https://www.mongodb.com/docs/atlas/import/#earlier-mongodb-versions--live-migrate-to-atlas)中讨论的迁移策略之一。