volume snapshot restore

Restores a volume from a snapshot using the CLI.

For an overview on the Snapshot Restore functionality, refer to Restoring a Volume From a Snapshot.

To restore a snapshot using the Control System, refer to Restoring Volume Snapshots Using the Control System.

To check the progress of a snapshot restore operation, use the volume snapshot restorestatus command.

Syntax

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

Parameters

Parameter Description
cluster The cluster on which to run the command. This parameter is not mandatory. If not specified, the current cluster is used by default.
snapshotname The name of the snapshot to use for restoring a volume. You must also specify the volume name using the volume parameter.
volume The name of the volume to restore from a snapshot.

Example

CLI

The following example command restores a snapshot named s3 to a volume named vol2:

/opt/mapr/bin/maprcli volume snapshot restore -volume vol2 -snapshotname s3 -json
 {
   "timestamp":1549970648390,
   "timeofday":"2019-02-12 11:24:08.390 GMT+0000 AM",
   "status":"OK",
   "total":0,
   "data":[
                     
          ],
   "messages":[
                "Snapshot Restore queued for volume vol2, snapshot name s3"
               ]
 }              
REST
curl -X POST 'https://server.sj.us:8443/rest/volume/snapshot/restore?snapshotname=s3&volume=vol2' --user <username>:<password>