volume snapshot preserve

Preserves one or more snapshots from expiration.

Specify the snapshots by volumes, paths, filter, or IDs.

  • License required: Enterprise Edition
  • Permissions required: fc or m on the volume

Syntax

CLI
maprcli volume snapshot preserve
    [ -cluster <cluster> ]
    ( -filter <filter> | -path <volume path list> | -snapshots <snapshot list> | -volume <volume list> )
     
REST
Request Type POST
Request URL
http[s]://<host>:<port>/rest/volume/snapshot/preserve[?<parameters>] 

Parameters

Specify exactly one of the following parameters: volume, path, filter, or snapshots.

Parameter Description
cluster The cluster on which to run the command.
filter A filter specifying snapshots to preserve. See Filters for more information.
path A comma-separated list of paths for which to preserve snapshots.
snapshots A comma-separated list of snapshot IDs to preserve.
volume A comma-separated list of volumes for which to preserve snapshots.

Examples

Preserve two snapshots by ID:

First, use volume snapshot list to get the IDs of the snapshots you wish to preserve. Example:

# maprcli volume snapshot list
snapshotid  ownedsize  sharedSize  volumename  ownername  ownertype  cumulativeReclaimSizeMB  volumeid   snapshotname    creationtime                  volumepath  volumeSnapshotAces  
256000049   0          0           egVol       mapr       1          0                        29379677   egVol-snapshot  Wed Sep 26 10:42:52 PDT 2018  /egVol      ...                 
256000051   0          0           users       mapr       1          0                        212450174  uservolsnap     Wed Sep 26 10:45:27 PDT 2018  /user       ...                 
256000050   0          0           egVol       mapr       1          0                        29379677   egVolSnapshot   Wed Sep 26 10:43:12 PDT 2018  /egVol      ... 

Use the IDs in the volume snapshot preserve command. For example, to preserve the first two snapshots in the above list, run the commands as follows:

maprcli volume snapshot preserve -snapshots 256000049,256000051 -json
{
	"timestamp":1537986060505,
	"timeofday":"2018-09-26 11:21:00.505 GMT-0700 AM",
	"status":"OK",
	"total":0,
	"data":[
		
	]
}
curl -X POST 'https://server.sj.us:8443/rest/volume/snapshot/preserve?snapshots=256000049,256000051' --user <username>:<password>
{"timestamp":1537986132998,"timeofday":"2018-09-26 11:22:12.998 GMT-0700 AM","status":"OK","total":0,"data":[]}