Migrating from serverless cluster to shared cluster

Hi everyone,

I’m looking for a way to transfer my database from my serverless instance to a shared cluster. Is there a simple way to do it? If not, how can i export my whole database (data, tables & indexes) from my serverless instance and then import in my shared cluster ?

Thanks in advance for your answers.

Hi :wave: @Valentin_CORSAIN,

Welcome back to the MongoDB Community forums :sparkles:

Currently, Atlas does not support live migrating from Serverless instances to Shared/Dedicated Clusters at the moment, however, we expect to add this functionality in the future. Please refer to the documentation for further reference into the current Atlas Serverless limitations.

Also, if the serverless instance runs on a rapid-release version of MongoDB, you can’t migrate to a shared cluster. To learn more, please refer to the Operational Considerations.

In the interim, the easiest way would be to restore your Serverless instance to a Shared/Dedicated Cluster. Please follow the procedure below:

  • Create a new Dedicated cluster by following our Guide.

  • Note: Please make sure you select the MongoDB version of your dedicated cluster as Latest Rapid Release which would deploy in the same version as the Serverless instance.

    image

  • Once the new cluster is created it will appear in the ‘Target cluster dropdown’ and you can restore the two most recent snapshots from your Serverless instance to the Dedicated cluster by choosing from the Target cluster dropdown.

You can also use the MongoDB tools available such as mongodump/mongorestore to migrate the data from Serverless to Shared/Dedicated Cluster, which would include downtime.

Here you can use the MongoDB tool mongodump to create a binary export of the data. With the binary export (mongodump file) you could create a new database or add data to an existing database with mongorestore.

Meanwhile, you can also refer to the FAQ - Atlas Serverless Instances to learn more about the difference between serverless instances and shared/dedicated clusters.

I hope this helps. Please let me know if you have any further questions.

Regards,
Kushagra

1 Like