Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11539

Update Backup Restore through the API Tutorial for OM versions 3.2 and 2.0

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.2.13, 2.0-beta4
    • Fix Version/s: None
    • Component/s: Ops Manager
    • Labels:
    • Last comment by Customer:
      true
    • Sprint:
      KANBAN BUCKET

      Description

      Fell out of DOCSP-1845. That ticket updated this tutorial to recommend using the automated restore method for versions 3.6 of OM and master of CM (no versioning of CM). This ticket will contain the fix described below, but only for OM 3.4 and 2.0.

      This issue is present in the documentation for Ops Manager 3.6, 3.4 and 2.0 affecting all these versions.

      *Issue*
      The following documentation on Automate Backup Restoration through the API does not consider in step 2: Create a restore job for the snapshot that the maximum number of downloads for the snapshot will be limited to 1.
      As a consequence of this, when the automationConfig gets updated in step 5 to be then pushed in step 6 the restore *won't work* as the maximum number of downloads will be reached.

      Below you will find the example output obtained when executing the API call documented in step 2:

      curl -i -u "username:apiKey" -H "Content-Type: application/json" --digest -X POST "http://<url>/api/public/v1.0/groups/<group_id>/clusters/<cluster_id>/restoreJobs" --data '
      {
        "snapshotId": "<snapshot_id>"
      }'
      

      Results in:

      ...
      results": [
              {
                  "clusterId": "5a8585ec9f0df71e682ef3c5",
                  "created": "2018-02-15T13:37:48Z",
                  "delivery": {
                      "expirationHours": 1,
                      "maxDownloads": 1,
                      "methodName": "HTTP",
                      "statusName": "NOT_STARTED"
                  },
                  "encryptionEnabled": false,
                  "groupId": "5a8582f09f0df71e682ef23c",
                  "id": "5a858d2c9f0df71e682f084f",
                  "links": [
                      {
                          "href": "http://192.168.1.100:8080/api/public/v1.0/groups/5a8582f09f0df71e682ef23c/clusters/5a8585ec9f0df71e682ef3c5/restoreJobs/5a858d2c9f0df71e682f084f",
                          "rel": "self"
                      }
                  ],
                  "pointInTime": false,
                  "snapshotId": "5a8588279f0df71f993c6288",
                  "statusName": "IN_PROGRESS",
                  "timestamp": {
                      "date": "2018-02-15T13:15:15Z",
                      "increment": 1
                  }
              }
          ]
      ...
      

      *Proposed solution*
      Change the current call in step 2 to the following:

      curl -i -u "username:apiKey" -H "Content-Type: application/json" --digest -X POST "http://<url>/api/public/v1.0/groups/<group_id>/clusters/<cluster_id>/restoreJobs" --data '
      {
        "delivery":{"maxDownloads":<number_of_replica_set_members>}
        "snapshotId": "<snapshot_id>"
      }'
      

      Where the value for delivery.maxDownloads should match the number of data bearing members of the destination Replica Set.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rob.justice Robert Justice (Inactive)
              Reporter:
              rob.justice Robert Justice (Inactive)
              Participants:
              Last commenter:
              Robert Justice Robert Justice (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since reply:
                3 years, 27 weeks, 2 days ago
                Date of 1st Reply: