> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Provision a Migration Host for MongoDB Agent

You can live migrate source deployments monitored by Cloud Manager running MongoDB 6.0.17+ or 7.0.13+ to Atlas. To learn more, see [Live Migrate Your MongoDB Cluster Monitored by Cloud Manager to Atlas](https://www.mongodb.com/docs/atlas/import/c2c-push-live-migration/). For source deployments running MongoDB earlier than 6.0.17, you can use these [legacy migration options.](https://www.mongodb.com/docs/cloud-manager/migration.md#std-label-mongomirror-based-live-migration-choices)

To live migrate your source MongoDB deployment monitored in Cloud Manager to Atlas, provision a server for the migration host.

## Overview

The migration host is a server on which you install a dedicated MongoDB Agent. This MongoDB Agent automates live migration operations. It requires that you set its configuration option `agentFeatureCloudMigrationEnabled` to `true`.

You use the migration host to manage the live migration process of your deployment from Cloud Manager to Atlas. You can't use the migration host for any other purposes.

After you provision the migration host, its server appears under the Servers tab. A MongoDB Agent on the migration host runs a one-time migration of data from Cloud Manager to Atlas and reports the live migration status back to Cloud Manager.

To learn about starting a live migration from Cloud Manager, see [Migrate a Deployment to Atlas](https://www.mongodb.com/docs/cloud-manager/tutorial/migrate-to-atlas.md#std-label-migrate-to-atlas) and review the [workflow for live migration to Atlas.](https://www.mongodb.com/docs/cloud-manager/tutorial/migrate-to-atlas.md#std-label-lm-workflow)

## Considerations

If you plan to migrate more than one deployment at a time, create a dedicated migration host for each of the deployments that you want to migrate to Atlas.

**Note:**

Using an HTTP proxy, which intercepts and replaces TLS certificates for the relayed HTTPS requests is not supported by Ops Manager when you use it in hybrid mode.

## Prerequisites

The migration host must use a 64-bit CPU architecture and one of the following supported platforms. The platforms depend on the migration tool that the migration host will be running to facilitate the migration.

- Migration host for live migrations (push) of source deployments of MongoDB that you add to monitoring in Cloud Manager, where the migration host runs mongomirror:

  | Architecture | Distro/OS | 5.0 |
  | --- | --- | --- |
  | x86_64 | RHEL/Centos 7 |  |
  |  | RHEL/Centos 8 |  |
  |  | Amazon Linux 2 |  |
  |  | SUSE12 |  |
  |  | SUSE15 |  |
  |  | Debian 9 |  |
  |  | Debian 10 |  |
  |  | Debian 11 |  |
  |  | Ubuntu 18.x |  |
  |  | Ubuntu 20.x |  |
  | ARM | RHEL/Centos 8 |  |
  |  | Amazon Linux 2 |  |
  | PowerPC/ ppc64le | RHEL/ Centos 7 |  |
  |  | RHEL/ Centos 8 |  |
  | zSeries/ 390x | RHEL 7 |  |
  |  | RHEL 8 |  |
  |  | Windows |  |

  **Note:**

  The configuration of a migration host for live migration is not supported on Windows or macOS. You can still live migrate (push) your data from a Windows-based deployment to Atlas if you provision your migration host on one of the platforms it supports. You can't live migrate your data from a macOS-based deployment to Atlas.

  If Cloud Manager is running in local mode, you must have outgoing access to the following server to download [mongomirror.](https://www.mongodb.com/docs/atlas/reference/mongomirror/)

  ```none
  translators-connectors-releases.s3.amazonaws.com
  ```

- Migration host for live migrations (push) of MongoDB 6.0.17+ or \{+c2c-version+7}+ source deployments monitored in Cloud Manager, where the migration host runs [mongosync:](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/reference/mongosync/)

  The migration host must use a 64-bit CPU architecture and one of the [mongosync platforms.](https://www.mongodb.com/docs/cluster-to-cluster-sync/current/installation)

## Migration Host Resource Requirements

The live migration process is CPU-intensive and requires sufficient network bandwidth. Use a cloud instance with enough resources to help ensure a successful migration.

Avoid host environments that have been characterized as having low network bandwidth.

You may also need to provision additional storage for the [`cloudMigrationOplogPath`](https://www.mongodb.com/docs/cloud-manager/reference/mongodb-agent-settings.md#mongodb-setting-cloudMigrationOplogPath) option described in the following procedure.

- For the migration host that runs `mongosync` to facilitate push live migrations, use an instance with a minimum of 8 CPUs and 24 GB of RAM.

- For the migration host that runs `mongomirror` to facilitate push live migrations, use a host with 2-4 CPU cores and 4-8 GB of RAM to migrate a replica set. Use an instance with 2-4 CPU cores per shard to migrate a sharded cluster.

## Procedure

1. In MongoDB Cloud Manager, go to the Agents page for your project.

   If it's not already displayed, select the organization that contains your desired project from the  Organizations menu in the navigation bar.

   If it's not already displayed, select your desired project from the Projects menu in the navigation bar.

   In the sidebar, click Agents under the Database heading.

   The [Agents](https://cloud.mongodb.com/go?l=https%3A%2F%2Fcloud.mongodb.com%2Fv2%2F%3Cproject%3E%23%2Fdeployment%2Fagents%2Fall) page displays.

2. Click the Downloads & Settings tab.

3. Under Automation, select your operating system and follow the instructions to install and run the agent on the migration host.

   To learn more, see [Install the MongoDB Agent to Monitor or Back Up Deployments.](https://www.mongodb.com/docs/cloud-manager/tutorial/install-mongodb-agent-to-monitor.md)

4. Edit the MongoDB Agent configuration file to enable Live Migration.

   If you don't already have the  automation-agent.config file open from the previous step, open it in your preferred text editor:

   ```sh
   sudo vi /etc/mongodb-mms/automation-agent.config
   ```

   Add or update the following live migration configuration options:

   | Key | Value |
   | --- | --- |
   | [`agentFeatureCloudMigrationEnabled`](https://www.mongodb.com/docs/cloud-manager/reference/mongodb-agent-settings.md#mongodb-setting-agentFeatureCloudMigrationEnabled) | `true` |
   | [`cloudMigrationOplogPath`](https://www.mongodb.com/docs/cloud-manager/reference/mongodb-agent-settings.md#mongodb-setting-cloudMigrationOplogPath) | Path to the [oplog](https://www.mongodb.com/docs/manual/reference/glossary.md#std-term-oplog) files for the [live migration](https://www.mongodb.com/docs/cloud-manager/tutorial/migrate-to-atlas.md) process. This key is optional and if set, requires provisioning enough storage in the specified directory for the oplog buffering. [Contact MongoDB Support](https://www.mongodb.com/contact?tck=docs) if you need assistance determining whether you need to set this key for your deployment. |

   Ensure that the resulting changes to the  automation-agent.config file contain the following necessary configuration options for live migration:

   ```ini
   mmsGroupId=<The ID of your project>
   mmsApiKey=<The Agent API key of your project>
   agentFeatureCloudMigrationEnabled=true
   cloudMigrationOplogPath=<The path to the oplog files>
   ```

5. An additional server appears under the Servers tab, and an additional MongoDB Agent appears under the Agents tab.

## Next Steps

Once you have provisioned the migration host, you can switch to Atlas and follow the steps in the wizard to start the live migration process.
