Navigation

mongocli cloud-manager backup checkpoints list

The backup checkpoints list command retrieves the list of checkpoints for the specified cluster. Checkpoints are additional restore points for sharded clusters at points in time between regular snapshots. You can also view the list of checkpoints through the MongoDB Cloud Manager UI or API.

mongocli cloud-manager|cm backup checkpoints list|ls <cluster-id>
[ --output|-o <output-format> ]
[ --profile|-P <profile-name> ]
[ --projectId <project-ID> ]
Note

Use -h or --help to view the command-line help for this command.

Option
Type
Description
Required?
<cluster-id>
string
ID of the cluster.
yes
--output, -o
string

Command output format. Valid values are:

  • json for output in JSON format
  • go-template for custom output using the Go template
  • go-template-file for custom output specified using the Go template file

If omitted, the command returns output in the default format.

no
--profile, -P
string
Name of the profile where the project ID and the Programmatic API Keys for the project are saved. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI.
no
--projectId
string

Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable.

no

The command prints the following fields in the specified format to the terminal if the command succeeds. If the command prints an error, see Troubleshooting for recommended solutions.

The response JSON document includes an array of result objects, an array of link objects, and a count of the total number of result objects retrieved.

Name
Type
Description
results
object array
Includes one object for each item detailed in the results array.
links
object array
Includes one or more links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification.
totalCount
number
Count of the total number of items in the result set.
Name
Type
Description
clusterId
string
The ID of the cluster containing the checkpoint.
completed
BSON timestamp
The point in time the checkpoint completed and the balancer restarted.
groupId
string
The unique identifier of the project that owns the checkpoint.
id
string
The checkpoint ID.
links
array of objects
An array of links to sub-resources and/or related resources. The relations between URLs are explained in the Web Linking Specification.
parts
array of objects
The individual parts that comprise the complete checkpoint. There will be one element for each shard plus one element for the config servers.
parts[i].replicaSetName
string
The name of the replica set. Not present for config servers.
parts[i].shardName
string
The name of the shard.
parts[i].tokenDiscovered
Boolean
Indicates whether the token exists.
parts[i].tokenTimestamp
document

The timestamp of the checkpoint token entry in the oplog, as specified by the entry’s ts field. The ts field is a BSON timestamp and has two components:

  • timestamp: the value in seconds since the Unix epoch
  • increment: an incrementing ordinal for operations within a given second
parts[i].typeName
string

The type of server represented by the part. Possible values are:

  • REPLICA_SET, which indicates the part is a shard.
  • CONFIG_SERVER
restorable
Boolean
Indicates whether the checkpoint can be used for a restore.
started
BSON timestamp
The point in time Atlas stopped the balancer and began the checkpoint.
timestamp
BSON timestamp
The point in time the checkpoint restores to.

The following example uses the mongocli cloud-manager backup checkpoints list command to retrieve the list of snapshots for the cluster named myDemo. The command uses the default profile where the project ID and the Programmatic API Keys are stored.

mongocli cloud-manager backups checkpoints list 6b8cd61180eef547110159d9 --output json

The command prints the following fields to the terminal. To learn more about these fields, see Output.

{
"links":[
{
"href":"https://cloud.mongodb.com/api/public/v1.0/groups/6b8cd3c380eef5349ef77gf7/clusters/Cluster0/backupCheckpoints?pageNum=1&itemsPerPage=100",
"rel":"self"
}
],
"results":[
{
"clusterId":"6b8cd61180eef547110159d9",
"completed":"2018-02-08T23:20:25Z",
"groupId":"6b8cd3c380eef5349ef77gf7",
"id":"5a7cdb3980eef53de5bffdcf",
"links":[
{
"href":"https://cloud.mongodb.com/api/public/v1.0/groups/6b8cd3c380eef5349ef77gf7/clusters/Cluster0/backupCheckpoints",
"rel":"self"
}
],
"parts":[
{
"replicaSetName":"Cluster0-shard-1",
"shardName":"Cluster0-shard-1",
"tokenDiscovered":true,
"tokenTimestamp":{
"date":"2018-02-08T23:20:25Z",
"increment":1
},
"typeName":"REPLICA_SET"
},
{
"replicaSetName":"Cluster0-shard-0",
"shardName":"Cluster0-shard-0",
"tokenDiscovered":true,
"tokenTimestamp":{
"date":"2018-02-08T23:20:25Z",
"increment":1
},
"typeName":"REPLICA_SET"
},
{
"replicaSetName":"Cluster0-config-0",
"tokenDiscovered":true,
"tokenTimestamp":{
"date":"2018-02-08T23:20:25Z",
"increment":2
},
"typeName":"CONFIG_SERVER_REPLICA_SET"
}
],
"restorable":true,
"started":"2018-02-08T23:20:25Z",
"timestamp":"2018-02-08T23:19:37Z"
},
{
"clusterId":"6b8cd61180eef547110159d9",
"completed":"2018-02-09T14:50:33Z",
"groupId":"6b8cd3c380eef5349ef77gf7",
"id":"5a7db53987d9d64fe298ff46",
"links":[
{
"href":"https://cloud.mongodb.com/api/public/v1.0/groups/6b8cd3c380eef5349ef77gf7/clusters/Cluster0/backupCheckpoints?pretty=true",
"rel":"self"
}
],
"parts":[
{
"replicaSetName":"Cluster0-shard-1",
"shardName":"Cluster0-shard-1",
"tokenDiscovered":true,
"tokenTimestamp":{
"date":"2018-02-09T14:50:33Z",
"increment":1
},
"typeName":"REPLICA_SET"
},
{
"replicaSetName":"Cluster0-shard-0",
"shardName":"Cluster0-shard-0",
"tokenDiscovered":true,
"tokenTimestamp":{
"date":"2018-02-09T14:50:33Z",
"increment":2
},
"typeName":"REPLICA_SET"
},
{
"replicaSetName":"Cluster0-config-0",
"tokenDiscovered":true,
"tokenTimestamp":{
"date":"2018-02-09T14:50:33Z",
"increment":4
},
"typeName":"CONFIG_SERVER_REPLICA_SET"
}
],
"restorable":true,
"started":"2018-02-09T14:50:33Z",
"timestamp":"2018-02-09T14:50:18Z"
},
{
...
}
],
"totalCount":61
}
Give Feedback