Back up a Deployment
On this page
- OAuth 2.0 authentication for programmatic access to Cloud Manager is available as a Preview feature.
- The feature and the corresponding documentation might change at any time during the Preview period. To use OAuth 2.0 authentication, create a service account to use in your requests to the Cloud Manager Public API.
You can back up your MongoDB deployment.
Important
Only sharded clusters or replica sets can be backed up. To back up a standalone mongod process, you must convert it to a single-member replica set.
Considerations
Cloud Manager builds snapshots using the latest patch release of MongoDB.
Example
Consider a deployment where the current MongoDB version is 4.0.20.
If you back up a database running MongoDB 4.0.15, Cloud Manager creates the snapshot using MongoDB 4.0.20, the current version. Cloud Manager displays that snapshot as MongoDB 4.0.20 in the console.
MongoDB guarantees all patch release versions to be compatible. You can use the snapshots built with 4.0.20 to restore to your 4.0.15 instances, if needed.
Prerequisites
Unique Names for Deployment Items
Ensure your deployment items have unique names before creating backups.
Important
Replica set, sharded cluster, and shard names within the same project must be unique. Failure to have unique names for the deployments will result in broken backup snapshots.
Replica Set Requirements
A Replica Set must:
Be monitored by Cloud Manager.
Run MongoDB Enterprise with FCV 4.2 or later.
Have an active primary node.
Have one node with WiredTiger set as its storage engine.
Be monitored by Cloud Manager.
Run MongoDB version 2.6 to 4.0.
Have an active primary node.
Sharded Cluster Requirements
A Sharded Cluster must:
Be monitored by Cloud Manager.
Run MongoDB Enterprise with FCV 4.2 or later on all nodes including the config server.
Have an active primary node of each shard and the config server.
Have one node per shard or config server with WiredTiger set as its storage engine.
Be monitored by Cloud Manager including at least one
mongos
in the cluster.Run MongoDB version 2.6 to 4.0.
Have all config servers running. The config server
mongod
processes must be started with either the--configsvr
command line option or the{ "clusterRole": "configsvr" }
setting in themongod
configuration file.Complete the balancing round in less than one hour.
MongoDB FCV 4.2 Compatibility
All FCV 4.2 and later databases must fulfill the appropriate backup considerations.
MongoDB Compatibility
The MongoDB version must meet the minimum compatibility.
Data Protection Plan
Procedure
You can back up your entire MongoDB deployment.
In MongoDB Cloud Manager, go to the Continuous Backup page for your project.
If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
Click Continuous Backup in the sidebar.
The Continuous Backup page displays.
Set Authentication Mechanisms.
If Automation doesn't manage your deployment and your deployment requires authentication, specify the authentication mechanism and credentials.
Specify the following, as appropriate:
Auth Mechanism | The authentication mechanism that the MongoDB host uses. MongoDB Community options include:
MongoDB Enterprise options also include: |
DB Username | For See Configure MongoDB Agent for Authentication or Configure MongoDB Agent for LDAP. |
DB Password | For Username/Password or LDAP authentication, the
password used to authenticate the MongoDB Agent with the MongoDB
deployment. |
Allows TLS for connections | If checked, Backup uses TLS to connect to MongoDB. |
You can choose to back up all databases and collections in your MongoDB deployment or specific ones.
In MongoDB Cloud Manager, go to the Continuous Backup page for your project.
If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
Click Continuous Backup in the sidebar.
The Continuous Backup page displays.
In the Start Backup sidebar, configure the backup source and storage engine.
Menu | Possible Values | Default Value |
---|---|---|
Sync source |
|
Using a secondary is preferred because it minimizes performance impact on the primary. |
Storage Engine |
See the considerations in Storage Engines. | Same storage engine as the primary node of the database being
backed up. |
Set Authentication Mechanisms.
If Automation doesn't manage your deployment and your deployment requires authentication, specify the authentication mechanism and credentials.
Specify the following, as appropriate:
Auth Mechanism | The authentication mechanism that the MongoDB host uses. MongoDB Community options include:
MongoDB Enterprise options also include: |
DB Username | For See Configure MongoDB Agent for Authentication or Configure MongoDB Agent for LDAP. |
DB Password | For Username/Password or LDAP authentication, the
password used to authenticate the MongoDB Agent with the MongoDB
deployment. |
Allows TLS for connections | If checked, Backup uses TLS to connect to MongoDB. |