ansible-powermax icon indicating copy to clipboard operation
ansible-powermax copied to clipboard

[QUESTION]: Is it possible to restore from a storage group snapshot?

Open calebdonald opened this issue 1 year ago • 3 comments

How can the Team help you today?

I am working with snapshots on PowerMax (Unisphere Version 9.2.4.3). I am unable to find any mention of restoring from a storage group snapshot. I am able to take and delete snapshots with the dellemc.powermax.snapshot module without issue, but I need to be able to restore from a snapshot. I don't see any option to do this with any of the modules in this collection.

I am able to restore from snapshot within the GUI, but that's not ideal for my situation. Details: ?

calebdonald avatar Jun 04 '24 19:06 calebdonald

Caleb, looks like this functionality was not included in the modules, we can certainly look at adding in the future, in the mean time if you need to do this with ansible you can use the URI module and issue the restore with REST call directly

- name: restore stnapshot
  uri:
    url: "https://{{ unispherehost }}:8443/univmax/restapi/{{ universion}}/replication/symmetrix/{{array_serial}}/storagegroup//storagegroup/{{storageGroupId}}/snapshot/{{snapshotId}}/snapid/{{snapId}}"
    validate_certs: false
    user: "{{ user }}"
    password: "{{ password }}"
    timeout: 200
    headers:
      Content-Type: "application/json"
    method: PUT
    body_format: json
    body: {
      "action": "Restore"
    }
    status_code:
      - 200
      - 201
  register: response
  changed_when: true
  ignore_errors: true

rawstorage avatar Jun 05 '24 08:06 rawstorage

@calebdonald, thank you for submitting this. I have added this to the backlog and will prioritize it over the future releases. Meanwhile, you will have to use the example that @rawstorage has provided above.

anupamaloke avatar Jun 05 '24 13:06 anupamaloke

@rawstorage @anupamaloke thank you for following up on this. I was able to accomplish the task with the URI module, as @rawstorage mentioned. Looking forward to seeing the functionality added to the collection. Thanks!

calebdonald avatar Jun 12 '24 17:06 calebdonald

@calebdonald, this has been added into the latest PowerMax collection. So, I am closing this issue. Please feel free to raise another issue if you are running into any errors or a feature request if further enhancements are needed. Closed with #47

anupamaloke avatar Sep 13 '24 18:09 anupamaloke