Docs Menu
Docs Home
/
MongoDB Atlas
/ /

Convert a Serverless Instance to a Dedicated Cluster

On this page

  • Prerequisites
  • Migrate Using mongodump and mongorestore

You can manually migrate your data from a Serverless instance to a dedicated cluster. To migrate your data, you can do one of the following:

Important

In early 2025, we will release a UI-based tool to assist you in migrating your workloads from Serverless instances to Dedicated clusters. This tool will ensure correct migration and you will not need to change connection strings. There will be some downtime while using this tool.

To manually migrate your data from a Serverless instance to a dedicated cluster, you must have the following:

  • A dedicated cluster that runs the same major version of MongoDB as the Serverless instance from which you want to migrate data.

  • The following command-line tools:

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

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

  3. If it's not already displayed, click Clusters in the sidebar.

    The Clusters page displays.

2
3

To connect to your Serverless instance and retrieve the data, do the following in the Atlas UI:

  1. Click the (ellipsis) for the Serverless instance and select Command Line Tools from the dropdown.

    The Cmd Line Tools tab displays.

  2. In the Binary Import and Export Tools section, copy the mongodump command to create a binary export of the contents of a database.

    For example:

    mongodump --uri
    mongodb+srv://{username}:<PASSWORD>@test.jca5k.mongodb.net/<DATABASE>

To learn more, see Connect to a Cluster using Command Line Tools.

4

To run the mongodump command that you copied, do the following in a terminal:

  1. Paste the mongodump command that you copied into the terminal.

  2. Replace the <PASSWORD> in the string with the password of the user.

  3. Replace the <DATABASE> in the string with the name of the database that you want to migrate to the dedicated cluster.

  4. Run the mongodump command.

    When you run mongodump, the command copies the contents of the specified database into the dump/ sub-directory of the current directory. If the dump directory doesn't already exist, the command creates the directory and copies the data into that directory.

  5. Repeat these steps for each database that you want to migrate to the dedicated cluster.

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

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

  3. If it's not already displayed, click Clusters in the sidebar.

    The Clusters page displays.

6

To connect to your dedicated cluster and migrate the data, do the following in the Atlas UI:

  1. Click the (ellipsis) for the dedicated cluster and select Command Line Tools from the dropdown.

    The Cmd Line Tools tab displays.

  2. In the Binary Import and Export Tools section, copy the mongorestore command to create a new database or add data to an existing database.

    For example:

    mongorestore --uri
    mongodb+srv://{username}:<PASSWORD>@test.jca5k.mongodb.net

To learn more, see Connect to a Cluster using Command Line Tools.

7

To run the mongorestore command that you copied, do the following in a terminal:

  1. Paste the mongorestore command that you copied into the terminal.

  2. Replace the <PASSWORD> in the string with the password of the user.

  3. Run the mongorestore command.

    When you run mongorestore, by default, the command copies the contents of the dump/ sub-directory of the current directory to the cluster. If you stored the data in a different directory, see mongorestore syntax for the command options to specify a different location.

  4. (Optional) If you are migrating each database individually, repeat these steps for each database that you want to migrate to the dedicated cluster.

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

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

  3. If it's not already displayed, click Clusters in the sidebar.

    The Clusters page displays.

9

To confirm that you've successfully migrated your data, do the following in the Atlas UI.

  1. Do one of the following on the dedicated cluster where you copied the data:

    • Review the Atlas UI:

      1. Click the Browse Collections button for your cluster.

        The Data Explorer displays.

      2. Visually verify that data has been migrated to the cluster

    • Click Connect to connect to your cluster and run queries against the data.

Back

Auto-Create Indexes