You can edit the database deployment configuration in the
Atlas UI to convert a shared cluster (
M5) to a serverless instance. When you
convert a shared cluster to a serverless instance, you can also
change the cloud provider, region, and backup options.
To learn more about the use cases for clusters and serverless instances and determine which is best for you, see Create a Database Deployment.
Atlas doesn't support conversion from a dedicated cluster to a serverless instance.
A serverless instance can't convert to a cluster
You can't convert a serverless instance back to a cluster. To move your data back to a cluster, you must manually migrate to a new cluster of the same MongoDB version as your serverless instance using mongodump and mongorestore. To learn more, see Convert a Serverless Instance to a Dedicated Cluster. If the serverless instance runs on a rapid release version of MongoDB, you can't migrate to a shared cluster. To learn more, see the Operational Considerations.
Read the considerations carefully before you proceed with the conversion to a serverless instance.
Consider the following factors before you convert a shared cluster to a serverless instance:
Serverless instances don't support the same features as shared clusters. If you change your shared cluster to a serverless instance, you lose access to the following features.
MongoDB plans to add support for more configurations and capabilities on serverless instances over time. To learn which features MongoDB plans to support for serverless instances in the future, see Serverless Instance Limitations.
Select Cloud Service Provider Regions
You can deploy both shared clusters and serverless instances in a subset of regions on AWS, Google Cloud, and Azure, but serverless instances support fewer regions across all cloud service providers. To learn more about the supported cloud provider regions for each database deployment type, see:
If your current cloud provider region is unsupported for serverless instances, Atlas alerts you before conversion and lets you choose a new cloud provider and region.
Select Driver Version Support
Some driver versions that shared clusters support are unsupported for serverless instances. If you connect to Atlas using a driver, check the Minimum Driver Versions for Serverless Instances.
To see the full list of limitations for serverless instances, see Serverless Instance Limitations. Atlas supports some features listed in the Serverless Instance Limitations only for dedicated clusters, so the features might be unsupported for your current shared cluster tier.
You can't convert a shared cluster to a serverless instance if you connected the cluster to any of the following:
You must disconnect the shared cluster from these features before you convert to a serverless instance.
You can't convert a cluster that contains a capped collection to a serverless instance.
You can't convert a cluster to a serverless instance if you use collation on the cluster's collections, indexes, or queries.
You can't convert a paused
M0cluster to a serverless instance. You must resume the paused cluster before you change it to a serverless instance.
Shared clusters always follow a major release cadence. Serverless instances always run on the latest MongoDB release, which may be a rapid release. Atlas automatically upgrades to the latest MongoDB version when you convert to a serverless instance, but you should:
Ensure that the latest MongoDB version is compatible with your application.
Consider that you can't reverse conversion to a serverless instance. To revert to using a cluster after you convert to a serverless instance, you must use mongodump and mongorestore to manually migrate your data to a new cluster.
mongodump and mongorestore support migration only between database deployments of the same MongoDB version. As a result, if the MongoDB version of the serverless instance is later than all available major versions for shared clusters, you can migrate only to a dedicated cluster until the next major version release.
To learn more about release cadences, see Choosing a Release Cadence.
You can connect to a serverless instance only using a DNS seed list connection string. If you use a different connection string format to connect to your shared cluster, change your connection string after you convert to a serverless instance. To learn more and find your connection string, see Connect to Your Database Deployment.
If you use MongoDB Charts, all existing charts that use this cluster won't render until you update the data source to the respective collection in the new serverless instance.
Your database deployment must go offline while it converts to a serverless instance. As a result:
You can't read/write to the database deployment while Atlas converts a shared cluster to a serverless instance.
Atlas doesn't preserve sessions, transactions, retryable writes, and change streams from before the conversion.
Serverless instances offer pay-per-operation pricing. You pay only for the Processing Units consumed by your database operations and storage consumed by your data and indexes. To learn more, see Serverless Instance Costs.
Atlas selects Serverless Continuous Backup by default when you convert a shared cluster to a serverless instance. To learn about the costs associated with continuous backup, see the Continuous Backup row of the Usage Cost Summary in Serverless Instance Costs.
Before you convert to a serverless instance, disconnect your shared cluster from Atlas App Services and Atlas Search:
To disconnect your cluster from Atlas Search, you must delete all Atlas Search indexes for your cluster. To learn more, see Delete an Atlas Search Index.
After you complete the prerequisites, to convert your shared cluster to a serverless instance:
If your current cloud provider region is unsupported for serverless instances, Atlas alerts you and chooses the default region for your cloud provider. You can select another cloud provider and region or accept the default selections.
If your current cloud provider region is supported, the Cloud Provider & Region section is collapsed. You can expand the section and select another cloud provider and region.
Atlas offers the following backup options for serverless instances:
Serverless Continuous Backup
Atlas takes incremental snapshots of the data in your serverless instance every six hours and lets you restore the data from a selected point in time within the last 72 hours. Atlas also takes daily snapshots and retains these daily snapshots for 35 days. To learn more, see Serverless Instance Costs.
Atlas takes incremental snapshots of the data in your serverless instance every six hours and retains only the two most recent snapshots. You can use this option for free.
Atlas selects Serverless Continuous Backup by default. To change to Basic Backup, expand the Backup section and select Basic Backup.
You can use a DNS seed list connection string to connect to your new serverless instance.