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.

Endpoints

Get the Snapshot Schedule

Get the snapshot schedule for a cluster. CLUSTER-ID must be the ID of either a replica set or a sharded cluster.

GET /api/public/v1.0/groups/GROUP-ID/backupConfigs/CLUSTER-ID/snapshotSchedule

Update the Snapshot Schedule

Change the parameters of snapshot creation and retention. Any combination of the snapshot schedule’s attributes can be modified.

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

Sample Entity

{
  "groupId": "525ec8394f5e625c80c7404a",
  "clusterId": "5640e0cbe4b012df7a3fe85a",
  "snapshotIntervalHours": 6,
  "snapshotRetentionDays": 3,
  "clusterCheckpointIntervalMin": 15,
  "dailySnapshotRetentionDays": 14,
  "weeklySnapshotRetentionWeeks": 6,
  "monthlySnapshotRetentionMonths": 12,
  "pointInTimeWindowHours": 24
}

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 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 1 - 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, or 60.
dailySnapshotRetentionDays number Number of days to retain daily snapshots. Supported values are 1 - 365.
weeklySnapshotRetentionWeeks number Number of weeks to retain weekly snapshots. Supported values are 1 - 52.
monthlySnapshotRetentionMonths number Number of months to retain monthly snapshots. Supported values are 1 - 36.
pointInTimeWindowHours number The number of hours in the past for which a point-in-time snapshot can be created.

Examples

Get a Snapshot Schedule

curl -i -u "username:apiKey" --digest "https://cloud.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,
  "pointInTimeWindowHours": 24,
  "links": [ ... ]
}

Update a Snapshot Schedule

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": 14,
  "monthlySnapshotRetentionMonths": 6
}'

HTTP/1.1 200 OK

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