Database tools

Import, export & backups

Move documents with JSON or CSV, export Excel workbooks, copy collections, and back up or restore MongoDB data.

Choose the right transfer

GoalUse
Move document data into a file or another tool.JSON array, JSON Lines or CSV document export.
Append document records from a file.JSON or CSV document import.
Copy a collection to another database or saved connection.Copy collection / Paste collection.
Create or restore a MongoDB backup.Collection/database backup using mongodump and mongorestore.

Collection file actions are in Import / export on the right-click menu. Backup actions explicitly include “collection backup” to distinguish them from document transfers.

Export documents

  1. For an entire collection, choose Import / export → Export documents….
  2. For matching documents, run a query and choose Export query results… above its results.
  3. Choose a format and a new output file using Browse… or an absolute path. Its parent directory must already exist.
  4. For CSV, review the ordered column list and cell format.
  5. Choose Start export and monitor Background jobs.

Query export reruns the last executed filter, sort and projection from the beginning. It exports all matching documents, regardless of the loaded page, page size or display memory budget. A newly edited, unrun filter and unsaved document changes are not included.

Export publishes a new file and does not overwrite an existing one. Cancelling or failing a document export removes its temporary output. This is a fresh query against MongoDB, not a transactional snapshot of data changing during export.

Understand JSON and CSV

JSON array and JSON Lines

Exports use canonical MongoDB Extended JSON to retain BSON types. JSON array writes one array of document objects; JSON Lines writes one document per line. Import accepts ordinary JSON and Extended JSON in the selected format.

{"_id":{"$oid":"507f1f77bcf86cd799439011"},"name":"Alice","sequence":{"$numberLong":"9007199254740993"}}

This is one JSON Lines record. For JSON array, wrap records in an array. Imports also accept Palryn's BSON constructors output: UUID("…"), LUUID("…"), CSUUID("…"), JUUID("…"), PYUUID("…"), MD5("…") and other supported scalar helpers such as ObjectId, ISODate, Long and BinData. UUID, legacy UUID and MD5 helpers accept uppercase or lowercase names, with quoted GUID/hash arguments. Keep field names and ordinary string values double-quoted. Helpers can be mixed with Extended JSON values; text inside strings is never interpreted as a helper.

LUUID/luuid uses your legacy UUID representation from Settings when the import starts. Explicit CSUUID/JUUID/PYUUID helpers specify their own encoding. MD5 takes an existing 32-digit hexadecimal digest. The same helpers work when pasting one document into Insert document or a BSON document editor. To import multiple copied result documents, save the complete array from JSON → Format → BSON constructors to a file and select JSON array.

CSV

Headers are literal top-level field names. Dots in a CSV header do not traverse nested objects. Export uses the selected columns in order; add fields missing from the sampled suggestions.

  • Typed — Extended JSON per cell: each populated cell is a JSON value. An empty cell means a missing field, null means BSON null, and a JSON empty string means an empty string. Choose the same cell format on import to preserve types.
  • Typed CSV imports also accept constructor values, with normal CSV escaping of their quotes. Plain-text CSV retains helper-looking text as strings.
  • Plain text — spreadsheet cells: exports strings, numbers, booleans, dates and ObjectIds as plain values without BSON type wrappers; nested and other BSON values use Extended JSON. Import treats every cell as a string, including numbers and dates. Choose this for text-oriented exchange rather than a BSON round-trip.

Export Excel workbooks

Choose Excel workbook (.xlsx) when exporting normal query results, a collection, or loaded/full aggregation results. Select top-level columns as for CSV. Workbooks have bold headers and a frozen header row; results continue on new sheets after every 1,048,575 documents. Full exports stream through temporary files rather than loading all results into the grid.

Numbers and booleans use native Excel cells when precision permits. Integers beyond 15 digits, higher-precision doubles and Decimal128 values are text to avoid rounding. Dates are UTC text, ObjectIds are hex text and nested values are Extended JSON in one cell. Strings remain literal text, including those starting with =. Missing fields are blank; null is the text null.

Excel exports support 1–1000 selected columns. Cells longer than 32,767 characters stop the export without publishing partial output; choose JSON for those results. Empty results with selected columns produce a header-only workbook. Excel import is not available.

Import documents

  1. Choose Import / export → Import documents (JSON/CSV)…, or the import action above query results.
  2. Choose the input file, its format and, for CSV, the cell format.
  3. Review the target collection and choose Start import.

Import appends documents. It does not replace the collection, upsert records or skip duplicate keys. Records without an _id receive generated ObjectIds. Already confirmed batches remain if a later record fails or you stop the job. Rerun queries after import to refresh displayed results.

Copy a collection

Choose Copy collection on the source collection. Navigate to the destination database, on the same or another saved connection, and choose Paste collection. Review the source, destination name and available copy options before starting.

  • A new destination copies the documents, indexes and collection options.
  • Append keeps the destination's indexes/options. Choose whether duplicate IDs should be overwritten, skipped or inserted with new ObjectIds.
  • Replace replaces the destination with a full copy after the temporary copy is built and you have confirmed the replacement.

Views and time-series collections cannot use collection copying. The source is read live, so concurrent changes may or may not be included.

The clipboard entry identifies a collection for a database copy job; it is not a JSON copy of the loaded result rows. Follow the operation in Background jobs and inspect its outcome before reusing the destination.

Back up and restore MongoDB data

Install MongoDB Database Tools 100.3 or newer. In Settings → Tools, configure mongodump and mongorestore, or leave them available on PATH.

Use Import / export → Export collection backup… for a collection or Export database… on a database. Choose a dump folder or MongoDB archive and optional gzip compression. A MongoDB archive is not a ZIP or tar file.

To restore, use Import collection backup… or a database's Import backup…. Explorer also offers Import backup for a connection with no databases. Identify the original database/collection in the backup, then choose the destination; a collection restore can use a new name.

A dump-folder input is the root containing the source database's subfolder. If you enable drop-before-restore, confirm the exact target shown by the dialog. It applies to collections represented in the selected backup scope. Stopped or failed restores can leave partial results.

Monitor background jobs

Open Background jobs from the status area for progress, elapsed time, completion and errors. Document transfers show counts; external backup tools use running status and elapsed time. Closing the jobs panel does not stop its work.

Use a job's Stop action to request cancellation. A database request already in flight may finish, and cancelling an import, copy or restore is not a rollback. Jobs do not resume after the application process exits.

Palryn · Explore your data.
These guides describe Palryn v0.7.0. Available controls may differ in older versions.