Navigation
This version of the documentation is archived and no longer supported. To learn how to upgrade your version of MongoDB Ops Manager, refer to the upgrade documentation.
You were redirected from a different version of the documentation. Click here to go back.

Backup Configurations

The resource modification operation PATCH only accepts requests from whitelisted IP addressses. You can only modify a backup configuration if the request originates from an IP address on the API user’s whitelist.

Operations

  • GET /api/public/v1.0/groups/GROUP-ID/backupConfigs/CLUSTER-ID - Get a single backup configuration by cluster ID. CLUSTER-ID must be the ID of either a replica set or a sharded cluster.

  • GET /api/public/v1.0/groups/GROUP-ID/backupConfigs - Get all backup configurations for a group.

  • PATCH /api/public/v1.0/groups/GROUP-ID/backupConfigs/CLUSTER-ID - Request a state change to an existing backup configuration. Note that these changes are generally asynchronous and will result in a response status code of 202 (Accepted). Additionally, if you issue a GET request for a backup configuration after a successful PATCH, the returned entity may not immediately reflect the update given the asynchronous nature of these state transitions.

    When modifying the statusName property, these are the acceptable transitions:

    • STARTED - Only valid if the current status is STOPPED or INACTIVE.
    • STOPPED - Only valid if the current status is STARTED.
    • TERMINATING - Only valid if the current status is STOPPED.
    • You cannot change the statusName to these values: INACTIVE PROVISIONING.

Sample Entity

{
  "groupId": "xxx",
  "clusterId": "yyy",
  "statusName": "STARTED",
  "authMechanismName": "MONGODB_CR",
  "username": "johnny5",
  "password": "guess!",
  "sslEnabled": false,
  "syncSource": "PRIMARY",
  "provisioned": true,
  "excludedNamespaces": [ "a", "b", "c.d" ]
}

Entity Fields

Name Type Description
groupId string ID of the group that owns this backup configuration.
clusterId string ID of the cluster that this backup configuration is for.
statusName enum

The current (or desired) status of the backup configuration. Possible values are:

  • INACTIVE
  • PROVISIONING
  • STARTED
  • STOPPED
  • TERMINATING
authMechanismName enum

The name of the authentication mechanism to use when connecting to the sync source database. Only present when using authentication. Possible values are:

  • MONGODB_CR
  • GSSAPI
username string The username to use to connect to the sync source database. Only present when backing up mongod instances that require clients to authenticate.
password string The password to use to connect to the sync source database. Only present when backup the mongod instances that require clients to authenticate. You may only send this field to Ops Manager when updating backup configuration. GET request do not include this field.
sslEnabled boolean Is SSL enabled for the sync source database?
syncSource string The mongod instance to get backup data from. Possible values are either a specific hostname or one of: PRIMARY and SECONDARY. This field is only used when updating a backup configuration. It is not returned by a GET request.
provisioned boolean Reports if Ops Manager has provisioned the resources needed to store a backup. This field is only present when the amount of data to be backed up exceeds a certain threshold.
excludedNamespaces string array A list of database names and/or collection names that to omit from the back up. If a string has a dot (e.g. .), then it is a fully qualified namespace in the form of <database>.<collection>, otherwise strings are database names.

Examples

Get a Single Backup Configuration

curl -i -u "username:apiKey" --digest "https://mms.mongodb.com/api/public/v1.0/groups/5196d3628d022db4cbc26d9e/backupConfigs/5196e5b0e4b0fca9cc88334a"

HTTP/1.1 200 OK

{
  "groupId" : "5196d3628d022db4cbc26d9e",
  "clusterId" : "5196e5b0e4b0fca9cc88334a",
  "statusName" : "STARTED",
  "sslEnabled" : false,
  "excludedNamespaces" : [ ],
  "links" : [ ... ]
}

Get All Backup Configurations for a Group

curl -i -u "username:apiKey" --digest "https://mms.mongodb.com/api/public/v1.0/groups/5196d3628d022db4cbc26d9e/backupConfigs"

HTTP/1.1 200 OK

{
  "totalCount" : 3,
  "results" : [ {
    "groupId" : "5196d3628d022db4cbc26d9e",
    "clusterId" : "5196e5b0e4b0fca9cc88334a",
    "statusName" : "STARTED",
    "sslEnabled" : false,
    "excludedNamespaces" : [ ],
    "links" : [ ... ]
  }, {
    "groupId" : "5196d3628d022db4cbc26d9e",
    "clusterId" : "51a2ac88e4b0371c2dbf46ea",
    "statusName" : "STARTED",
    "sslEnabled" : false,
    "excludedNamespaces" : [ ],
    "links" : [ ... ]
  }, {
    "groupId" : "5196d3628d022db4cbc26d9e",
    "clusterId" : "52d33abee4b0ca49bc6acd6c",
    "statusName" : "STOPPED",
    "sslEnabled" : false,
    "excludedNamespaces" : [ ],
    "links" : [ ... ]
  } ],
  "links" : [ ... ]
}

Update a Backup Configuration

curl -i -u "username:apiKey" -H "Content-Type: application/json" --digest -X PATCH "https://mms.mongodb.com/api/public/v1.0/groups/5196d3628d022db4cbc26d9e/backupConfigs/5196e5b0e4b0fca9cc88334a" --data '
{
  "statusName": "STOPPED"
}'

HTTP/1.1 202 Accepted

{
  "groupId" : "5196d3628d022db4cbc26d9e",
  "clusterId" : "5196e5b0e4b0fca9cc88334a",
  "statusName" : "STOPPED",
  "sslEnabled" : false,
  "excludedNamespaces" : [ ],
  "links" : [ ... ]
}