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.

Snapshot Schedule

This resource allows you to view and configure various properties of snapshot creation and retention for a replica set or cluster. In order to modify this resource, the request must originate from an IP address on the API user’s whitelist.

Operations

  • GET /api/public/v1.0/groups/GROUP-ID/backupConfigs/CLUSTER-ID/snapshotSchedule - Get the snapshot schedule for a cluster. CLUSTER-ID must be the ID of either a replica set or a sharded cluster.
  • PATCH /api/public/v1.0/groups/GROUP-ID/backupConfigs/CLUSTER-ID/snapshotSchedule - Change the parameters of snapshot creation and retention. Any combination of the snapshot schedule’s attributes can be modified.

Sample Entity

{
  "groupId": "xxx",
  "clusterId": "yyy",
  "snapshotIntervalHours": 6,
  "snapshotRetentionDays": 3,
  "clusterCheckpointIntervalMin": 15,
  "dailySnapshotRetentionDays": 14,
  "weeklySnapshotRetentionWeeks": 6,
  "monthlySnapshotRetentionMonths": 12
}

Entity Fields

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 integer Number of hours between snapshots. Supported values are 6, 8, 12, and 24.
snapshotRetentionDays integer Number of days to keep recent snapshots. Supported values are 1 - 5.
clusterCheckpointIntervalMin integer 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.
dailySnapshotRetentionDays integer Number of days to retain daily snapshots. Supported values are 1 - 365.
weeklySnapshotRetentionWeeks integer Number of weeks to retain weekly snapshots. Supported values are 1 - 52.
monthlySnapshotRetentionMonths integer Number of months to retain monthly snapshots. Supported values are 1 - 36.

Examples

Get a Snapshot Schedule

curl -i -u "username:apiKey" --digest "https://mms.mongodb.com/api/public/v1.0/groups/525ec8394f5e625c80c7404a/backupConfigs/53bc556ce4b049c88baec825/snapshotSchedule"

HTTP/1.1 200 OK

{
  "groupId" : "525ec8394f5e625c80c7404a",
  "clusterId" : "53bc556ce4b049c88baec825",
  "snapshotIntervalHours" : 6,
  "snapshotRetentionDays" : 2,
  "dailySnapshotRetentionDays" : 7,
  "weeklySnapshotRetentionWeeks" : 4,
  "monthlySnapshotRetentionMonths" : 13,
  "links": [ ... ]
}

Update a Snapshot Schedule

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

HTTP/1.1 200 OK

{
  "groupId" : "525ec8394f5e625c80c7404a",
  "clusterId" : "53bc556ce4b049c88baec825",
  "snapshotIntervalHours" : 8,
  "snapshotRetentionDays" : 2,
  "dailySnapshotRetentionDays" : 14,
  "weeklySnapshotRetentionWeeks" : 4,
  "monthlySnapshotRetentionMonths" : 6,
  "links": [ ... ]
}