- User Guide >
- Backup Agent >
- Install Backup Agent >
- Install or Update the Backup Agent on Windows
Install or Update the Backup Agent on Windows¶
Overview¶
The On Prem MMS Backup Agent polls the primary MongoDB instance of every backup-enabled replica set and transmits the operations to the On-Prem MongoDB Management Service service.
The Backup Agent relies on the MMS Monitoring Agent to populate the list of sharded clusters and replica sets eligible for backup. If the appropriate hosts are not added, or the Monitoring Agent is not being correctly run, the lists may be incomplete or out-of-date. If you have not already installed and configured On Prem MMS Monitoring, please refer to the Install Monitoring Agent documentation.
Considerations¶
MongoDB Requirements¶
MMS only supports backing up replica sets and sharded cluster, and does not support backing up standalone instances.
MMS only supports backup for replica sets that run MongoDB 2.0 or later.
MMS only supports backup for sharded clusters that run MongoDB 2.4 or later.
All backed up replica sets and config servers must be able to
maintain oplog entries, by default, for at least 3 hours over the
last 24 hour period. This window is configurable with the
brs.minimumReplicationOplogWindowHr
setting in the
conf-mms.properties
file for the MMS Application server.
Agent Architecture¶
To avoid resource contention, run the agent on a host other than the hosts where the MongoDB instances are running. Be sure the agent can access the MongoDB hosts.
Running on Amazon EC2¶
If you run the Backup Agent on Amazon EC2, do not use the t1.micro
instance type, which has a CPU scheduling policy that does not
typically provide sufficient capacity to support a Backup Agent for a
production deployment. Use a larger instance type instead.
Prerequisites¶
Monitoring Agent¶
Install and configure the On Prem MMS Monitoring, as described in the Monitoring Agent documentation.
Firewall¶
If your MongoDB instances operate within a firewall, configure your
network infrastructure to allow outbound connections on port 443
(SSL) to api-backup.mongodb.com
.
Access Control¶
If you use On Prem MMS Backup with a MongoDB deployment that uses authentication, before installing the On Prem MMS Backup Agent, you must create a user in MongoDB with the appropriate access. See Configure Backup Agent for Access Control.
Backup Directory¶
After you install the Backup Agent, do not use the agent’s directory location for anything other than the agent itself. The Backup Agent periodically deletes the contents of its root directory.
Procedures¶
Install the Backup Agent On Windows¶
Download and run the latest version of the Backup Agent MSI file.¶
To download the 64-bit MSI file, use the following URL, where
<mmsUri>
is the hostname of the Backup server:
To download the 32-bit MSI file, use the following URL, where
<mmsUri>
is the hostname of the Backup server:
During installation, the installer prompts you to specify the folder for storing configuration and log files. It is strongly advised that you encrypt or restrict access to this folder.
Retrieve the MMS API key for your MMS group.¶
In the Settings tab on the Backup Agent page, click the box for your operating system. MMS will then display a procedure that includes a step to set your MMS API key. The step displays the actual MMS API key used by your MMS group. Copy the key.
Edit the local.config
file to include your MMS API key.¶
In the directory where you installed the Backup Agent, locate and
open the local.config
file. Enter your API key as the value for the
mmsApiKey
setting.
Edit the local.config
file to include the hostname of the Backup server.¶
Set the mothership
property to hostname of the Backup server.
Start the Backup Agent.¶
In Windows Control Panel
, open Administrative Tools
, and then
open Services
.
In the list of services, select the MMS Backup Agent
service. Select
the Action
menu and select Start
.
Update the Backup Agent on Windows¶
Stop all currently running Backup Agents.¶
In Windows Control Panel
, open Administrative Tools
and then
Services
. In the list of services, select MMS Backup Agent
.
Select the Action
menu and select Stop
.
If you receive a message that your Backup Agent is out of date, make
sure you are running an upgradeable version of the Backup Agent. If
you are running the version of the Backup Agent named
MongoDBBackup
, you must remove it before upgrading. To
check if you are running MongoDBBackup
, issue the following
command in an Administrative command prompt:
If the command returns a result, you must remove the MongoDBBackup
agent. To remove it, issue the following:
Download and run the latest version of the Backup Agent MSI file.¶
To download the 64-bit MSI file, use the following URL, where
<mmsUri>
is the hostname of the Backup server:
To download the 32-bit MSI file, use the following URL, where
<mmsUri>
is the hostname of the Backup server:
During installation, the installer prompts you to specify the folder for storing configuration and log files. It is strongly advised that you encrypt or restrict access to this folder.
Retrieve the MMS API key for your MMS group.¶
In the Settings tab on the Backup Agent page, click the box for your operating system. MMS will then display a procedure that includes a step to set your MMS API key. The step displays the actual MMS API key used by your MMS group. Copy the key.
Edit the local.config
file to include your MMS API key.¶
In the directory where you installed the Backup Agent, locate and
open the local.config
file. Enter your API key as the value for the
mmsApiKey
setting.
Start the Backup Agent.¶
In Windows Control Panel
, open Administrative Tools
, and then
open Services
.
In the list of services, select the MMS Backup Agent
service. Select
the Action
menu and select Start
.
Next Steps¶
After you have successfully installed the Backup Agent, see Activate Backup for a Replica Set to enable backup for a replica set.
Additional Information¶
The README
included with the downloaded package also provides
information about the Backup Agent.
For details about Backup operations, see Backup FAQs.