- Reference >
- Backup Agent >
- Install Backup Agent >
- Install or Update the Backup Agent with
rpm
Packages
Install or Update the Backup Agent with rpm
Packages¶
Overview¶
The Backup Agent polls the primary MongoDB instance of every backup-enabled replica set and transmits the operations to the Ops Manager service.
The Backup Agent relies on the Ops Manager 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 Monitoring, please refer to the Install Monitoring Agent documentation.
Considerations¶
MongoDB Requirements¶
Ops Manager only supports backing up replica sets and sharded cluster, and does not support backing up standalone instances.
Ops Manager only supports backup for replica sets that run MongoDB 2.0 or later.
Ops Manager 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 Ops Manager Application.
See Ops Manager Configuration Files for more information.
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 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 Backup with a MongoDB deployment that uses authentication, before installing the 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¶
This section includes procedures for both installing and updating the
Backup Agent on RHEL, CentOS, SUSE, Amazon Linux, and other systems that
use rpm
packages.
Install the Backup Agent with an rpm
Package¶
Use this procedure to install the agent on RHEL, CentOS, SUSE, Amazon
Linux, and other systems that use rpm
packages.
Download the latest version of the Backup Agent package.¶
Install the Backup Agent package.¶
Issue the following command:
Retrieve the API key for your Ops Manager group.¶
In the Administration tab on the Agent page, click the box for your operating system. Ops Manager will then display a procedure that includes a step to set your API key. The step displays the actual API key used by your Ops Manager group. Copy the key.
Configure the backup-agent.config
file with the API key.¶
In the /etc/mongodb-mms/backup-agent.config
file, set the mmsApiKey
property to your API key.
Optional: For SUSE 11+ deployments only, configure the sslTrustedMMSServerCertificate
property.¶
If you are deploying on SUSE, you must configure the
sslTrustedMMSServerCertificate
setting. All other users should
omit this step.
Enter the following property and value in the
/etc/mongodb-mms/backup-agent.config
file:
Save and close the file.
Start the Backup Agent.¶
Issue the following command:
Update the Backup Agent with an rpm
Package¶
Use this procedure to update the agent on RHEL, CentOS, SUSE, Amazon
Linux, and other systems that use rpm
packages.
Download the latest version of the Backup Agent package.¶
Install the Backup Agent package.¶
Issue the following command:
Start the Backup Agent.¶
Issue the following command:
Next Steps¶
After you have successfully installed the Backup Agent, see Activate Backup 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.