liveBook · Manning

Mongodump

As explained in MongoDB 8.0 in Action, Third Edition

mongodump is a MongoDB command-line utility that creates logical backups by exporting database content, commonly as BSON files.

mongodump creates a logical backup by extracting MongoDB database content into BSON files rather than copying the physical storage layer. It is an option for Atlas M0 free clusters, which do not have Atlas Cloud Backup, and for making an external copy or transferring data between MongoDB instances. section 21.1.1

For an M0 backup and restore, plan for these boundaries:

  • Create the data dump with mongodump; restore that dump with mongorestore. section 21.1.1 section 21.1.2
  • Handle database users and roles separately. Atlas does not support mongodump’s --dumpDbUsersAndRoles option or mongorestore’s --restoreDbUsersAndRoles option. section 21.1.1 section 21.1.2
  • Do not rely on this path for oplog-based point-in-time recovery: Atlas does not support --oplog for the dump or --oplogReplay for the restore. section 21.1.1 section 21.1.2

A logical dump can take substantial time and processing power to export and import a large database. For clusters with Cloud Backup, consider its managed snapshots instead of treating mongodump as an equivalent snapshot or point-in-time backup. section 21.1.1 section 21.5

How MongoDB 8.0 in Action, Third Edition covers it

How deep it goes
Defines the logical BSON export and its Atlas limitations, but does not provide a mongodump command walkthrough.
Examples
Uses Atlas M0 backup and restoration, external copies, and transfers between MongoDB instances as practical cases.
What it assumes
Assumes a MongoDB database and Atlas cluster context while defining what a logical BSON backup contains.
What you can do after
Apply mongodump with mongorestore for M0 data copies while planning separately for users, roles, and recovery limits.
How it connects
Connects logical backups to BSON, mongorestore, Atlas Cloud Backup, and point-in-time recovery.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of MongoDB 8.0 in Action, Third Edition. The section links point to the parts of the book it draws on.