Solved

Nutanix snapshot expiration

  • 21 January 2017
  • 13 replies
  • 3049 views

Userlevel 2
Badge +17
How to change expiry of nutanix snapshot?
icon

Best answer by MarkNijmeijer 23 January 2017, 18:10

View original

This topic has been closed for comments

13 replies

Userlevel 6
Badge +29
cc dlink7 MarkNijmeijer
Userlevel 3
Badge +17
vivekds have you try ncli pd add-one-time-snapshot name= retention-time=
Userlevel 2
Badge +4
Vivek,

you can set the expiry of a particular snapshot to unlimited with this command:
ncli pd retain-snapshot

You will have to manually delete the snapshot when you don't need it anymore.

HTH,

-- Mark
Badge
Hi
is possible to do the same using the API REST?

Regards
Userlevel 7
Badge +34
Hi @MarkNijmeijer

@Infraestructuras had a followup question about using the REST API - do you know if that is possible?
Userlevel 2
Badge +4
@Infraestructuras - Yes, you can. Look up in the v2 namespace:
/protection_domains/{protection_domain_name}/dr_snapshots/{snapshot_id}/retain
Retain a snapshot.
Badge
Hi
we will check it and inform the results

Thanks a lot
Badge
Hi
we have checked the method from API and we changed the retain period from 1 day to 129600000000 ms (1 and half day in microseconds). The return code is correct, but when we search the snapshot id, it does not exists in our list. We searched it in remote and local list and the snapshot does not exists in any.

We will do some checks and wil inform you.

Thanks a lot
Userlevel 2
Badge +4
You can only change the retention period to unlimited using this API, not to another value. I see there might be a bug in the API documentation, as the API doc seems to indicate you can pass in a new value. I'll file a ticket for that. Try passing in true (or '1') and see if it starts showing up?
Badge
Hi
thanks @MarkNijmeijer, we take note about this and will chek it.

Regards
Badge
Hi @MarkNijmeijer, we have checked your suggestion but not works. Firstly we changed the value to 129600000000 microseconds. The snap has dissapeared from the list. After this we executed the same API action changing the value on microseconds to 1, but the response is an error:

"message": "Snapshots with ids 28604270 does not exist in the protection domain sync-meth02-tes",

I understand if the time is not correct, snapshot will be deleted.

Regards
Userlevel 2
Badge +4
Sorry about that. Let me ask someone in QA to try this out and get back to you to share how this is supposed to work.
Badge
How to change expiry of nutanix snapshot?

what is the default retention period for the snapshot ?