volume snapshot list

Displays info about a set of snapshots.

You can specify the snapshots by volumes or paths, or by specifying a filter to select volumes with certain characteristics.

Syntax

CLI
maprcli volume snapshot list
    [ -cluster <cluster name> ]
    [ -columns <fields> ]
    ( -filter <filter> ] 
    [ -path <volume path list> ] 
    [ -volume <volume list> ]
    [ -limit <rows> ]
    [ -output (terse|verbose) ]
    [ -start <offset> ]
REST
Request Type GET
Request URL
http[s]://<host>:<port>/rest/volume/snapshot/list[?<parameters>] 

Parameters

Either volume or path can be used if you wish the specify the snapshots. In addition, filter can be used with volume and path, or independently.

Parameter Description
cluster The cluster on which to run the command.
columns A comma-separated list of fields to return in the query. See the Fields table below. Default: none
filter A filter specifying snapshots to list. See Filters for more information.
limit The number of rows to return, beginning at start. Default: 2147483647
output Specifies whether the output should be terse or verbose. Default: verbose
path A comma-separated list of paths for which to list snapshots.
start The offset from the starting row. Default: 0
volume A comma-separated list of volumes for which to list snapshots.

Fields

The following table lists the fields used in the columns parameter, and returned as output.

Field Name Short Name Description
snapshotid id Unique snapshot ID.
snapshotname n Snapshot name.
volumeid vid ID of the volume associated with the snapshot.
volumename vn Name of the volume associated with the snapshot.
volumepath vp Path to the volume associated with the snapshot.
ownername on Owner (user or group) associated with the volume.
ownertype ot Owner type for the owner of the volume:
  • 0=user
  • 1=group
cumulativeReclaimSizeMB cs Disk space used for the snapshot, in MB.
creationtime ct Snapshot creation time. Date time string (verbose output) or milliseconds since 1970 (terse output).
expirytime et Snapshot expiration time. Date time string (verbose output), or milliseconds since 1970 (terse output); 0 = never expires.
volumeSnapshotAces N/A ACE Permissions for read and write on the volume snapshot. Use -json to view the ACE permissions.

Output

This sample output is based on using the following code to create a snapshot called uservolume for the volume named users.

maprcli volume snapshot create -snapshotname uservolsnap -volume users

Sample Output

# maprcli volume snapshot list
snapshotid  ownedsize  sharedSize  volumename  ownername  ownertype  cumulativeReclaimSizeMB  volumeid   snapshotname    creationtime                  volumepath  volumeSnapshotAces                  
256000051   0          0           users       mapr       1          0                        212450174  uservolsnap     Wed Sep 26 10:45:27 PDT 2018  /user       ...                 

Examples

List all snapshots:

# 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      ...
curl -k -X GET 'https://abc.sj.us:8443/rest/volume/snapshot/list' --user mapr:mapr
{"timestamp":1537984492448,"timeofday":"2018-09-26 10:54:52.448 GMT-0700 AM","status":"OK","total":3,"data":[{"ownername":"mapr","ownertype":"1","volumeid":"29379677","volumename":"egVol","volumepath":"/egVol","snapshotid":"256000049","snapshotname":"egVol-snapshot","creationtime":"Wed Sep 26 10:42:52 PDT 2018","cumulativeReclaimSizeMB":"0","ownedsize":"0","sharedSize":"0","volumeSnapshotAces":{"readAce":"p","writeAce":"p"}},{"ownername":"mapr","ownertype":"1","volumeid":"212450174","volumename":"users","volumepath":"/user","snapshotid":"256000051","snapshotname":"uservolsnap","creationtime":"Wed Sep 26 10:45:27 PDT 2018","cumulativeReclaimSizeMB":"0","ownedsize":"0","sharedSize":"0","volumeSnapshotAces":{"readAce":"p","writeAce":"p"}},{"ownername":"mapr","ownertype":"1","volumeid":"29379677","volumename":"egVol","volumepath":"/egVol","snapshotid":"256000050","snapshotname":"egVolSnapshot","creationtime":"Wed Sep 26 10:43:12 PDT 2018","cumulativeReclaimSizeMB":"0","ownedsize":"0","sharedSize":"0","volumeSnapshotAces":{"readAce":"p","writeAce":"p"}}]} 

List all snapshots and format the output:

# maprcli volume snapshot list -json
{
	"timestamp":1537984231452,
	"timeofday":"2018-09-26 10:50:31.452 GMT-0700 AM",
	"status":"OK",
	"total":3,
	"data":[
		{
			"ownername":"mapr",
			"ownertype":"1",
			"volumeid":"29379677",
			"volumename":"egVol",
			"volumepath":"/egVol",
			"snapshotid":"256000049",
			"snapshotname":"egVol-snapshot",
			"creationtime":"Wed Sep 26 10:42:52 PDT 2018",
			"cumulativeReclaimSizeMB":"0",
			"ownedsize":"0",
			"sharedSize":"0",
			"volumeSnapshotAces":{
				"readAce":"p",
				"writeAce":"p"
			}
		},
		{
			"ownername":"mapr",
			"ownertype":"1",
			"volumeid":"212450174",
			"volumename":"users",
			"volumepath":"/user",
			"snapshotid":"256000051",
			"snapshotname":"uservolsnap",
			"creationtime":"Wed Sep 26 10:45:27 PDT 2018",
			"cumulativeReclaimSizeMB":"0",
			"ownedsize":"0",
			"sharedSize":"0",
			"volumeSnapshotAces":{
				"readAce":"p",
				"writeAce":"p"
			}
		},
		{
			"ownername":"mapr",
			"ownertype":"1",
			"volumeid":"29379677",
			"volumename":"egVol",
			"volumepath":"/egVol",
			"snapshotid":"256000050",
			"snapshotname":"egVolSnapshot",
			"creationtime":"Wed Sep 26 10:43:12 PDT 2018",
			"cumulativeReclaimSizeMB":"0",
			"ownedsize":"0",
			"sharedSize":"0",
			"volumeSnapshotAces":{
				"readAce":"p",
				"writeAce":"p"
			}
		}
	]
}