Migrate Your mLab MongoDB Clusters to ScaleGrid

See how easy it is to migrate your mLab MongoDB clusters to ScaleGrid’s fully managed MongoDB hosting on AWS, Azure, GCP, OCI, and DigitalOcean.

Migrating your MongoDB clusters from mLab to ScaleGrid is incredibly simple. Follow the steps below to migrate data from mLab using the mongodump and mongorestore technique:

  1. Stop writes to your old mLab cluster
  2. Run the below migration steps and validate
  3. Start writes to the new ScaleGrid cluster

We also provide free live migrations for clusters sized Large and above. Contact our support team at [email protected] to schedule your no downtime, free live migration.


Read the entire doc before starting.

We highly recommend you read this doc in its entirety before starting the migration process to ensure no steps are missed along the way!

Setup Your ScaleGrid MongoDB Destination Cluster

There are two different ways you can migrate your mLab MongoDB clusters to ScaleGrid:

Import your data during the MongoDB cluster creation process:

Or, import your data into an existing MongoDB cluster.

  • Continued after mLab account preparations.

Prepare Your mLab Account For Migration

Get started by heading into the MongoDB cluster you wish to migrate in the mLab console.


If you are performing a live migration with one of our support engineers, you must use a replica set to complete your migration. This is only required for live migrations, migrations without live sync do not require you to use a replica set.

Create a New Administrative User

  1. Go to your database in your mLab MongoDB cluster.
  2. Select the admin database.
  3. Select Users, and then Add admin user.
  4. Record the Username and Password for the new user.
  5. Click Create.

Grant ScaleGrid Access to Your Servers

If you are using our Dedicated Clusters plan, you can use Whitelists to grant ScaleGrid access to your servers. If you’re using our Bring Your Own Cloud (BYOC) plan, you can use either AWS or Azure Security Groups, OCI Network Security Group or GCP Firewall Rules to grant access.

  1. Go back to your mLab MongoDB cluster, and select Networking.
  2. Select Add IP address range rules.
    • Open a new tab to your ScaleGrid account and go to your MongoDB cluster details page to find the below information based on your DBaaS plan:
    • Dedicated Clusters
      • Enter the IP address of your primary server. You can look up the DNS name of your primary from the ‘Machines’ tab of your MongoDB cluster details page.
    • BYOC Clusters
      • If your ScaleGrid cluster is deployed in a private subnet behind a NAT gateway, enter the public IP of your NAT gateway.
      • If your ScaleGrid cluster is deployed in a public subnet with a public IP, enter the IP of your primary server.
  3. Select Apply security changes, and confirm.

Import MongoDB Data Into Your ScaleGrid Cluster

Here are the steps to importing your MongoDB databases from mLab into a newly created or existing ScaleGrid cluster.


The ScaleGrid MongoDB cluster you’re importing too should be empty so no data is overwritten in the process.

  1. Log into your ScaleGrid console.
  2. Go to your MongoDB Clusters page found in the left-side menu.
  3. Select the MongoDB cluster you wish to migrate your data to.
    • Validate that the size of the cluster in ScaleGrid is large enough to hold your data. If you have questions, please contact [email protected].
    • Validate that the MongoDB version is same or greater than your mLab version.
  4. Under the Overview tab, select Import Data.
  5. Under the default Remote Server tab of the popup creation wizard, enter your Server Name and Port.
  6. Select whether you want to import a single database, or all databases in that cluster.
    • Import a Single Database
      • Enter your Database Name and Authentication DB.
      • Enter the Username and Password you created and recorded earlier in your mLab MongoDB cluster.
      • Select whether you want to enable SSL for this cluster.
      • Review your details, and click Import.
    • Import All Databases
      • Enter the Username and Password you created and recorded earlier in your mLab MongoDB cluster.
      • Select whether you want to enable SSL for this cluster.
      • Review your details, and click Import.


Your migration from mLab has now begun!

Your data will be migrated as soon as the import job is complete, and the time will vary based on the size of your data.


Configure Your New MongoDB Cluster

While your new MongoDB cluster is being created, check off these important steps to fully complete your setup process:

Grab Your MongoDB Cluster Credentials

Here are the steps to connect to MongoDB:

  1. Go to the MongoDB Cluster Details page of your newly imported cluster.
  2. Under the Overview tab, find your Credentials and click Show.
  3. Copy your Connection String.
  4. Use these details to update your MongoDB connection to your application, and cancel the connection to mLab.

Confirm Your Successful MongoDB Data Migration

After the migration is complete, you should receive an alert in your ScaleGrid console and a confirmation in the email associated with your account. Make sure to also confirm the following:

  1. Data size and details match your mLab cluster.
  2. Your MongoDB cluster is connected to your application.
  3. Your backup schedule is configured.

Closing Your mLab Account

After you have confirmed that your MongoDB migration has completed successfully, you may begin closing your mLab account:

  1. Create a MongoDB cluster backup in your mLab account, and export your data.
  2. After all of your (necessary) clusters have been backed up, you can delete these clusters permanently from your mLab account.
    • Log into your mLab account.
    • Delete your active subscriptions.
    • Open your account settings in the upper-right hand corner.
    • Select Delete Account.