volume snapshot create

Creates a snapshot of the specified volume, using the specified snapshot name.

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

Syntax

CLI
maprcli volume snapshot create
    [ -cluster <cluster> ]
    [ -retain <positive_integer>mi|h|d|w|m|y ]
    -snapshotname <snapshot>
    -volume <volume>
REST
Request Type POST
Request URL
http[s]://<host>:<port>/rest/volume/snapshot/create?<parameters> 

Parameters

Parameter Description
cluster The cluster on which to run the command.
retain Specifies how long to retain the snapshot data. Value can be specified in:
  • Minutes by appending mi to the integer. For example, 30mi can be specified as the value for this parameter to retain snapshot data for 30 minutes.
  • Hours by appending h to the integer. For example, 1h can be specified as the value for this parameter to retain snapshot data for 1 hour.
  • Days by appending d to the integer. For example, 2d can be specified as the value for this parameter to retain snapshot data for 2 days.
  • Weeks by appending w to the integer. For example, 4w can be specified as the value for this parameter to retain snapshot data for 4 weeks.
  • Months by appending m to the integer. For example, 10m can be specified as the value for this parameter to retain snapshot data for 10 months.
  • Years by appending y to the integer. For example, 7y can be specified as the value for this parameter to retain snapshot data for 7 years.
If this is not specified, snapshot data will never expire.
snapshotname The name of the snapshot to create.
volume The volume for which to create a snapshot.

Examples

Create a snapshot called "test-snapshot" for volume "test-volume":

maprcli volume snapshot create -snapshotname test-snapshot -volume test-volume
{
	"timestamp":1537805380237,
	"timeofday":"2018-09-24 09:09:40.237 GMT-0700 AM",
	"status":"OK",
	"total":0,
	"data":[
		
	]
}
curl -k -X POST 'https://abc.sj.us:8443/rest/volume/snapshot/create?volume=test-volume&snapshotname=test-snapshot' --user mapr:mapr
{"timestamp":1537805548885,"timeofday":"2018-09-24 09:12:28.885 GMT-0700 AM","status":"OK","total":0,"data":[]}