- API >
- Public API Resources >
- Restore Jobs
Restore Jobs¶
On this page
This resource allows you to manage restore jobs. A restore job is essentially a
request to retrieve one of your existing snapshots, or a snapshot for a recent
specific point-in-time, in order to restore a mongod
to a previous state.
In order to initiate a restore job, the request must originate from an IP
address on the API user’s whitelist.
Operations¶
- Get all restore jobs for a cluster.
CLUSTER-ID
must be the ID of either a replica set or a sharded cluster.
- Get all restore jobs in the specified batch. When creating a restore job for a sharded cluster, Ops Manager creates a separate job for each shard, plus another for the config server. Each of those jobs will be part of a batch. A restore job for a replica set, however, will not be part of a batch.
- Get a single restore job.
- Create a restore job for the specified
CLUSTER-ID
. You can create a restore job for either an existing snapshot or for a specific recent point-in-time. (The recency depends on the size of your “point-in-time window.”) See below for examples of each. The response body includes an array of restore jobs. When requesting a restore of a replica set, the array will contain a single element. For a sharded cluster, the array will contain one element for each shard, plus one for the config server. Each element will also include thebatchId
representing the batch to which the jobs belong.
Sample Entity¶
Entity Fields¶
Name | Type | Description |
---|---|---|
groupId | string | ID of the group that owns the restore job. |
clusterId | string | ID of the cluster represented by the restore job. |
snapshotId | string | ID of the snapshot to restore. |
batchId | string | ID of the batch to which this restore job belongs. Only present for a restore of a sharded cluster. |
created | timestamp | When the restore job was requested. |
timestamp | BSON timestamp | Timestamp of the latest oplog entry in the restored snapshot. |
statusName | enum | Current status of the job. Possible values are:
|
pointInTime | boolean | Is this job for a point-in-time restore? |
delivery | object | Additional details about how the restored snapshot data will be delivered. |
delivery.methodName | enum | How the data will be delivered. Possible values are:
|
delivery.url | string | The URL from which the restored snapshot data can be downloaded. Only
present if delivery.methodName is HTTP . |
delivery.expires | timestamp | Date after which the URL will no longer be available. Only present if
delivery.methodName is HTTP . |
delivery.statusName | enum | Current status of the downloadable file. Only present if
|
hashes | object array | If the corresponding delivery.url has been downloaded, each
document in this array is a mapping of a restore file to a hashed
checksum. This array is present only after the file is
downloaded. |
hashes.typeName | enum | The hashing algorithm used to compute the hash value. Possible values are:
|
hashes.fileName | string | The name of the file that has been hashed. |
hashes.hash | string | The hash of the file. |
Links¶
Relation | Description |
---|---|
self | Me |
cluster | The cluster to restore. |
snapshot | The snapshot to restore. |
group | The group that owns the cluster. |