Solved

Nutanix snapshot expiration


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

Best answer by MarkNijmeijer 23 January 2017, 18:10

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

View original

13 replies

vivekds wrote:

How to change expiry of nutanix snapshot?



what is the default retention period for the snapshot ?
Userlevel 2
Badge +5
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
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
Badge
Hi
thanks @MarkNijmeijer, we take note about this and will chek it.

Regards
Userlevel 2
Badge +5
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
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
Badge
Hi
we will check it and inform the results

Thanks a lot
Userlevel 2
Badge +5
@Infraestructuras - Yes, you can. Look up in the v2 namespace:
/protection_domains/{protection_domain_name}/dr_snapshots/{snapshot_id}/retain
Retain a snapshot.
Userlevel 7
Badge +35
Hi @MarkNijmeijer

@Infraestructuras had a followup question about using the REST API - do you know if that is possible?
Badge
Hi
is possible to do the same using the API REST?

Regards
Userlevel 2
Badge +5
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
Userlevel 4
Badge +17
vivekds have you try ncli pd add-one-time-snapshot name= retention-time=
Userlevel 7
Badge +30
cc dlink7 MarkNijmeijer

Reply