Migrate from MongoDB Atlas to DocumentDB on Layerbase
Paste a mongodb+srv:// connection string and we copy your collections, documents, and indexes into a managed DocumentDB database, or into FerretDB if you prefer it. Both speak the MongoDB wire protocol, so your driver and your queries stay as they are. Read-once: your Atlas cluster is never modified.
Picking FerretDB? MongoDB to FerretDB guide
Why switch
Why teams leave MongoDB Atlas
Branches for a document database
A DocumentDB or FerretDB database on Layerbase branches copy-on-write in seconds once Branching is turned on in its Settings tab, so a preview environment or a risky schema change gets its own copy of the data instead of a restored dump.
One flat price
Atlas prices a cluster by tier, storage, and data transfer, and the number moves when your traffic does. DocumentDB on Layerbase starts on the Free plan, and both DocumentDB and FerretDB are $5 a month on Solo and $15 on Pro, whatever the week looks like.
One connection string, one pass
Copy the mongodb+srv:// string out of Atlas and paste it. We connect once, copy every collection with its documents and indexes, and disconnect. A self-hosted mongod works the same way, so this is not an Atlas-only path.
Open source at the bottom of it
The default target is DocumentDB: the MongoDB wire protocol implemented on Postgres, MIT licensed, originally from Microsoft and now a Linux Foundation project. The storage underneath is Postgres, so the database backs up, restores, and branches like everything else in your account.
How it works
Four steps, one pass
- 1
Create a free account or sign in
Sign in with Google or GitHub. No credit card is needed to start, and the migration wizard opens with this platform already selected.
- 2
Paste your connection string
Paste a MongoDB connection string including the database name: mongodb+srv://user:password@cluster0.abc123.mongodb.net/mydb for Atlas, or mongodb://user:password@host:27017/mydb for a self-hosted server. Use the +srv form or a single host: a mongodb:// string listing several hosts is not accepted. The server has to be reachable from the public internet, so a mongod on a private network or on localhost cannot be imported. In Atlas, copy it from Database, then Connect, then Drivers, and check Network Access first: Atlas refuses connections from addresses that are not on its allow list. Any MongoDB source works here, not only Atlas.
- 3
Pick what to migrate and name it
Choose what to bring over, give the new Layerbase database a name, and start the migration. Progress streams live in the dashboard.
- 4
We copy it in one pass
The migration reads from MongoDB Atlas once and never writes to it. Credentials are used for the copy and never stored. When it finishes, you land in your new database with a live TLS connection string.
FAQ
Common MongoDB Atlas migration questions
Can I choose FerretDB instead of DocumentDB?
Yes. The importer lands on DocumentDB by default and offers FerretDB as the alternative: pick it under Target engine before you start, or open the Migrate tab of an empty FerretDB database. Both run on Postgres through the DocumentDB extension and speak the MongoDB wire protocol.
Compare DocumentDB and FerretDBWhat am I actually migrating to?
DocumentDB, not MongoDB, and we would rather you know that before the copy than after. The MongoDB server side public license restricts how a managed provider can offer the server, so Layerbase Cloud runs MongoDB-compatible engines instead: DocumentDB by default, the MongoDB wire protocol on Postgres under MIT, or FerretDB, an Apache 2.0 implementation on the same Postgres extension. Your driver connects with a mongodb:// string and mongosh works against it. If you need the MongoDB server itself, run it locally with Layerbase Desktop or the Layerbase CLI.
Which MongoDB features do not come across?
Neither target is the MongoDB server, so check your application against the one you pick before cutover. On the import itself: an index the target cannot create is skipped entirely rather than created without its options, and named in the migration report, so recreate it by hand if your queries need it. On DocumentDB that means an index with a collation, or a hidden index. A capped collection comes across without its cap. Views and time-series collections are not copied and are listed in the report the same way, and a collection over five million documents is refused: contact support for a larger migration. Our MongoDB to FerretDB guide lists what FerretDB does not implement.
Will my Atlas cluster be modified?
No. We connect with the credentials in the string you paste, read the collections once, and disconnect. Nothing is written to Atlas and it keeps serving your app throughout. This is a one-shot copy rather than replication: there is no live sync afterwards, so plan a cutover instead of expecting the two to stay in step.
Can I migrate a MongoDB I host myself?
Yes, as long as we can reach it. The copy runs from our servers, so the source has to be reachable from the public internet: a mongod on a private network, behind a VPN, or on localhost is refused rather than dialed. Put the database name in the string so we know which one to copy, and use a user that can read it. Use the mongodb+srv:// form or a single host, because a mongodb:// string listing several hosts is not accepted. Atlas also needs your network access list to allow the connection while the migration runs.
How should I test it before I cut over?
Run the migration into a new database, point a staging copy of your app at it, and run your test suite. DocumentDB and FerretDB both write to Postgres, so a write-heavy workload will not behave exactly like Atlas did: measure yours on the migrated database rather than taking our word for it. If it is not a fit, delete the database and import into the other engine.
Ready to leave MongoDB Atlas?
Sign in, and the migration wizard opens with MongoDB Atlas already selected. Your source is read once and never modified, so there is nothing to undo if you change your mind.