Navigation

Get One Cloud Backup Restore Job

Note

Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project ID. For existing groups, your group/project ID remains the same. The resource and corresponding endpoints use the term groups.

The Atlas API uses HTTP Digest Authentication. Provide a programmatic API public key and corresponding private key as the username and password when constructing the HTTP request.

For complete documentation on configuring API access for an Atlas project, see Configure Atlas API Access.

Base URL: https://cloud.mongodb.com/api/atlas/v1.0

Syntax

GET /groups/{PROJECT-ID}/clusters/{CLUSTER-NAME}/backup/restoreJobs/{RESTORE-JOB-ID}

Request Path Parameters

Path Element Description
PROJECT-ID Unique identifier of the project for the Atlas cluster.
CLUSTER-NAME Name of the Atlas cluster from which you want to retrieve the restore job.
RESTORE-JOB-ID Unique identifier of the restore job to retrieve.

Request Query Parameters

The following query parameters are optional:

Query Parameter Type Description Default
pretty boolean Displays response in a prettyprint format. false
envelope boolean Specifies whether or not to wrap the response in an envelope. false

Request Body Parameters

This endpoint does not use HTTP request body parameters.

Response

Name Type Description
cancelled boolean Flag indicating whether the restore job was canceled.
createdAt string Timestamp in ISO 8601 date and time format in UTC when Atlas created the restore job.
deliveryType string

Type of restore job to create. Possible values are:

Job Type Action
automated Atlas restores the snapshot corresponding to the snapshotId to the Atlas cluster corresponding to the name targetClusterName in the Atlas project corresponding to the targetGroupId.
download

Atlas generates and displays a URL to download a .tar.gz of the snapshot corresponding to the snapshotId. The contents of the tar.gz archive contain the data files for your Atlas cluster.

See also

To learn more about manually restoring the downloaded data files, see Procedure.

Download Limitations

Each cloud backup can have one download at a time, and each project can have a maximum of 20 downloads at a time.

pointInTime Atlas performs a Continuous Cloud Backup restore.
deliveryUrl array of strings

One or more URLs for the compressed snapshot files for manual download. Returned when "deliveryType" : "download".

Note

If empty, Atlas is processing the restore job. Use the Get All Cloud Backup Restore Jobs endpoint periodically check for a deliveryUrl download value for the restore job.

expired boolean Flag indicating whether the restore job expired.
expiresAt integer Timestamp in ISO 8601 date and time format in UTC when the restore job expires.
failed boolean Flag indicating whether the restore job failed.
finishedAt integer Timestamp in ISO 8601 date and time format in UTC when the restore job completed.
id string Unique identifier of the restore job.
links array of objects One or more links to sub-resources and/or related resources. The relation-types between URLs are explained in the Web Linking Specification.
oplogTs integer Timestamp in the number of seconds that have elapsed since the UNIX epoch from which to you want to restore this snapshot. This is the first part of an Oplog timestamp. Returned when "deliveryType" : "pointInTime" and "oplogTs" > 0.
oplogInc integer Oplog operation number from which to you want to restore this snapshot. This is the second part of an Oplog timestamp. Returned when "deliveryType" : "pointInTime" and "oplogTs" > 0.
pointInTimeUTCSeconds integer Timestamp in the number of seconds that have elapsed since the UNIX epoch from which Atlas restored this snapshot. Returned when "deliveryType" : "pointInTime" and "pointInTimeUTCSeconds" > 0.
snapshotId string Unique identifier of the source snapshot ID of the restore job. Returned when "deliveryType" : "automated" or "deliveryType" : "download".
targetGroupId string Name of the target Atlas project of the restore job. Returned when "deliveryType" : "automated".
targetClusterName string Name of the target Atlas cluster to which the restore job restores the snapshot. Returned when "deliveryType" : "automated".
timestamp string Timestamp in ISO 8601 date and time format in UTC when the snapshot associated to snapshotId was taken.

Example Request

curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest --include \
     --header "Accept: application/json" \
     --header "Content-Type: application/json" \
     --request GET "https://cloud.mongodb.com/api/atlas/v1.0/groups/{PROJECT-ID}/clusters/{CLUSTER-NAME}/backup/restoreJobs/{RESTORE-JOB-ID}"

Example Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  "cancelled": false,
  "deliveryType": "automated",
  "expired": false,
  "expiresAt": "2018-08-02T02:08:48Z",
  "failed" : false,
  "id": "{RESTORE-JOB-ID}",
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/{PROJECT-ID}/clusters/{CLUSTER-NAME}/backup/restoreJobs/{RESTORE-JOB-ID}",
      "rel": "self"
    },
    {
      "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/{PROJECT-ID}/clusters/{CLUSTER-NAME}/backup/snapshots/{SNAPSHOT-ID}",
      "rel": "http://mms.mongodb.com/snapshot"
    },
    {
      "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/{PROJECT-ID}/clusters/{CLUSTER-NAME}",
      "rel": "http://mms.mongodb.com/cluster"
    },
    {
      "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/{PROJECT-ID}",
      "rel": "http://mms.mongodb.com/group"
    }
  ],
  "snapshotId": "{SNAPSHOT-ID}",
  "targetClusterName": "MyOtherCluster",
  "targetGroupId": "{PROJECT-ID}",
  "timestamp": "2018-08-01T20:02:07Z"
}