Docs Menu

Docs HomeMongoDB Ops Manager

Manage Blockstore Snapshot Storage

On this page

  • Prerequisites
  • Procedures

Ops Manager can back up MongoDB databases as snapshots to one or more of the following storage options:

This tutorial covers backing up your MongoDB databases to snapshots stored in other MongoDB databases. Blockstores can exist on any MongoDB instance that Ops Manager can access.

Note

You might have issues that require you to use more than one snapshot store. These issues could include needing more capacity, localizing data, or meeting privacy regulations.

To learn how to assign snapshot stores to different data centers, see Assign Snapshot Stores to Specific Data Centers.

Before creating any blockstore snapshot stores:

The format of the Username and Password depend upon the authentication mechanism. Select one of the following tabs:

1
  1. Click the Admin link.

  2. Click the Backup tab.

  3. (Optional) If you have not previously set the head directory, set it in the Head Directory box.

  4. Click the Snapshot Storage page.

2
3
Field
Necessity
Action
Name
Required
Type a label for the blockstore.
Datastore Type
Required
Select Standalone, Replica Set or Sharded Cluster.
MongoDB Host List
Conditional

Type a comma-separated list of mongod instances (for a Replica Set) or mongos instances (for a Sharded Cluster) in the <hostname:port> format that comprise the blockstore database.

Example

h1.ex.com:27017,h2.ex.com:27017,h2.ex.com:27018

This field displays only if you set Datastore Type to Replica Set or Sharded Cluster.

MongoDB Hostname
Conditional

Type the hostname of the standalone MongoDB instance.

This field displays only if you set Datastore Type to Standalone.

MongoDB Port
Conditional

Type the port number of the standalone MongoDB instance.

This field displays only if you set Datastore Type to Standalone.

Username
Optional

If you set this value:

Password
Optional

If you set this value:

Warning

If you did not use the credentialstool to encrypt this password, it is stored as plaintext in the database.

Connection Options
Optional

Add additional connection string options for the MongoDB instance. This field supports unescaped values only.

TLS options do not work here. Configure TLS in the conf-mms.properties file by using the mongodb.ssl.CAFile option.

You must provide a value for the authMechanism option to set your authentication method. For more information about authentication options for connection strings, see Authentication Options.

For proper syntax, see Connection String URI Format in the MongoDB manual.

Encrypted Credentials
Optional
Select if the Username and Password for the database were encrypted using the credentialstool.
Use TLS/SSL
Optional

Select if the blockstore database requires TLS encryption.

Beyond this checkbox, to connect this blockstore using TLS, you must enable TLS on the blockstore database.

New Assignment Enabled
Optional
Select if you want to enable this blockstore after creating it. This is selected by default so the blockstore can be assigned backup jobs. If you clear this checkbox, the blockstore is created but you cannot assign backups to this blockstore.
4

Ops Manager lists blockstores in a table on the Snapshot Storage page. Each row contains the settings for one blockstore.

1
  1. Click the Admin link.

  2. Click the Backup tab.

  3. (Optional) If you have not previously set the head directory, set it in the Head Directory box.

  4. Click the Snapshot Storage page.

2
3

In the MongoDB Connection column, update any values that need to be changed in the following fields:

Field
Contents
<hostname>:<port>

Type in one or more hosts that comprise the blockstore database in the <hostname:port> format.

Important

If these hosts are changed, the blockstore database they host must have the same data as the original blockstore database. Changing the host to a new blockstore databases results in data loss.

  • If the blockstore database is a Replica Set or Sharded Cluster, type a comma-separated list of mongod instances (for a Replica Set) or mongos instances (for a Sharded Cluster).

    Example

    host1.example.com:27017,host2.example.com:27017,host2.example.com:27018

  • If the blockstore database is a standalone MongoDB instance, type the hostname:port of the instance.

MongoDB Auth Username

If you set this value:

MongoDB Auth Password

If you set this value:

Warning

If you did not use the credentialstool to encrypt this password, it is stored as plaintext in the database.

Note

Ops Manager doesn't display the existing MongoDB Auth Password.

Encrypted Credentials
Select if the Username and Password for the database were encrypted using the credentialstool.
Use TLS/SSL

Select if the blockstore database requires TLS encryption.

Beyond this checkbox, to connect this blockstore using TLS, you must enable TLS on the blockstore database.

Connection Options
Type any additional connection string options for the MongoDB instance. This field supports unescaped values only.
Assignment Labels
Type a comma-separated list of labels to assign the blockstores to specific projects.
Blockstore Max Capacity (GB)
Type a maximum size for a blockstore.
Load Factor

Type any positive integer that expresses how much backup work you want this snapshot store to perform compared to another snapshot store.

Backup work includes running backups, restoring snapshots or grooming blockstores. The backup work ratio assigned to a single snapshot store is called its Load Factor.

Important

If you have only one snapshot store, the Load Factor setting represents the number of concurrent backup work processes the snapshot store performs at a time.

To avoid performance costs associated with running multiple concurrent processes when you have one snapshot store, omit this setting to assign your snapshot store the default Load Factor of 1.

By default, Ops Manager assigns each snapshot store a Load Factor of 1. This means each snapshot store performs the same amount of backup work.

As a snapshot store's Load Factor increases, it performs more backup work compared to another snapshot store. If the Load Factor of snapshot store A is set to 2 and the Load Factor of snapshot store B is set to 1, A performs two times the backup work of B.

Example

How to estimate Load Factor

Consider a five-shard sharded cluster with the following backup storage configuration:

  • File system store (F) manages the backup work for one shard in the cluster. F is running on a single two-core physical server.

  • Blockstore (B) manages the backup work for four shards in the cluster. B is running as a four-node sharded cluster on four physical servers with two cores on each server.

In this example, B has four times the capability of F. B should receive the greater part of the ratio of backup work: 4:1. For every one backup task F performs, B performs 4.

Set the Load Factors of B to 4 and F to 1.

Snapshot stores with greater compute or storage performance should be given a greater Load Factor:

  • A file system store with 16-cores and 128 GB of RAM can back up more databases in less time than a file system store with only 2 cores and 8 GB of RAM.

  • A blockstore backed by a 10-node sharded cluster can back up more databases and groom more databases than a blockstore backed by a single replica set.

Load Factor can be set to 0. When one snapshot store's Load Factor is set to 0, it performs no backup work at all. If a snapshot store's Load Factor is changed while backup work is in progress, all jobs or tasks running on that snapshot store are allowed to finish. All future backup work then is re- distributed among the remaining snapshot stores with a Load Factor of 1 or greater and have Assignment Enabled selected.

Write Concern

Select your preferred Write Concern:

Default
Deployment Type
Default Write Concern
Standalone
Journaled
Replica sets or sharded clusters
W2
Journaled
A primary or standalone MongoDB instance acknowledged the write and wrote that write to their on-disk journals.
Acknowledged
A primary or standalone acknowledged the write.
W2
More than one of the cluster members acknowledged the write.
Majority
A majority of the replica set members acknowledged the write.
4

Select if you want to enable this blockstore after creating it. This is selected by default so the blockstore can be assigned backup jobs. If you clear this checkbox, the blockstore is created but you cannot assign backups to this blockstore.

5
6

If you change any connection string values or the Write Concern, restart all the Ops Manager instances including those running Backup Daemons.

Warning

Modifying the connection string values or the Write Concern for an existing blockstore requires you to restart all Ops Manager components, including those only running the Backup Daemon to apply those changes. Connection parameters include:

  • <hostname>:<port>

  • MongoDB Auth Username

  • MongoDB Auth Password

  • Encrypted Credentials

  • Use TLS/SSL

  • Connection Options

  • Write Concern

If you change to another blockstore host, the data on the existing blockstore is not copied automatically to the other blockstore.

Tip

See also:

For more details on the MongoDB connection string uri, see Connection String URI Format in the MongoDB Manual.

1
  1. Click the Admin link.

  2. Click the Backup tab.

  3. (Optional) If you have not previously set the head directory, set it in the Head Directory box.

  4. Click the Snapshot Storage page.

2
3
←  Manage Snapshot StorageManage S3-Compatible Snapshot Storage →