Exporting data from MongoDB Atlas starts with three documented paths
If your Atlas renewal, pricing change or residency requirement means you need your data out, you can export it with three documented methods: mongodump for binary BSON, mongoexport for JSON or CSV one collection at a time, and downloaded backup snapshots that Atlas prepares for you. Each path gives you a different kind of copy, so choose by what the next system needs to read. mongodump writes a BSON file and a .metadata.json file per collection, or one archive with --archive, and it keeps index definitions. mongoexport produces readable JSON or CSV but has no all-collections mode, so a database with many collections needs one command per collection. Snapshot downloads come from the Restores and Downloads tab once a manual download is ready, and Atlas lists the local file as a restore source.
The export is only as consistent as the option you use. A plain mongodump reads collections while your application keeps writing, so collections can be captured at different moments. mongodump --oplog captures writes made during the dump, but it cannot be combined with --db, --collection or --query, it cannot back up a sharded cluster, and it fails if operations such as renameCollection or $out run during the dump. Confirm with your Atlas administrator which cluster type you run, whether any encryption feature such as client-side field-level encryption is enabled (encrypted fields need the keys to be readable after export), and whether your deployment is sharded before you plan the run. Then check the MongoDB Database Tools documentation for mongodump against your exact version.
Which Atlas data types can be exported and how
This table maps each kind of Atlas data to the export method, output format and documented limits that apply. Read it by first finding your data type, then checking the limits before you plan a dump window. The main takeaway is that mongodump covers the whole deployment in one pass, while mongoexport and snapshot downloads each cover narrower slices.
| Data type | Export method | Format and output | Documented limits |
|---|---|---|---|
| Collections and documents (full deployment) | mongodump, all databases | BSON files in a directory, or one binary file with --archive | Writes a snapshot of each collection as the dump runs unless --oplog is used |
| Collections and documents (point-in-time) | mongodump --oplog | BSON dump plus oplog entries captured during the run | Cannot combine with --db, --collection or --query; not for sharded clusters |
| Index definitions | mongodump (included by default) | Stored in each collection's .metadata.json file | Index definitions are recreated on restore; confirm index builds in your test restore |
| Single collection as JSON or CSV | mongoexport, one command per collection | JSON or CSV text file per collection | No single command exports all collections, so large databases need a script |
| Backup snapshot downloads | Manual download from the Restores and Downloads tab | Snapshot files stored locally as a restore source | Available only once the download link appears; confirm retention with your Atlas plan |
| Dump during active writes | mongodump --oplog | Consistent point in time with captured writes | Fails if renameCollection or $out runs during the dump; schedule around schema changes |
Choosing mongodump, mongoexport or a snapshot download
For a migration into FerretDB, the usual starting point is mongodump. It reads the source database in one pass and writes BSON data for every collection, so you do not have to script a command per collection. This path is the one FerretDB's migration guide documents, and it is the format mongorestore expects when you load the data into the FerretDB URI.
- Everything in one pass:
mongodumpcovers all collections in the target database, so the export is a single command rather than a loop over collection names. - Output format: it writes a BSON file plus a
.metadata.jsonfile per collection to a directory, or one binary archive when you use--archive. - Index definitions: the metadata files record index definitions, which you need to recreate indexes after restore.
- Consistency limits:
--oplogcaptures writes made during the dump, but it cannot be combined with--db,--collectionor--query, and it cannot back up a sharded cluster. - Failure during the dump: operations such as
renameCollectionor$outrunning during the dump can make an--oplogdump fail, so schedule it for a quiet window.
Confirm with your team whether the source is a sharded cluster before you choose flags, and test the restore into a FerretDB instance that matches your DocumentDB version.
mongoexport produces human-readable JSON or CSV for one collection at a time. It suits analysts, reporting tools and downstream systems that do not read BSON. It is not a substitute for a migration export, because the output is a flat representation of documents rather than a complete copy of the database.
- One command per collection: FerretDB's migration guide notes that
mongoexporthas no way to export all collections at once, so a database with many collections needs a script that loops over each one. - Field selection: you can limit the output to named fields, which helps when a collection holds data that should not leave the database.
- Type fidelity: JSON export loses some BSON types, such as exact date and decimal details, depending on the output mode. Check the types your application depends on after export.
- Indexes and options are not kept: index definitions and collection options do not come with the export, so keep them from the
mongodumpmetadata or record them separately. - CSV requires explicit fields: CSV output needs the field list defined up front, and nested or array values need extra handling.
Before you rely on an export for analysis, compare document counts per collection with the source to confirm nothing was skipped.
Atlas lets you download a backup snapshot to local storage, and it lists locally downloaded snapshot files as a restore source. Treat this as a fallback copy you keep outside Atlas, rather than as the way you move data into FerretDB. Snapshot files are produced by Atlas's own backup process, so they describe the cluster state at snapshot time and depend on the backup features your plan includes.
- Manual download: after you request a download in Atlas, the file becomes available in the Restores and Downloads tab, where a download link appears once it is ready.
- Restore path: a downloaded snapshot restores into MongoDB-compatible infrastructure, so confirm with MongoDB's documentation how to use it if your target is FerretDB.
- Point-in-time gaps: a snapshot captures a moment, so writes after that moment are not in it unless you have another source.
- Retention and access: the downloaded file is a full copy of production data, so it needs the same encryption, access control and deletion rules as the cluster.
- Encryption features: check whether encryption at rest or client-side field-level encryption on your cluster blocks a plain dump or changes what the file contains.
Ask MongoDB or your Atlas administrator whether your encryption configuration affects the downloaded file before you rely on it as a restore source.
What blocks a dump and how to work around it
A standard mongodump is a good first export, but it has conditions under which it produces an incomplete or failed result. The cards below cover write activity during the dump, sharded clusters, operations that break an oplog capture, and encryption features that can stop a dump from reading data. For each one, confirm the condition in your own Atlas environment before you schedule the export.
Writes during the dump
A plain mongodump reads collections one at a time, so documents written while it runs may land in some collections but not others. The --oplog flag captures writes that happen during the dump, which gives a more consistent point-in-time copy. Check whether your application writes continuously, and decide whether you need a consistent snapshot or can accept a short window of drift. If you cannot pause writes, plan a verification step that compares document counts after the restore.
mongodump docsThe --oplog flag restrictions
The --oplog option cannot be combined with --db, --collection or --query, so it only works for a full-instance dump. If you need a subset of data, you must run a full dump and filter during restore, or run separate collection-level exports. Confirm with the MongoDB Database Tools documentation which flag combinations your tools version accepts, and test the exact command against a non-production Atlas cluster before you rely on it.
Sharded clusters
Because --oplog cannot back up a sharded cluster, a sharded Atlas deployment needs a different export path. Options include a maintenance window with writes stopped, exporting each collection through a driver with a stable query order, or using a downloaded Atlas backup snapshot as the source of truth. Ask your MongoDB account team which approach they support for your cluster topology, and record the chosen method in the migration runbook.
Renamed collections and $out
An oplog-based dump fails if operations such as renameCollection or $out run while the dump is in progress. These operations are common in batch jobs that rebuild collections or publish aggregation results. Review your scheduled jobs and deployment pipelines before the export window, and pause any job that renames collections or writes through $out. A failed dump usually means you should rerun it rather than restore a partial result.
Encryption features that block dumps
Some encryption configurations can prevent a standard dump from reading data in readable form, depending on how keys are managed and where they sit. No supplied source details which Atlas feature, if any, affects your cluster, so do not assume a dump will work. Ask MongoDB which encryption settings apply to your cluster, whether a dump can read them, and what workaround they recommend, such as exporting through a driver with application-side decryption or restoring from a snapshot. Confirm this before you plan the migration date.
Application-level export through a driver
When a dump cannot meet your consistency or topology needs, an application-level export reads documents through a MongoDB driver and writes them to your own storage. This path gives you control over batching, query ordering and checkpointing, but it also means your team writes and tests the export code. Confirm with your engineers whether your data model includes fields that the driver must decode, and measure the export time on a copy of production data before you commit to it.
Sequence for a complete export with verification
This sequence produces a complete, verified second copy of your Atlas data in a form you can restore elsewhere, with the source cluster left readable until the restored copy passes checks. Each step ends with a check you can record before moving on.
Inventory databases, collections and indexes
The database owner or platform engineer lists every database, collection, view, index and user-facing dependency on the Atlas cluster, using the Atlas UI or a connected mongosh session. Record document counts per collection and export the index definitions to a file so you have a baseline to compare against later. Confirm which databases your application actually reads, because some may be legacy or internal. The step is complete when the inventory file and the count baseline are saved with the cluster name, date and the person who ran them.
Choose the consistency approach
Decide whether the dump must reflect a single point in time. If the application keeps writing during the export, plan to use mongodump with the oplog option, which captures writes made during the dump, but remember it cannot be combined with --db, --collection or --query and cannot back up a sharded cluster. If the cluster is sharded or you need a single database or filtered subset, use a dump without the oplog option and accept that collections may be read at different moments. Confirm the choice with the application owner and record it in the export runbook. Also confirm that no renameCollection or $out operations are scheduled, since these cause an oplog dump to fail.
Run mongodump to a directory or archive
The database engineer runs mongodump against the Atlas connection string using a read-only database user with the backup role, writing either a directory or a single file with --archive. A directory produces a BSON file and a .metadata.json file per collection, plus index definitions, which makes individual collections easier to inspect. Check that the command exits without error and that the output contains an entry for every collection in your inventory. Store the output on encrypted storage that your organization controls, and record its checksum.
Download Atlas snapshots as a second copy
Using the Atlas backup or Restores and Downloads tab, the cluster owner requests a manual snapshot download once it is ready and saves the file to the same controlled storage. This gives you a second, independent copy that does not depend on the mongodump run, so the two copies can be compared. Verify that the snapshot file opens and that its checksum is recorded alongside the mongodump output. Note that Atlas snapshot restores are a separate path from BSON dumps, so keep both in the runbook rather than treating either as a replacement for the other.
Export flat files per collection where needed
If a downstream tool needs JSON or CSV, the data engineer runs mongoexport once per collection, since it cannot export every collection in one command. Name each output file after its collection and database so the set is easy to audit. Compare the line count or record count of each export with the document count from the inventory step, and investigate any difference before continuing. Flat exports are a convenience copy, so they should not replace the BSON dump as the restore source.
Restore into a staging target and run checks
Restore the mongodump output into a staging environment that matches the target you plan to use, such as FerretDB on PostgreSQL with DocumentDB, using mongorestore. Before restoring, confirm the target version pairing that your FerretDB release requires. After restoring, compare document counts per collection with the baseline, and compare index definitions with the exported list, noting any indexes the target does not support. Run a sample of application queries and check that results match. The step is complete when counts and index definitions match or every difference is documented and accepted.
Keep the source readable until verification passes
Do not delete, pause or downgrade the Atlas cluster, and do not remove its backups, until the restored copy has passed every check and the application owner has signed off. Keep the source cluster in its current tier and leave its backup policy unchanged during this period. Record the date the source was last used as the system of record and the date sign-off was given. The step is complete when the sign-off and the verification report are stored with the export runbook.
Restore compatibility rules before you load the data
The restore step is where a dump from Atlas meets FerretDB, so the rules for that step need to be checked before any production data moves. FerretDB documents restoring a mongodump output with mongorestore pointed at the FerretDB connection URI, and it recommends running a pre-migration testing step first. In practice, that means loading a copy of the dump into a non-production FerretDB instance, running your application's commands against it, and confirming that counts, indexes and query results match the Atlas source. Only after that test passes should you plan the production load. Keep the restore target and its version pinned so the test result still applies on the day of cutover.
Three FerretDB limits affect the restore directly. First, collection names must be valid UTF-8, so any collection that Atlas accepted with unusual characters must be renamed or checked before the load, and the dump inventory should be reviewed for this. Second, FerretDB keeps MongoDB's error names and codes, but exact error messages may differ, so any application or script that matches on message text will need adjustment. Third, FerretDB 2.x releases need a matching DocumentDB extension. The reference pairing is FerretDB v2.7.0 with DocumentDB v0.107.0-ferretdb-2.7.0, and both versions should be confirmed on the releases page before installation. Record the exact versions in your change ticket.
Plan the restore as a repeatable procedure. Confirm the pairing with the FerretDB releases page, restore into a staging database, compare document counts and index definitions, and rerun the test after any version change. Ask your implementation partner or DBA to document the rollback path, since a failed load into the target must not be mistaken for a complete migration. Also confirm with your own environment which team owns the restore, who signs off the test results and how long the dump file will be retained.
What to plan before the Atlas contract renewal or termination
Export is the slowest part of leaving Atlas, so the decisions below should be settled before any notice date. Each card names the owner and the artifact to hold, so the export path is proven and the data stays under your control.
Prove the export path in a test restore
Run a full mongodump of a copy of production into a scratch environment, then restore it with mongorestore and time both steps. The test shows whether the archive is complete, whether indexes come back, and how long a real cutover would take. The platform or database team owns the test, and the artifact is a dated restore log with row counts per collection. Confirm that the Atlas data size and network path to your export host allow the dump to finish inside your window.
Hold snapshot downloads under your control
Atlas lets you download backup snapshots manually, and the file appears under the Restores and Downloads tab once it is ready. Download the snapshots you need, store them in storage your organization controls, and record their checksums. The backup or infrastructure owner keeps the artifact, and the record should list the snapshot date, cluster name and retention owner. Do not rely on Atlas access staying available after termination.
Atlas restore overviewStore dumps in your own storage
Keep the mongodump output, either the per-collection BSON and .metadata.json files or a single --archive file, in an encrypted location you run or contract directly. Record which MongoDB Database Tools version created each dump. The security or data owner should verify that the store has access logging, key management and a documented retention period. An archive that exists only in a provider console is not a usable exit plan.
Map applications to the commands they use
List every application, service and batch job that connects to the cluster, and the MongoDB commands each one sends. Compare that list with the FerretDB compatibility list, paying attention to transactions, bulkWrite and role management. The application owners produce this inventory, and the artifact is a matrix with a pass or fail column per service. Applications that depend on unsupported commands need a decision before the cutover date.
Plan cutover and rollback windows
Decide when writes stop, when the final dump runs, and how long the old Atlas cluster stays writable in case the new target fails. If you use mongodump --oplog for a consistent point in time, remember that it cannot run with --db, --collection or --query, and that it cannot back up a sharded cluster. The operations lead owns the runbook, and the artifact is a signed cutover plan with a named rollback trigger.
Confirm post-termination data access
Ask MongoDB, in writing, how long your data, backups and snapshot downloads remain available after the contract ends, and what happens to backups that are still within retention. The procurement or legal owner should request the answer before the notice date and file it with the contract. Ask as well whether any export assistance is offered and at what cost. Do not assume the answer matches an earlier contract or a support page.
Questions teams ask before exporting Atlas data
How much effort does a full export from MongoDB Atlas take?
The effort depends mostly on data volume, write load, the number of collections and how strict your consistency needs are. A small, mostly idle database with a few collections is a short, routine job. A large cluster with heavy writes needs more planning, because a plain dump captures each collection at a different moment unless you use the oplog option. Each collection also adds work when you use mongoexport, since it has no way to export all collections in one command. Ask your team to inventory collection sizes, write rates and any collections that must be consistent with each other before estimating the work.
Can our own engineers run the export without outside help?
Often yes, if they have the MongoDB Database Tools installed, read access to the source cluster and a working knowledge of BSON and restore order. The harder parts are validating the result, choosing the right consistency mode and rehearsing the restore. If the team has not run a restore before, or the data includes encryption, sharding or many collections, an outside partner can plan and document the steps. DeployOpen plans and supports this kind of work under a written, fixed scope, and does not publish a price list, so a quote follows from the scope you agree.
What does the export need from our side?
Plan for four things: database credentials with read access to the source, network access from a host you control to the Atlas cluster, a maintenance window or a quiet period if you cannot accept inconsistent snapshots, and a restore target with enough storage and a matching version. For a FerretDB target, that means a PostgreSQL server with the DocumentDB extension at a version that matches your FerretDB release. Confirm access paths, IP allowlisting and who approves production reads with your security and database teams before the work starts.
Are Atlas snapshot downloads enough on their own?
Usually not. Atlas lists locally downloaded snapshot files as a restore source, which is useful as a recovery copy. However, a snapshot is tied to Atlas's backup format and retention, and it does not by itself give you a tested path into another database. Keep the snapshot as an independent copy, then also produce a logical export with mongodump, so you can restore into a self-hosted target and check collections, indexes and counts. Confirm with MongoDB which snapshot format and restore steps apply to your cluster tier.
What happens to indexes in an export?
mongodump writes index definitions alongside the data in each collection's metadata file, so mongorestore can recreate them. Index builds during restore take time that grows with collection size, and you should confirm that the target engine supports each index type your application uses. Test queries against the restored data, not only the document counts, because a missing or differently behaving index can change application performance even when the data is correct.
How do encryption features affect the export?
Some Atlas encryption features can block or change a plain dump, particularly client-side field-level encryption, where fields are encrypted before they reach the server. In that case the export may return ciphertext that only your application's key management can decrypt. Before exporting, identify which fields use encryption, where the keys are held and whether the target application can still read them. Key custody is the hardest part of this question, so involve the team that owns your key management service early. Confirm the exact behavior for your configuration with MongoDB's documentation and your own test restore.
Which restore compatibility rules should we check first?
Check that the restore target supports the MongoDB commands your application uses, because FerretDB documents which commands are implemented and which are not, including some transaction and role management commands. Confirm the collection names are valid UTF-8, since FerretDB requires this, and that error handling in your application does not depend on exact error messages, since FerretDB matches error names and codes but may word messages differently. Run your application's test suite against the target before cutover.
How the export paths feed a verified restore
The flow starts at the Atlas cluster, where three export paths can run: mongodump writing a directory or single archive, mongoexport run once per collection for JSON or CSV, and a manually downloaded backup snapshot. All three land in a storage location you control, which is the trust boundary: MongoDB operates the cluster and its snapshot service, while your team owns everything after the files are downloaded. Before anything reaches the target, check file counts, index definitions and document totals against the source. Only then does mongorestore write into the FerretDB URI.
Three export paths converge in your storage, where checks run before restore into FerretDB.
How DeployOpen scopes and delivers an Atlas data exit
DeployOpen plans and delivers the export as a fixed-scope engagement inside your own infrastructure, from the first Atlas inventory to a restore you can verify. The work covers dump method, consistency choices, restore testing and the evidence your team needs to sign off.
How we scope
- Inventory every Atlas project, cluster, database and collection, including sharded clusters that need a different export approach.
- Record which encryption features, field-level controls or restricted network paths could block a dump or restore.
- Agree in writing which export method, consistency option and target storage apply, and what counts as a completed export.
How we build
- Set up a secured export host with the MongoDB Database Tools installed and export credentials scoped to read-only access.
- Run test dumps and restores into a staging target to check index definitions, document counts and collection names.
- Script per-collection exports where a single mongodump pass is not suitable, and store outputs in your approved storage location.
How we hand over
- Deliver the export scripts, runbook and restore procedure, documented so your own engineers can repeat the export.
- Provide a verification report comparing source and restored collection counts, indexes and sample records.
- Walk your platform and security teams through the retained evidence, access logs and data handling controls.
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer if the export needs to run again before cutover.
- Retest the export procedure after Atlas or database tool upgrades that could change dump behavior.
- Confirm with your Atlas administrator and your written scope which restore sources and retention settings apply to your project.

