For AI agents: a documentation index is available at https://www.mongodb.com/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.
Docs Menu

Create a Migration Job

Migration jobs are the worker processes responsible for transferring your data and schemas from a relational database to MongoDB. Create a new migration job from the Data Migration tab.

  • The URI credentials you provide when creating a migration job do not need to be the same as the credentials you used when creating your project.

  • You can use an existing Relational Database Connection, or create one when you create the migration job.

  • Create one or more mapping rules in your Relational Migrator project.

  • For both Atlas and on-premises deployments, create a separate MongoDB user for Relational Migrator with readWrite access to your MongoDB database.

  • If you're using a JDBC driver to perform a snapshot migration, contact your MongoDB representative for configuration information.

1

Relational Migrator only runs one migration job at a time. If a job is in progress, this button is disabled.

2

On the Connect to your source database form, enter the connection details to create the JDBC URI for your relational database.

To use a saved relational database connection, click Use a saved connection and select it from the drop-down, then enter credentials if required.

To create a new connection:

  1. In the Database type drop-down, select the database type.

  2. To enter a connection string directly, enable the Enter URI manually toggle and paste your connection string into the JDBC URI.

  3. To create a connection string by entering database information, enter the following:

    Field
    Value

    Host

    The host IP or DNS name.

    Port

    The port number.

    Database

    The database name. Required.

    Identifier

    One of Service Name or SID.

    Username and Password

    The credentials to use for authentication.

    Checking Save password saves the password securely on your machine, so you don't have to enter the Username and Password again when using the saved connection.

  4. Enter a Connection name and optional Environment tag.

  5. Click Connect.

    The saved connection is available for use in all jobs and projects.

3

To use a saved MongoDB connection, click Use a saved connection and select it from the drop-down, then enter credentials if required.

To create a new connection:

  1. Enter the MongoDB connection string.

    1. In MongoDB connection string (URI), enter your MongoDB URI.

      If you're using X.509 authentication, Relational Migrator verifies the connection string syntax and the certificate file format.

    2. If it isn't included in the connection string, enter the Database to connect to.

    3. If they aren't included in the connection string and you aren't using X.509 authentication, enter the Username and Password of your Relational Migrator MongoDB user.

  2. Enter a Connection name and optional Environment tag.

  3. Click Connect.

    The saved connection is available for use in all jobs and projects.

4
Migration Option
Description

Drop destination collections before migration

Boolean. Indicates whether Relational Migrator drops a destination collection before transferring data.

Stop after errors

Integer. Indicates the number of errors after which Relational Migrator stops the migration job.

Verify migrated data

Boolean. If true, the sync engine verifies migrated data against the source database. Only supported for snapshot mode.

Data truncation

Enum. Controls how Relational Migrator handles truncation issues during migration. Show as error increments the error count and can stop the migration. Show as warning logs the issue and does not increment the error count. Hide suppresses truncation issues from the UI.

When you set the Mode, Relational Migrator runs preflight checks against your source database to confirm that it has the required configuration and permissions. If the database does not meet a requirement, Relational Migrator displays a warning below the mode selection with the number of failed checks.

To review the failures, click View details. The Preflight checks failed dialog lists each failed check, the tables it affects, and the remediation SQL. You can copy an individual statement or download a script that contains the fixes for every failed check.

Important

The remediation script grants permissions and changes the configuration of your source database. Before you run it, review the script with a database administrator.

5

If you want to migrate only a subset of the collections in your project, click Selective Migrations and choose the collections you want to migrate. If you want to migrate all collections in your database, skip this step.

The tabs below explain the different ways you can select collections to migrate:

  1. Under Selective migration, use the check marks to select collections:

    • All collections within a database: Click the check mark for the database.

    • Specific collections within a database: Expand the database and select individual collections.

6

On the Review Summary form, review the following details before starting your migration job:

  • Type: The migration mode.

  • Tables and rows affected: The number of tables and rows included in the migration.

  • Estimated data size: The approximate size of the data to migrate.

  • Drop destination collections: Whether Relational Migrator drops collections before migration.

  • Stop migration after: The number of errors after which the migration stops.

  • Collections to migrate: The collections included in this migration.

To start your migration job, click Start.

Important

For large migration jobs to an Atlas cluster, the Review Summary may include Atlas Performance Suggestions that recommend higher cluster tiers. Upgrading is optional, but reduces migration time.

Click Upgrade on Atlas to open Atlas in a new browser tab or window. If you want to upgrade, but don't have the necessary permissions, please contact your administrator.

For detailed information regarding the configuration requirements for each database, see the following: