- Reference >
- Backup Agent >
- Configure Backup Agent for Access Control >
- Configure Backup Agent for MONGODB-CR
Configure Backup Agent for MONGODB-CR¶
If your MongoDB deployment enforces access control, the Ops Manager Backup Agent must authenticate to MongoDB as a user with the proper access.
To authenticate using MONGODB-CR
, create a user in the admin
database with the appropriate roles in MongoDB.
MongoDB user roles are separate from Ops Manager user roles and are described in the MongoDB manual beginning with the Authorization page.
Considerations¶
To authenticate to sharded clusters, create shard-local users on each shard and create cluster-wide users:
- Create cluster users while connected to the mongos; these credentials persist to the config servers.
- Create shard-local users by connecting directly to the replica set for each shard.
Prerequisites¶
Connect to the mongod or mongos instance as a user with access to create users in the database. See db.createUser() method page for more information.
3.0 and Later¶
To backup MongoDB instances running 3.0 and later, create a user in
the admin
database with an operation that resembles the following:
See Access Control for MongoDB 3.0 for more information on the required access.
MongoDB 2.6¶
To backup MongoDB 2.6 release series instances, create a user in the
admin
database with an operation that resembles the following:
See Access Control for MongoDB 2.6 for more information on the required access.
MongoDB 2.4¶
To backup MongoDB 2.4 release series instances, create a user in the
admin
database with an operation that resembles the following:
See Access Control for MongoDB 2.4 for more information on the required access.
Host Settings¶
In addition to adding the agent as a MongoDB user, you must also specify the host’s authentication settings. You can specify the host’s authentication settings when adding the host, or you can edit the settings for an existing host.