Skip to content

Conversation

@andreaangiolillo
Copy link
Collaborator

@andreaangiolillo andreaangiolillo commented Dec 18, 2024

Proposed changes

Jira ticket: CLOUDP-285953

This PR updates atlas backup restores get to support flex clusters.

Flex Cluster
./bin/atlas backup restore get 676199f379377141139ad79c --clusterName ClusterFlex -P prod -o json                                   
{
  "deliveryType": "RESTORE",
  "expirationDate": "2024-12-17T21:34:11Z",
  "id": "676199f379377141139ad79c",
  "instanceName": "ClusterFlex",
  "projectId": "663268874ddd3b236fd2f107",
  "restoreFinishedDate": "2024-12-17T15:35:01Z",
  "restoreScheduledDate": "2024-12-17T15:34:11Z",
  "snapshotFinishedDate": "2024-12-16T11:58:50Z",
  "snapshotId": "6760158f52708c22437edb7a",
  "status": "COMPLETED",
  "targetDeploymentItemName": "ClusterFlex",
  "targetProjectId": "663268874ddd3b236fd2f107"
}
 ./bin/atlas backup restore get 676199f379377141139ad79c --clusterName ClusterFlex -P prod                                            
 ID                         SNAPSHOT                   CLUSTER       TYPE      EXPIRES AT                      URLs
676199f379377141139ad79c   6760158f52708c22437edb7a   ClusterFlex   RESTORE   2024-12-17 21:34:11 +0000 UTC
Dedicated Cluster
./bin/atlas backup restore get 6762b574ac7a500609061084 --clusterName ClusterDedicated -P prod -o json                                  
{
  "cancelled": false,
  "deliveryType": "pointInTime",
  "deliveryUrl": [],
  "desiredTimestamp": {
    "date": "2024-12-17T12:00:00Z",
    "increment": 0
  },
  "expired": false,
  "failed": false,
  "id": "6762b574ac7a500609061084",
  "links": [
    {
      "href": "https://cloud.mongodb.com/api/atlas/v2/groups/663268874ddd3b236fd2f107/clusters/ClusterFlex1/backup/restoreJobs/6762b574ac7a500609061084",
      "rel": "self"
    },
    {
      "href": "https://cloud.mongodb.com/api/atlas/v2/groups/663268874ddd3b236fd2f107/clusters/ClusterFlex1/backup/snapshots/676145dc6af0b746ef72aaec",
      "rel": "https://cloud.mongodb.com/snapshot"
    },
    {
      "href": "https://cloud.mongodb.com/api/atlas/v2/groups/663268874ddd3b236fd2f107/clusters/ClusterFlex1",
      "rel": "https://cloud.mongodb.com/cluster"
    },
    {
      "href": "https://cloud.mongodb.com/api/atlas/v2/groups/663268874ddd3b236fd2f107",
      "rel": "https://cloud.mongodb.com/group"
    }
  ],
  "snapshotId": "676145dc6af0b746ef72aaec",
  "targetClusterName": "ClusterDedicated",
  "targetGroupId": "663268874ddd3b236fd2f107",
  "timestamp": "2024-12-17T09:37:50Z"
}
./bin/atlas backup restore get 6762b574ac7a500609061084 --clusterName ClusterDedicated -P prod                                        
ID                         SNAPSHOT                   CLUSTER        TYPE          EXPIRES AT   URLs
6762b574ac7a500609061084   676145dc6af0b746ef72aaec   ClusterDedicated   pointInTime   <nil>

@andreaangiolillo andreaangiolillo changed the title CLOUDP-285953: add support for flex clusters to "atlas backup restore… CLOUDP-285953: add support for flex clusters to atlas backup restores get Dec 18, 2024
@andreaangiolillo andreaangiolillo marked this pull request as ready for review December 18, 2024 11:52
@andreaangiolillo andreaangiolillo requested a review from a team as a code owner December 18, 2024 11:52
@apix-bot
Copy link
Contributor

apix-bot bot commented Dec 18, 2024

Coverage Report 📈

Branch Commit Coverage
CLOUDP-287238_flex_cluster_feature_branch 7db2572 38.5%
CLOUDP-285953 064c0d8 38.6%
Difference .1%

Copy link
Collaborator

@blva blva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andreaangiolillo andreaangiolillo merged commit 52e5b1a into CLOUDP-287238_flex_cluster_feature_branch Dec 18, 2024
20 checks passed
@andreaangiolillo andreaangiolillo deleted the CLOUDP-285953 branch December 18, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants