Atlas can faciliate a live migration where Cloud Manager or Ops Manager pushes a source sharded cluster to a sharded Atlas cluster. Atlas keeps the target cluster in sync with the source cluster until you cut your applications over to the target cluster in Atlas.
Once you reach the cutover step in the following procedure, stop writes to the source cluster: stop your application instances, point them to the Atlas cluster, and restart them.
- You can't select an
M0(Free Tier) or
M2/M5shared cluster as the target for live migration. To migrate data from an
M0(Free Tier) or
M2/M5shared cluster to a paid cluster, see Modify a Cluster.
- You can't live migrate from Cloud Manager or Ops Manager to a Atlas target cluster that has BI Connector for Atlas enabled.
- You can't use a Global Cluster as the target for live migration.
To live migrate a replica set cluster from Cloud Manager or Ops Manager to Atlas, see Live Migrate (Push) a Replica Set from Ops Manager or Cloud Manager.
VPC Private Endpoints
To request support for additional providers, submit a request on the MongoDB Feedback page.
Before you begin the live migration from Cloud Manager or Ops Manager to Atlas:
- Upgrade the source cluster to MongoDB 4.0 or later.
- Create an Atlas Account.
- Create an Atlas organization and then create a project in this organization.
- Ensure that you have the Atlas
- Deploy your cluster in this project.
- Connect to your cluster from all client servers where your applications run.
On your source cluster in Cloud Manager or Ops Manager, prepare the following items:
- Provision a migration host in Ops Manager, or provision a migration host in Cloud Manager.
Obtain the following external IP addresses from your Cloud Manager or Ops Manager administrator:
- If migrating from Ops Manager, the external IP addresses or CIDR blocks of the Ops Manager instances. If migrating from Cloud Manager, Atlas automatically obtains these addresses.
- The external IP addresses or CIDR blocks of the provisioned migration hosts in Cloud Manager or Ops Manager.
- The username and password used to connect to the source cluster.
- If the source cluster uses TLS/SSL with a Custom Root Certificate Authority (CA), to ensure the hosts can read the certificate, add the source cluster's CA file to the migration hosts.
- If you migrate a sharded source cluster with a sharded load balancer, disable sharded collection management in Ops Manager, or disable sharded collection management in Cloud Manager. If you don't disable the sharded load balancer, the Live Migration process might fail.
This section outlines the workflow. For detailed steps, see the procedure for migrating a sharded cluster from Ops Manager or Cloud Manager to Atlas.
The stages in the live migration workflow are:
Stage 1: Link with Atlas. Perform this step in Atlas, after you have created your Atlas account, organization, project, deployed your paid cluster in this project, and can connect to it.
- In the Atlas organization, go to Live Migration.
- Select Migrate from Ops Manager or Cloud Manager and start the Live Migration wizard.
- If you are migrating from MongoDB Community using Ops Manager, accept the Ops Manager Migration Agreement.
- If you are migrating from Ops Manager, enter the external IP addresses of your Ops Manager instances to the Atlas access list. If you are migrating from Cloud Manager, skip this step.
Stage 2: Provision Migration Host.
- Provision a migration host in Ops Manager, or provision a migration host in Cloud Manager. A migration host runs a dedicated MongoDB Agent that orchestrates the Live Migration process from Cloud Manager or Ops Manager to Atlas.
- In the Live Migration: Connect to Atlas section of your Cloud Manager or Ops Manager organization's Settings page, select Connect to Atlas and paste the the link-token that you created in Atlas. To learn more, see Connect to Atlas for Live Migration in Ops Manager, or Connect to Atlas for Live Migration in Cloud Manager.
- Stage 3: Start the Migration. In Atlas, follow the steps in the wizard to start the Live Migration process.
Live Migration from Cloud Manager or Ops Manager to Atlas is supported for all platforms on which you can provision a migration host. You can create a migration host on the following platforms:
- Amazon Linux 2 (linux-x86_64-enterprise-amazon2)
- ARM64 Ubuntu 16.04
- ARM64 Ubuntu 18.04
- ARM64 Ubuntu 20.04
- Debian 10
- Debian 8.1
- Debian 9.2
- PPC64LE RHEL 7.1
- PPC64LE RHEL 8.1
- PPC64LE Ubuntu 16.04
- PPC64LE Ubuntu 18.04
- RHEL 6.2
- RHEL 7.0
- RHEL 8.0
- s390x RHEL 6.7
- s390x RHEL 7.2
- s390x SLES 12
- s390x Ubuntu 16.04
- s390x Ubuntu 18.04
- SLES 12
- SLES 15
- Ubuntu 18.04
- Ubuntu 20.04
If you want to live migrate your data from a Windows- or macOS-based deployment to Atlas, you must provision your migration host on one of the supported platforms.
Atlas live migration (push) supports the following migration paths:
Source Sharded Cluster
Target Atlas Sharded Cluster
For sharded clusters, the major MongoDB versions on the source and target clusters must be exactly the same.
Contact your Cloud Manager or Ops Manager service administrator and obtain external IP addresses for the following components:
If you are migrating from Ops Manager, the Live Migration service in Atlas requires an external IP address or an external CIDR block of the Ops Manager instance in the source cluster deployment. This address could be from a single Ops Manager instance, or, if the source deployment uses multiple Ops Manager instances, from the gateway the Ops Manager instances will use to reach Atlas.
The Live Migration service uses this external IP address when generating a link-token. A link-token is a string that contains the information necessary to connect from Cloud Manager or Ops Manager to Atlas during a Live Migration from a Cloud Manager or Ops Manager deployment to a cluster in Atlas.
Before you begin the Live Migration procedure, add the IP addresses or CIDR blocks of your migration hosts to the project IP access list. Atlas allows connections to the target cluster only from hosts with entries in the project's access list.
Before starting the live migration procedure, Atlas runs validation checks on the source and target clusters.
- The source cluster is a sharded cluster.
- The target Atlas cluster is a sharded cluster with the same number of shards as the source sharded cluster.
- The target Atlas cluster does not have BI Connector for Atlas enabled.
During push live migrations, if the source cluster does not use TLS encryption for its data, the traffic from the source cluster to the migration host is not encrypted, but the traffic from the migration host to Atlas is encrypted. Determine if this is acceptable before you start a push live migration procedure.
When configuring the target cluster, consider the following:
- The target Atlas cluster must be a sharded cluster.
- You can't select an
M0(Free Tier) or
M2/M5shared-tier cluster as the destination for live migration.
- Do not change the
featureCompatibilityVersionflag while Atlas live migration is running.
Atlas doesn't migrate any user or role data to the target cluster.
If the source cluster enforced authentication, before you migrate you must re-create the appropriate authentication mechanism used by your applications on the target Atlas cluster. The following table lists authentication mechanisms and how to configure them in Atlas.
The live migration process makes a best attempt to continue a migration during temporary network interruptions and elections on the source or target clusters. However, these events might cause the live migration process to fail. If the live migration process can't recover automatically, restart it from the beginning.
After the migration process completes, your cluster restarts each of its members one at a time. This is called a rolling restart, and as a consequence, a failover will occur on the primary. To ensure a smooth migration, consider running a Test Failover procedure before migrating your data to the target cluster.
Consider running the following procedure twice. Perform a partial migration that stops at the Perform the Cutover step first. This creates an up-to-date Atlas-backed staging cluster to test application behavior and performance using the latest driver version that supports the MongoDB version of the Atlas cluster.
After you test your application, run the full migration procedure using a separate Atlas cluster to create your Atlas-backed production environment.
If your target sharded cluster contains existing data, the live migration service detects this and warns you that it will drop data and collections from the target sharded cluster before live migrating data into it.
Avoid making changes to the source cluster configuration while the
live migration procedure runs, such as removing sharded cluster members
mongod runtime settings, such as
- In the left-side panel of your organization's page, click Live Migration.
- Click Migrate from Ops Manager or Cloud Manager.
- Click I'm Ready to Start and, if you are migrating from MongoDB Community using Ops Manager, click Ops Manager License Agreement to read and accept it. To read the text of the agreement outside of the Live Migration Wizard, see the Ops Manager Migration Agreement.
Atlas displays a Live Migration wizard with instructions on how to proceed with the live migration process. The process pushes the data from your source cluster to the new target cluster. After you complete the wizard steps, you can point your application to the new cluster.
Click Generate Link-Token. Atlas displays the page for generating a link-token.
- If you are migrating from Ops Manager, enter the external IP addresses
or a CIDR block of your Ops Manager instances to add them to the access
list of the API Key embedded in the link-token. This allows Ops Manager
to send project and cluster information to Atlas.
Ops Manager does not send any data stored in your MongoDB databases
in this step. For example, enter
- If you are migrating from Cloud Manager, skip this step.
- If you are migrating from Ops Manager, enter the external IP addresses or a CIDR block of your Ops Manager instances to add them to the access list of the API Key embedded in the link-token. This allows Ops Manager to send project and cluster information to Atlas. Ops Manager does not send any data stored in your MongoDB databases in this step. For example, enter
- Click Next to see a page that contains the generated link-token.
Copy the link-token and store it in a secure location. Atlas never displays the contents of the link-token. Atlas also does not display the link-token after generating it. Do not share it publicly.Note
Use one unique link-token for live migrating all projects in one Cloud Manager or Ops Manager organization to Atlas.
- Click Done.
Access the organization in Cloud Manager or Ops Manager:
Open Ops Manager or Cloud Manager, and navigate to the organization whose project's cluster you are live migrating to Atlas.
- Click Settings in the left navigation panel.
- In the Live Migration: Connect to Atlas section, click Connect to Atlas. The Connect to Atlas dialog opens.
- Paste the link-token you generated in the previous step of the Live Migration wizard and click Connect to Atlas. Cloud Manager or Ops Manager establishes the connection to Atlas. Use the Refresh button to send an update to Atlas, if needed. To learn more, see Connect to Atlas for Live Migration in Ops Manager, or Connect to Atlas for Live Migration in Cloud Manager.
If you haven't already, create a target cluster in Atlas. See Prerequisites.
- Click Select Target Cluster from Projects.
- Go to your target Atlas cluster's project and find your target cluster.
- Click and select Migrate Data to this Cluster from the dropdown list to start the migration. The Migrate Data to This Cluster page opens.
Click Migrate from Ops Manager or Cloud Manager and fill in the fields as follows:
- Select the source project in Cloud Manager or Ops Manager, if it is not already selected.
- Select a migration host for handling the migration.
Review the IP address access list and check that the migration host's external IP address is included in this list. If it is not added, add it now:
- Click Set Network Access for Host
- Click + Add IP Address
- Return to the Live Migration wizard. Select the source cluster from the dropdown and choose Migrate data to this cluster under .
- Select the source cluster from the drop-down.
- If the source cluster uses TLS/SSL, toggle the Is SSL enabled? button.
- If the source cluster uses TLS/SSL with a custom Root Certificate Authority (CA), copy the path to the CA file from your migration host and paste this path into the provided text box. This file must be present on the migration host, to ensure the migration host can read the certificate.
- If your replica set target cluster has data, and you want to preserve it, keep the Clear any existing data on your target cluster option unchecked. The live migration service warns you if it finds duplicate namespaces. If you want to delete the existing data, check this option.
Click Validate. The validation process ensures that your migration host is reachable, and performs other validation checks to ensure that you can start live migration to Atlas.
If you are migrating from Ops Manager before version 5.0.9, the live migration process validates that the target cluster has enough disk space based on the data size. If you are migrating from Cloud Manager or Ops Manager 5.0.9 or later, the migration process validates that the target cluster has enough disk space based on the storage size of the compressed data. To learn more about data and storage sizes, see dbStats.
If validation fails, check the migration host, the validity of your external IP addresses or CIDR block, and the link-token.
- If validation succeeds, click Next. The Migrate from Ops Manager or Cloud Manager page displays.
A lag time value dispays during the final oplog tailing phase that represents the current lag between the source and target clusters. This lag time may fluctuate depending on the rate of oplog generation on the source cluster, but should decrease over time as the live migration process copies the oplog entries to the target cluster.
- When the lag timer and the Prepare to Cutover button turn green, click it to proceed to the next step.
When Atlas detects that the source and target clusters are nearly in sync, it starts an extendable 120 hour (5 day) timer to begin the cutover stage of the live migration procedure. If the 120 hour period passes, Atlas stops synchronizing with the source cluster. You can extend the time remaining by 24 hours by clicking Extend time below the <time> left to cut over timer.
Follow the steps on the Your migration is almost complete page:
- Stop your application. This ensures that no more writes occur on the source cluster.
- Wait for the optime gap to reach zero. When the counter reaches zero, the source and target clusters are in sync.
- Restart your application using the new connection string that is displayed in step 3 of the page in the user interface.
- Once you have completed the cutover stage of the procedure and confirm that your application is working with the Atlas cluster, click Cut Over to complete the migration process. This allows Atlas to mark the migration process as complete.
If you have any questions regarding migration support beyond what is covered in this documentation, or if you encounter an error during migration, please request support through the Atlas UI.
To file a support ticket:
- Click Support in the left-hand navigation.
- Click Request Support.
- For Issue Category, select
Help with live migration.
- For Priority, select the appropriate priority. For
questions, please select
Medium Priority. If there was a failure in migration, please select
- For Request Summary, please include
Live Migrationin your summary.
- For More details, please include any other relevant details to your question or migration error.
- Click the Request Support button to submit the form.