Convert a Serverless Instance to a Dedicated Cluster
You can migrate your data from a Serverless instance to a dedicated cluster using one of the following methods:
(Recommended). Migrate Using Atlas UI. This process ensures correctness and allows you to keep the existing public connection strings.
Migrate Using Atlas UI
The UI-based conversion from a Serverless instance to a dedicated cluster has the following considerations:
The conversion process creates a dedicated cluster.
Using the Atlas UI-based process causes some downtime. Your cluster must go offline while Atlas converts your Serverless instance to a dedicated cluster.
If some of your connections use private endpoints, reconfigure private endpoints once Atlas upgrades your Serverless instance to a dedicated cluster tier.
You can't change the cloud provider or region during this conversion process. After the upgrade, you can move a cluster to a different provider or region.
Charts that have the Serverless instance as the data source are unavailable during the conversion to a dedicated cluster, but will become available once Atlas completes the conversion.
Upgrading your Serverless instance to a dedicated cluster is irreversible.
Required Access
To migrate your data from a Serverless instance (deprecated) to a dedicated cluster,
you must have Project Cluster Manager
access or higher to the project.
Convert Your Serverless Instance to a Dedicated Cluster
To convert your Serverless instance to a dedicated cluster:
In Atlas, go to the Clusters page for your project.
Warning
Navigation Improvements In Progress
We're currently rolling out a new and improved navigation experience. If the following steps don't match your view in the Atlas UI, see the preview documentation.
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.
If it's not already displayed, click Clusters in the sidebar.
The Clusters page displays.
Select the recommended Cluster Tier and storage size.
Important
Atlas recommends a cluster tier and storage size based on your Serverless instance tier, storage size, and usage. After the conversion process, you can modify the cluster tier and storage size based on your needs.
(Optional) Change additional options. To learn more, see Configure Additional Options, and Manage Cluster Tags.
(Optional) Review backups and billing. To learn more, see Dedicated Cluster Billing and Cloud Backups.
Click Review Changes to review the changes you have made.
The Review Changes page displays a complete side-by-side summary of the modified attributes with any warnings or notes pertaining to the changes. The original attribute settings are listed on the left and the corresponding new settings with changes in pricing are listed on the right.
Atlas displays the following warnings and notes related to the change at the top:
If you used a private endpoint with your Serverless instance, reconfigure the private endpoint once Atlas upgrades your Serverless instance to a dedicated cluster tier.
If you enable disk auto-scaling, the minimum oplog window changes to 24 hours.
Charts that have the Serverless instance as the data source are unavailable during the conversion to a dedicated cluster, but will become available once Atlas completes the conversion.
Upgrading your Serverless instance to a dedicated cluster is irreversible.
Click Apply Changes.
Once you have reviewed the changes, click Apply Changes to apply them to your cluster.
You can use the same DNS seed list connection string to connect to your new dedicated cluster as you have used for your Serverless instance.
Migrate Using mongodump
and mongorestore
To migrate your data from a Serverless instance to a dedicated cluster using tools, 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:
In Atlas, go to the Clusters page for your project.
Warning
Navigation Improvements In Progress
We're currently rolling out a new and improved navigation experience. If the following steps don't match your view in the Atlas UI, see the preview documentation.
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.
If it's not already displayed, click Clusters in the sidebar.
The Clusters page displays.
Connect to your Serverless instance using mongodump
to retrieve the data to migrate.
To connect to your Serverless instance and retrieve the data, do the following in the Atlas UI:
Click the (ellipsis) for the Serverless instance and select Command Line Tools from the dropdown.
The Cmd Line Tools tab displays.
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.
Run the mongodump
command in a terminal to retrieve the data.
To run the mongodump
command that you copied, do the
following in a terminal:
Paste the
mongodump
command that you copied into the terminal.Replace the
<PASSWORD>
in the string with the password of the user.Replace the
<DATABASE>
in the string with the name of the database that you want to migrate to the dedicated cluster.Run the
mongodump
command.When you run
mongodump
, the command copies the contents of the specified database into thedump/
sub-directory of the current directory. If thedump
directory doesn't already exist, the command creates the directory and copies the data into that directory.Repeat these steps for each database that you want to migrate to the dedicated cluster.
In Atlas, go to the Clusters page for your project.
Warning
Navigation Improvements In Progress
We're currently rolling out a new and improved navigation experience. If the following steps don't match your view in the Atlas UI, see the preview documentation.
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.
If it's not already displayed, click Clusters in the sidebar.
The Clusters page displays.
Connect to your dedicated cluster using mongorestore
to migrate the data to that cluster.
To connect to your dedicated cluster and migrate the data, do the following in the Atlas UI:
Click the (ellipsis) for the dedicated cluster and select Command Line Tools from the dropdown.
The Cmd Line Tools tab displays.
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.
Run the mongorestore
command in a terminal to retrieve the data.
To run the mongorestore
command that you copied, do the
following in a terminal:
Paste the
mongorestore
command that you copied into the terminal.Replace the
<PASSWORD>
in the string with the password of the user.Run the
mongorestore
command.When you run
mongorestore
, by default, the command copies the contents of thedump/
sub-directory of the current directory to the cluster. If you stored the data in a different directory, seemongorestore
syntax for the command options to specify a different location.(Optional) If you are migrating each database individually, repeat these steps for each database that you want to migrate to the dedicated cluster.
In Atlas, go to the Clusters page for your project.
Warning
Navigation Improvements In Progress
We're currently rolling out a new and improved navigation experience. If the following steps don't match your view in the Atlas UI, see the preview documentation.
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.
If it's not already displayed, click Clusters in the sidebar.
The Clusters page displays.
(Optional) Confirm that you've successfully migrated data to the dedicated cluster.
To confirm that you've successfully migrated your data, do the following in the Atlas UI.
Do one of the following on the dedicated cluster where you copied the data:
Review the Atlas UI:
Click the Browse Collections button for your cluster.
The Data Explorer displays.
Visually verify that data has been migrated to the cluster
Click Connect to connect to your cluster and run queries against the data.