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
-
/opt/mapr/bin/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. |
sharedSize |
shSz | Size of data (in MB) that the snapshot shares with previous snapshots. |
volumename |
vn |
Name of the read-write volume associated with the snapshot. |
ownername |
on |
Owner (user or group) associated with the volume. |
cumulativeReclaimSizeMB |
cs |
Disk space (in MB) used/owned by the snapshot |
snapshotname |
n |
Snapshot name. |
ownedsize |
owSz | Size of data (in MB) owned by a snapshot, as opposed to sharedSize (owned by previous snapshots). |
ownertype |
ot |
Owner type for the owner of the volume:
|
volumeid |
vid |
ID of the volume associated with the snapshot. |
creationtime |
ct |
Snapshot creation time. Date time string (verbose output) or milliseconds since 1970 (terse output). |
volumepath |
vp |
Path to the volume associated with the snapshot. |
expirytime |
et |
The time until which the snapshot should be maintained. Expired snapshots are purged (deleted) periodically. Date time string (verbose output), or milliseconds since 1970 (terse output); 0 = never expires. |
volumeSnapshotAces |
N/A | Access Control Expression (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
.
/opt/mapr/bin/maprcli volume snapshot create -snapshotname uservolsnap -volume users
Sample Output
Examples
List all snapshots:
maprcli volume snapshot list
curl -X GET 'https://abc.sj.us:8443/rest/volume/snapshot/list' --user <username>:<password>
{"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