volume snapshot remove

Removes one or more snapshots.

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

Syntax

CLI
maprcli volume snapshot remove
    [ -cluster <cluster> ]
    ( -snapshotname <snapshot name> ] 
    [ -snapshots <snapshots> ] 
    [ -volume <volume name> ]
REST
Request Type POST
Request URL
http[s]://<host>:<port>/rest/volume/snapshot/remove[?<parameters>] 

Parameters

Specify both snapshot name and volume, or just snapshot ID.

Parameter Description
cluster The cluster on which to run the command.
snapshotname The name of the snapshot to remove. You must also specify the volume name using the volume parameter.
snapshots A comma-separated list of IDs of snapshots to remove.
volume The name of the volume from which to remove the snapshot. This is required if you are removing snapshot by specifying the snapshot name (using snapshotname parameter).

Examples

Remove the snapshot named "test-snapshot" associated with volume named "test-volume":

CLI
maprcli volume snapshot remove -snapshotname test-snapshot -volume test-volume
REST
curl -X POST 'https://abc.sj.us:8443/api/volume/snapshot/remove?snapshotname=test-snapshot&volume=test-volume' --user <username>:<password>

Remove two snapshots by ID:

First, use volume snapshot list to get the IDs of the snapshots you wish to remove. 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 remove command. For example, to remove the first two snapshots in the above list, run the commands as follows:

CLI
maprcli volume snapshot remove -snapshots 256000049,256000051
{
	"timestamp":1537986405764,
	"timeofday":"2018-09-26 11:26:45.764 GMT-0700 AM",
	"status":"OK",
	"total":0,
	"data":[
		
	]
}
REST
# curl -X POST 'https://server.sj.us:8443/rest/volume/snapshot/remove?snapshots=256000049,256000051' --user <username>:<password>
{"timestamp":1537987406574,"timeofday":"2018-09-26 11:43:26.574 GMT-0700 AM","status":"OK","total":0,"data":[]}