Navigation

Back up a Deployment

On this page

You can back up your MongoDB deployment to a local MongoDB database or a cloud-hosted MongoDB database.

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.

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 version 2.6 or later.
  • Have an active primary node.
  • Be monitored by Cloud Manager.
  • Run MongoDB Enterprise with an FCV of 4.2 or later.
  • Have an active primary node.

Sharded Cluster Requirements

A Sharded Cluster must:

  • Be monitored by Cloud Manager including at least one mongos in the cluster.
  • Run MongoDB version 2.6 or later.
  • 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 the mongod configuration file.
  • Complete the balancing round in less than one hour.

A Sharded Cluster running FCV 4.2 cannot yet be backed up. Support will be extended in future point releases of Ops Manager 4.2

MongoDB FCV 4.2 Compatibility

All FCV 4.2 databases must fulfill the appropriate backup considerations.

MongoDB Compatibility

The MongoDB version must meet the minimum compatibility.

Procedure

You can choose to back up all databases and collections in your MongoDB deployment or specific ones.

1

Click Backup.

If you have not yet enabled Cloud Manager Backup, click Begin Setup and complete the wizard. This results in a completed backup setup, so you can skip the rest of this procedure.

2

Start backing up the process.

From the list of processes, navigate to the Status column for the process you want to back up and click Start.

3

In the Start Backup sidebar, configure the backup source and storage engine.

Menu Possible Values Default Value
Sync source
  • Any secondary (Ops Manager chooses)
  • Any specific secondary
  • The primary node

any secondary

Using a secondary is preferred because it minimizes performance impact on the primary.

Storage Engine
  • MongoDB Memory Mapped Files or

  • WiredTiger.

    If you select this option, Cloud Manager can only back up deployments with fewer than 100,000 collections.

See the considerations in Storage Engines.

Same storage engine as the primary node of the database being backed up.
4

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 Username/Password or LDAP authentication, the username used to authenticate the MongoDB Agent with the MongoDB deployment.

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.

See Configure MongoDB Agent to Use TLS.

5

(Optional) Exclude certain databases and collections from the backup.

To exclude certain databases and collections, click Advanced Settings and then Blacklist. Enter the databases and collections to exclude. For collections, enter the full namespace: <database>.<collection>.

6

Click Start.

You can back up your entire MongoDB deployment.

1

Click Backup.

If you have not yet enabled Cloud Manager Backup, click Begin Setup and complete the wizard. This results in a completed backup setup, so you can skip the rest of this procedure.

2

Start backing up the process.

From the list of processes, navigate to the Status column for the process you want to back up and click Start.

3

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 Username/Password or LDAP authentication, the username used to authenticate the MongoDB Agent with the MongoDB deployment.

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.

See Configure MongoDB Agent to Use TLS.

4

Click Start.