MongoDB Database Backup Methods

A list of data backup methods, including advantages and disadvantages of each method, for backing up the data in the Event Repository. Refer to your MongoDB product documentation for detailed information about MongoDB backup methods.

Although the MongoDB replica set is very good at ensuring high data availability and data backups against even multiple server failures, periodic backing-up of the entire database is an additional guard against catastrophe where an entire replica set is lost. The following is a list of data backup methods which includes advantages and disadvantages of each method. The Ops Manager is especially feature-rich and flexible, allowing specific point-in-time recovery, automation, and direct MongoDB support.

A backup of the Event Repository would include the entire MongoDB database (the MtxEventDatabase and the MtxGlDatabase if it is present) or all of the files within the dbPath directory if the backup is at the file level.

Table 1. MongoDB Database Backup Methods
Method Description Pros Cons Comment
Back Up and Restore with MongoDB Tools Create backups and restore data using the utilities provided with MongoDB, namely mongodump and mongorestore.
  • Does not have to wait for database quiescence
  • Server need not be frozen or shut down
  • Possible to do incremental backups
  • Back up entire sharded cluster
  • Very slow
  • Impact performance of running mongod server
Only suitable for very small databases.
Manually copying Underlying Data Files Manually creating a copy of all the database files. No tools or special setup required.
  • No incremental backups
  • Many files to copy
  • Server must be frozen or shut down
  • Back up data shard individually
Only suitable for small database and files on SSDs.
Filesystem Snapshots System configured with data residing on a Logical Volume Manager (LVM) volume can take advantage of the LVM snapshot capability.
  • Does not have to wait for database quiescence
  • Server need not be frozen or shut down
  • One snapshot takes care of all the files on a logical volume
  • Data must already reside on a logical volume
  • Additional space must be allocated to hold ongoing changes to snapshot volume over the lifetime of the snapshot
  • A snapshot volume must be copied elsewhere for safekeeping, and that can take a very long time
  • Some system performance impact
  • Back up data shard individually
With some planning and careful orchestration, it is the most promising method of backing-up large databases without system down time and without additional cost.

A snapshot volume with large amount of data should be compressed before being copied elsewhere for safekeeping, and be released when done.

Ops Manager A comprehensive maintenance tool that provides on-premise monitoring, backup, and upgrade solutions.
  • GUI interface that turns multi-step operations into simple mouse clicks, even for a complex sharded cluster
  • Continuous backup
  • Point-in-time recovery
  • Back up an entire sharded cluster
Only available with MongoDB Enterprise Advanced license. Most comprehensive, integrated, and flexible solution.
Cloud Backup through MongoDB Cloud Manager Ops Manager outsourced, maintained by MongoDB.
  • Outsource all maintenance
  • Continuous backup
  • Point-in-time recovery
  • Back up an entire sharded cluster
High cost (subscription fee) Easiest, probably most reliable and flexible solution.
Replication Add more data-bearing replica set members.
  • HA and backup rolled into one
  • Allows rolling online delayed snapshot
High cost (hardware and licensing) Each additional replica set member adds to higher availability and additional guards against multiple server failure and data loss.