- Install Ops Manager >
- Configure Backup Jobs and Storage >
- Configure Multiple Blockstores in Multiple Data Centers
Configure Multiple Blockstores in Multiple Data Centers¶
On this page
Overview¶
The Backup Blockstore databases are the primary storage systems for the backup data of your MongoDB deployments. You can add new blockstores to your data center if existing ones have reached capacity.
If needed, you can also deploy blockstores in multiple data centers and assign backups of particular MongoDB deployments to particular data centers, as described on this page. You assign backups to data centers by attaching specific Ops Manager groups to specific blockstores.
Deploy blockstores to multiple data centers when:
- Two sets of backed up data cannot have co-located storage for regulatory reasons.
- You have multiple data centers and want to reduce cross-data center network traffic by keeping each blockstore in the data center it backs.
This tutorial sets up two blockstores in two separate data centers and attaches a separate group to each.
Prerequisites¶
Each data center hosts a Backup Blockstore database and requires its own Ops Manager Application, Backup Daemon, and Backup Agent
The two Ops Manager Application instances must share a single dedicated Ops Manager Application Database. You can put members of the Ops Manager Application database replica set in each data center.
Configure each Backup Agent to use the URL for its local Ops Manager Application. You can configure each Ops Manager Application to use a different hostname, or you can use split-horizon DNS to point each agent to its local Ops Manager Application.
The Ops Manager Application database and the Backup Blockstore databases are MongoDB databases and can run as standalones or replica sets. For production deployments, use replica sets to provide database high availability.
Procedures¶
Provision Servers in Each Data Center¶
Each server must meet the cumulative hardware and software requirements for the components it runs. See Ops Manager Hardware and Software Requirements.
Servers that run the Backup Damon, Ops Manager Application database, and the Backup Blockstore databases all run MongoDB. They must meet the configuration requirements in the MongoDB Production Notes.
Install MongoDB¶
Install MongoDB on the servers that host the:
- Backup Daemon
- Ops Manager Application database
- Backup Blockstore databases
See Install MongoDB in the MongoDB manual to find the correct install procedure for your operating system. To run replica sets for the Ops Manager Application database and Backup Blockstore databases, see Deploy a Replica Set in the MongoDB manual.
Install the Ops Manager Application¶
Install the Ops Manager Application in each data center but do not perform the step to start the service. See Install Ops Manager to find the procedure for your operating system.
In the step for configuring the conf-mms.properties
file, set the same
Ops Manager Application URL in both data centers. For example, in both data centers,
set mms.centralUrl
and mms.centralBackupUrl
to point
to the server in Data Center 1:
Start the Ops Manager Application¶
The Ops Manager Application creates a gen.key
file on initial startup. You
must start the Ops Manager Application in one data center and copy its gen.key
file before starting the other Ops Manager Application. Ops Manager uses the same
gen.key
file for all servers in both data centers.
The gen.key
file is binary. You cannot copy the contents: you must
copy the file. For example, use SCP.
Start the Ops Manager Application in Data Center 1.¶
Issue the following:
Copy the gen.key
file.¶
Copy the /etc/mongodb-mms/gen.key
file from the Ops Manager Application server in
Data Center 1 to the:
/etc/mongodb-mms
directory on the Ops Manager Application server in Data Center 2./etc/mongodb-mms
directory of each Backup Daemon server in each data center.
Start the Ops Manager Application server in Data Center 2.¶
Issue the following:
Install the Backup Daemon¶
Install and start the Backup Daemon in each data center. See Install Ops Manager for instructions for your operating system.
Bind Groups to Backup Resources¶
In a web browser, open Ops Manager.¶
Create a new Ops Manager group for the first data center.¶
To create a group, select the Administration tab and open the My Groups page. Then, click Add Group and specify the group name.”
Create a second Ops Manager group for the second data center.¶
Open the Admin interface.¶
In Ops Manager, select the Admin link in the upper right.
Configure backup resources.¶
Select the Backup tab and do the following:
- Select the Daemons page and ensure there are two daemons listed.
- Select the Blockstores page. Add a blockstore with the hostname and port of the blockstore for the second data center and click Save.
- Select the Sync Stores page. Add a sync store with the hostname and port of the blockstore for the second data center and click Save.
- Select the Oplog Stores page. Add an oplog store with the hostname and port of the blockstore for the second data center and click Save.
Assign resources to the data centers.¶
Open the General tab, then the Groups page. Select the group you will house in the first data center, and then select the View link for the Backup Configuration.
For each of the following, click the drop-down box and select the local option for the group:
- Backup Daemons
- Sync Stores
- Oplog Stores
- Block Stores
Repeat the above steps for the second group.
Install agents.¶
If you are using Automation, install the Automation Agent for the group in Data Center 1 on each server in Data Center 1. Install the Automation Agent for Data Center 2 on each server in Data Center 2. The Automation Agent will then install Monitoring and Backup agents as needed.
If you are not using Automation, download and install the Monitoring and Backup agents for the group assigned to Data Center 1 by navigating to the Administration and then Agents page while viewing that group in Ops Manager.
Then, switch to the group in Data Center 2 by choosing it from the drop-down menu in the top navigation bar in Ops Manager, and download and install its Monitoring and Backup agents.
See the following pages for the procedures for installing the agents manually: