- Back Up and Restore Deployments >
- Back up MongoDB Deployments >
- Back up a Deployment
Back up a Deployment¶
On this page
Overview¶
You can choose to back up all databases and collections on the deployment or specific ones.
Important
Only sharded clusters or replica sets can be backed up. To back up a standalone mongod process, you must first convert it to a single-member replica set.
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 group must be unique. Failure to have unique names for the deployment items will result in broken backup snapshots.
Prerequisites¶
- For a Replica Set:
- Ops Manager must be monitoring the deployment.
- It must run MongoDB version 2.2.0 or later.
- It must have an active primary node.
- For a Sharded Cluster:
- Ops Manager must be monitoring the deployment, including at least one mongos in the cluster.
- It must run MongoDB version 2.4.3 or later.
- All config servers must be 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. - The balancing round must be able to complete in less than one hour.
- The MongoDB version and Ops Manager version must meet the compatibility requirements.
- Decide how to back up the data and what data to back up. See the Backup Preparations.
Procedure¶
Click the Backup tab.¶
If you have not yet enabled Ops 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.
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.
In the Start Backup sidebar, configure the backup source and storage engine.¶
Select values from these two drop-down menus:
Menu | Possible and Default Values |
Sync source | This can be any secondary (Ops Manager chooses) or any specific secondary or the primary node. The default value ( |
Storage Engine | This can be either MongoDB Memory Mapped Files or WiredTiger, but the default value is the same storage engine as the primary node of the database being backed up. See the considerations in Storage Engines. |
If the deployment is not under Automation and requires authentication, specify the authentication mechanism and credentials.¶
Specify the following, as appropriate:
Auth Mechanism | The authentication mechanism the host uses. The options are:
|
DB Username | For See Configure Backup Agent for MONGODB-CR or Configure Backup Agent for LDAP Authentication. |
DB Password | For Username/Password or LDAP authentication, the password
used to authenticate the Backup Agent to the MongoDB deployment. |
Allows SSL for connections | If checked, the Backup Agent uses SSL to connect to MongoDB. |
To filter which namespaces get backed up, click the triangle to the right of Advanced Settings.¶
To exclude databases and collections from this backup:
- Click Blacklist.
- Enter the first database and collection in the text box. For
collections, enter the full namespace:
<database>.<collection>
. - To exclude additional databases or collections, click the Add another link then repeat the previous step.
To include only certain databases and collections for this backup:
- Click Whitelist.
- Enter the first database and collection in the text box. For
collections, enter the full namespace:
<database>.<collection>
. - To include additional databases or collections, click the Add another link then repeat the previous step.