Navigation

Update the Snapshot Schedule

Syntax

PATCH /api/public/v1.0/groups/{GROUP-ID}/backupConfigs/{CLUSTER-ID}/snapshotSchedule

Request Parameters

Request Path Parameters

Parameter Required/Optional Description
GROUP-ID Required. The unique identifier for the group that holds the cluster with the snapshot schedule you want to update.
CLUSTER-ID Required. The unique indentifier of the cluster whose snapshot schedule you want to update.

Request Query Parameters

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

Name Type Description Default
pageNum integer Page number (1-based). 1
itemsPerPage integer Maximum number of items to return, up to a maximum of 100. 100
pretty boolean Display response in human-readable format. false

Request Body Parameters

Name Type Description
groupId string ID of the group that owns the backup configuration.
clusterId string ID of the cluster to which this backup configuration applies.
snapshotIntervalHours number Number of hours between snapshots. Supported values are 6, 8, 12, and 24.
snapshotRetentionDays number Number of days to keep recent snapshots. Supported values are 2 - 5.
clusterCheckpointIntervalMin number Number of minutes between successive cluster checkpoints. This only applies to sharded clusters. This number determines the granularity of point-in-time restores for sharded clusters. Supported values are 15, 30, and 60.
dailySnapshotRetentionDays number

Number of days to retain daily snapshots. Supported values are 0, 3, 4, 5, 6, 7, 15, 30, 60, 90, 120, 180, 360.

Note

If you set dailySnapshotRetentionDays to 0, this rule is disabled.

weeklySnapshotRetentionWeeks number

Number of weeks to retain weekly snapshots. Supported values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 20, 24, and 52.

Note

If you set weeklySnapshotRetentionWeeks to 0, this rule is disabled.

monthlySnapshotRetentionMonths number

Number of months to retain monthly snapshots. Supported values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 18, 24, and 36.

Note

If you set monthlySnapshotRetentionMonths to 0, this rule is disabled.

pointInTimeWindowHours number Number of hours in the past for which a point-in-time snapshot can be created. You cannot change this value for a snapshot.
links string array
Relation Description
self Me
http://cloud.mongodb.com/cluster The cluster that this backup configuration is for.
http://cloud.mongodb.com/group The group that owns this backup configuration.
http://cloud.mongodb.com/backupConfig The backup configuration that this schedule belongs to.

Response Elements

Name Type Description
groupId string ID of the group that owns the backup configuration.
clusterId string ID of the cluster to which this backup configuration applies.
snapshotIntervalHours number Number of hours between snapshots. Supported values are 6, 8, 12, and 24.
snapshotRetentionDays number Number of days to keep recent snapshots. Supported values are 2 - 5.
clusterCheckpointIntervalMin number Number of minutes between successive cluster checkpoints. This only applies to sharded clusters. This number determines the granularity of point-in-time restores for sharded clusters. Supported values are 15, 30, and 60.
dailySnapshotRetentionDays number Number of days to retain daily snapshots. Supported values are 0, 3, 4, 5, 6, 7, 15, 30, 60, 90, 120, 180, 360.
weeklySnapshotRetentionWeeks number Number of weeks to retain weekly snapshots. Supported values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 20, 24, and 52.
monthlySnapshotRetentionMonths number Number of months to retain monthly snapshots. Supported values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 18, 24, and 36.
pointInTimeWindowHours number Number of hours in the past for which a point-in-time snapshot can be created. You cannot change this value for a snapshot.
links string array
Relation Description
self Me
http://cloud.mongodb.com/cluster The cluster that this backup configuration is for.
http://cloud.mongodb.com/group The group that owns this backup configuration.
http://cloud.mongodb.com/backupConfig The backup configuration that this schedule belongs to.

Examples

Example Request

curl -i -u "{username}:{apiKey}" -H "Content-Type: application/json" --digest -X PATCH "https://cloud.mongodb.com/api/public/v1.0/groups/525ec8394f5e625c80c7404a/backupConfigs/53bc556ce4b049c88baec825/snapshotSchedule" --data '
{
  "snapshotIntervalHours": 8,
  "dailySnapshotRetentionDays": 15,
  "monthlySnapshotRetentionMonths": 6
}'

Example Response

HTTP/1.1 200 OK
{
  "groupId" : "525ec8394f5e625c80c7404a",
  "clusterId" : "53bc556ce4b049c88baec825",
  "snapshotIntervalHours" : 8,
  "snapshotRetentionDays" : 2,
  "dailySnapshotRetentionDays" : 15,
  "weeklySnapshotRetentionWeeks" : 4,
  "monthlySnapshotRetentionMonths" : 6,
  "pointInTimeWindowHours": 24,
  "links": [ ... ]
}