Navigation
This version of the documentation is archived and no longer supported. It will be removed on EOL_DATE. 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.
This version of the manual is no longer supported. It will be removed on EOL_DATE.

Update One Backup Configuration

Note

Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project id. For existing groups, your group/project id remains the same. This page uses the more familiar term group when referring to descriptions. The endpoint remains as stated in the document.

Base URL: https://{OPSMANAGER-HOST}:{PORT}/api/public/v1.0

Resource

PATCH /groups/{GROUP-ID}/backupConfigs/{CLUSTER-ID}

Request Parameters

Request Path Parameters

Name Type Description
GROUP-ID string (Required.) The unique identifier for the group that holds the cluster with the backup configuration you want to change.
CLUSTER-ID string (Required.) The unique indentifier of the cluster whose backup configuration you want to change.

Request Query Parameters

This endpoint may use any of the HTTP request query parameters available to all Ops Manager API resources. These are all optional.

Name Type Description Default
pretty boolean Indicates whether the response body should be in a prettyprint format. false
envelope boolean

Indicates whether or not to wrap the response in an envelope.

Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query.

For endpoints that return one result, the response body includes:

Name Description
status HTTP response code
envelope Expected response body
false

Request Body Parameters

Name Type Description
GROUP-ID string Unique identifier of the group that owns this backup configuration.
CLUSTER-ID string Unique identifier of the cluster that this backup configuration is for.
statusName string

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

  • INACTIVE
  • PROVISIONING
  • STARTED
  • STOPPED
  • TERMINATING
storageEngineName string

The storage engine used for the backup. Possible values are:

  • MEMORY_MAPPED
  • WIRED_TIGER
authMechanismName string

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 (This covers SCRAM-SHA-1, SCRAM-SHA-256, and MONGODB-CR.)
  • GSSAPI
  • PLAIN
  • MONGODB_X509
  • NONE
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.

You can send this field to Ops Manager only when updating the backup configuration for a replica set or sharded cluster that is not managed by Ops Manager Automation.

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. GET requests do not include this field.

You can send this field to Ops Manager only when updating the backup configuration for a replica set or sharded cluster that is not managed by Ops Manager Automation.

encryptionEnabled boolean Specifies whether encryption is enabled for the backup configuration. You must include the syncSource field when enabling encryption for a backup configuration. For existing backups in a group, enabling encryption requires an initial backup sync to recreate the backups’ head databases.
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 collection names to omit from the backup. Each string is a namespace in the form of {database} or {database}.{collection}. If this field is present the includedNamespaces field cannot be present.

You must send the new full list of excluded namespaces, including any that were already listed.

If the new list removes any namespaces from the previous list, you must also set the syncSource field, as the removal of an excluded namespace necessitates a full resync. Without the syncSource field, the request will fail.

If the new list only adds to the previous list, you do not need to set syncSource.

includedNamespaces string array

A list of database names and collection names to include in the backup. Each string is a namespace in the form of {database} or {database}.{collection}. Any namespace not listed in this array will not be backed up. If this field is present the excludedNamespaces field cannot be present.

You must send the new full list of included namespaces, including any that were already listed.

If the new list adds any namespaces to the previous list, you must also set the syncSource field, as the addition of an included namespace necessitates a full resync. Without the syncSource field, the request will fail.

If the new list only removes namespaces from the previous list, you do not need to set syncSource.

Response

Name Type Description
GROUP-ID string Unique identifier of the group that owns this backup configuration.
CLUSTER-ID string Unique identifier of the cluster that this backup configuration is for.
statusName string

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

  • INACTIVE
  • PROVISIONING
  • STARTED
  • STOPPED
  • TERMINATING
storageEngineName string

The storage engine used for the backup. Possible values are:

  • MEMORY_MAPPED
  • WIRED_TIGER
authMechanismName string

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 (This covers SCRAM-SHA-1, SCRAM-SHA-256, and MONGODB-CR.)
  • GSSAPI
  • PLAIN
  • MONGODB_X509
  • NONE
encryptionEnabled boolean Specifies whether encryption is enabled for the backup configuration. You must include the syncSource field when enabling encryption for a backup configuration. For existing backups in a group, enabling encryption requires an initial backup sync to recreate the backups’ head databases.
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 collection names to omit from the backup. Each string is a namespace in the form of {database} or {database}.{collection}. If this field is present the includedNamespaces field cannot be present.

You must send the new full list of excluded namespaces, including any that were already listed.

If the new list removes any namespaces from the previous list, you must also set the syncSource field, as the removal of an excluded namespace necessitates a full resync. Without the syncSource field, the request will fail.

If the new list only adds to the previous list, you do not need to set syncSource.

includedNamespaces string array

A list of database names and collection names to include in the backup. Each string is a namespace in the form of {database} or {database}.{collection}. Any namespace not listed in this array will not be backed up. If this field is present the excludedNamespaces field cannot be present.

You must send the new full list of included namespaces, including any that were already listed.

If the new list adds any namespaces to the previous list, you must also set the syncSource field, as the addition of an included namespace necessitates a full resync. Without the syncSource field, the request will fail.

If the new list only removes namespaces from the previous list, you do not need to set syncSource.

Example Request

curl --user "{username}:{apiKey}" --digest \
 --header "Accept: application/json" \
 --header "Content-Type: application/json" \
 --include --request PATCH "https://{opsManagerHost}:{port}/api/public/v1.0/groups/{GROUP-ID}/backupConfigs/{CLUSTER-ID}" \
 --data '
 {
   "statusName": "STOPPED"
 }'

Example Response

Response Header

HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=ISO-8859-1
Date: {dateInUnixFormat}
WWW-Authenticate: Digest realm="MMS Public API", domain="", nonce="{nonce}", algorithm=MD5, op="auth", stale=false
Content-Length: {requestLengthInBytes}
Connection: keep-alive
HTTP/1.1 200 OK
Vary: Accept-Encoding
Content-Type: application/json
Strict-Transport-Security: max-age=300
Date: {dateInUnixFormat}
Connection: keep-alive
Content-Length: {requestLengthInBytes}

Response Body

{
  "clusterId" : "{CLUSTER-ID}",
  "excludedNamespaces" : [ ],
  "groupId" : "{GROUP-ID}",
  "links" : [],
  "sslEnabled" : false,
  "statusName" : "STOPPED",
  "storageEngineName" : "WIRED_TIGER"
}