- Administer Ops Manager >
- Manage Snapshot Storage >
- Manage Blockstore Snapshot Storage
Manage Blockstore Snapshot Storage¶
Ops Manager can back up MongoDB databases as snapshots to one or more of the following storage options:
- Another MongoDB database, called a Blockstore,
- As files stored on a local or network-attached file system, and/or
- An AWS S3 bucket.
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 may have issues that require you to use more than one snapshot store like 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.
Prerequisites¶
Before creating any blockstore snapshot stores:
- Ensure storage volumes with sufficient capacity to store the blockstore and the Oplog Store MongoDB database is attached to the Ops Manager or MongoDB host. The Oplog Store does not need to reside on the same host as the blockstore. The Oplog Store can be created using the same replica set as the blockstore if you need to conserve storage and compute resources.
- Deploy the dedicated MongoDB instance(s) to host the blockstore database and Oplog Stores.
- Ensure the host running the Ops Manager Backup Daemon service has sufficient capacity to store the head database.
- Secure the instance that stores your blockstores using authentication and SSL. Blockstores support all authentication mechanisms.
Add a Blockstore¶
Click Create New Blockstore.¶
Provide the blockstore details.¶
Field | Contents | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name | A name for the blockstore | |||||||||||||||
Datastore Type | Select Standalone, Replica Set or Sharded Cluster. | |||||||||||||||
MongoDB Host List (replica set and sharded cluster only) | Type a comma-separated list of mongod instances
(for a Replica Set) or mongos instances (for a
Sharded Cluster) in the Example
|
|||||||||||||||
MongoDB Hostname (Standalone only) | Type the hostname of the standalone MongoDB instance. | |||||||||||||||
MongoDB Port (Standalone only) | Type the port number of the standalone MongoDB instance. | |||||||||||||||
Username |
|
|||||||||||||||
Password (optional) | Warning If you did not use the credentialstool to encrypt this password, it is stored as plaintext in the database.
|
|||||||||||||||
Connection Options (optional) | Type any additional configuration file options for the MongoDB instance. This field supports unescaped values only. 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:
|
|||||||||||||||
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. |
Click Create.¶
Edit an Existing Blockstore¶
Once created, blockstores are listed directly on the Snapshot Storage page in a table. Each row contains the settings for each blockstore.
Navigate to the Snapshot Storage page.¶
- Click the Admin link.
- Click the Backup tab.
- (Optional) If you have not previously set the head directory, set it in the Head Directory box.
- Click the Snapshot Storage page.
Go to the row for the blockstore you want to edit.¶
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 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.
|
||||||||||||||||
MongoDB Auth Username |
|
||||||||||||||||
MongoDB Auth Password | Warning If you did not use the credentialstool to encrypt this password, it is stored as plaintext in the database.
|
||||||||||||||||
Encrypted Credentials | Select if the Username and Password for the database were encrypted using the credentialstool. | ||||||||||||||||
Use TLS/SSL | Select if the blockstore database only accepts connection encrypted using TLS. Beyond this checkbox, to connect this blockstore using TLS, you must enable:
|
||||||||||||||||
Connection Options | Type any additional configuration file 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. Important If you have only one snapshot store, skip this setting. Backup work includes running backups, restoring snapshots or grooming blockstores. The term of backup work ratio assigned to a single snapshot store is called its Load Factor. By default, Ops Manager assigns each snapshot store a
Load Factor of 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 Example How to estimate Load Factor Consider a five-shard sharded cluster with the following backup storage configuration:
In this example, Set the Load Factors of Snapshot stores with greater compute or storage performance should be given a greater Load Factor:
Load Factor can be set to |
||||||||||||||||
Write Concern | Select your preferred Write Concern:
|
Select the checkbox in the Assignment Enabled column.¶
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.
Click Save.¶
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.
See also
For more details on the MongoDB connection string uri, see Connection String URI Format in the MongoDB Manual.
Delete a Blockstore¶
Navigate to the Snapshot Storage page.¶
- Click the Admin link.
- Click the Backup tab.
- (Optional) If you have not previously set the head directory, set it in the Head Directory box.
- Click the Snapshot Storage page.