Volume:Create Snapshot

Search (SHIFT+S)



Create Snapshot

POST /block/volumes/{id}/protection/snapshots

A snapshot is a point-in-time copy of a volume. Snapshots are intended for short-term operational recovery and are typically implemented using lightweight, fast capabilities native to the underlying storage platforms. Like a volume, a snapshot can be exported to initiators, and you can delete it. A snapshots lifetime is tied to the original volume. When the original volume is deleted all of its snapshots will also be deleted. A snapshot is associated with the same project as the original volume. A volume may be restored in place based on a snapshot. The snapshot must have come from the volume. A new volume may be created using a snapshot as a template. See multi-volume consistent snapshots for a description of an advanced feature to snapshot multiple volumes at once. NOTE: This is an asynchronous operation.

idthe URN of a ViPR Volume to snapshot

Required Roles

  • TENANT_ADMIN

Prerequisites

These conditions must be met before calling this operation.

  • Virtual pool must specify non-zero value for max_snapshots

Request Payload

All parameters are required unless otherwise stated.

Field Description Type Notes
<volume_snapshot_create>
<name> Snapshot name. String
<create_inactive> If create_inactive is set to true, then the operation will create the snapshot, but not activate the synchronization between source and target volumes. The activation would have to be done using the block snapshot activate operation. The default value for the parameter is false. That is, the operation will create and activate the synchronization for the snapshot. Boolean Valid Values:
  •  true
  •  false
<type> Type of replication. Unspecified implies an array-based snapshot. String
<read_only> If read_only is set to true, then the snapshot will be created as read only, i.e., it will not be possible to write into the snapshot Boolean Valid Values:
  •  true
  •  false
</volume_snapshot_create>

Response Body

List of snapshots information

This is an asychronous operation that returns a task object. For information on working with tasks, see Asynchronous Operations.

Field Description Type Notes
<tasks>
<task>     0-* Elements
<op_id> The task operation id String
<resource>    
<name> The name of the resource String
<id> ViPR ID of the related object URI
<link> A hyperlink to the related object
</resource>      
<tenant>    
<id> ViPR ID of the related object URI
<link> A hyperlink to the related object
</tenant>      
<associated_resources> A list of links for associated resources
<associated_resource>     0-* Elements
<name> The name of the resource String
<id> ViPR ID of the related object URI
<link> A hyperlink to the related object
</associated_resource>      
</associated_resources>
<state> The state of the task String Valid Values:
  •  queued = task is queued
  •  pending = task is pending
  •  ready = task succeed
  •  error = task fails
<message> The task detail message String
<description> The description of the task String
<service_error>    
<code> The numerical code associated with the error encountered when processing a service request Integer
<description> The description of the error String
<details> Detailed information concerning the error String
</service_error>      
<start_time> The date and time of when the task was started DateTime
<end_time> The date and time of when the task ended DateTime
<progress> Integer
<workflow>    
<id> ViPR ID of the related object URI
<link> A hyperlink to the related object
</workflow>      
<queuedStartTime> DateTime
<queueName> String
<name> The name assigned to this resource in ViPR. The resource name is set by a user and can be changed at any time. It is not a unique identifier. String
<id> An identifier that is generated by ViPR when the resource is created. The resource ID is guaranteed to be unique and immutable across all virtual data centers for all time. URI Valid Values:
  •  urn:storageos:resource-type:UUID:
<link> A hyperlink to the details for this resource
<creation_time> A timestamp that shows when this resource was created in ViPR DateTime Valid Values:
  •  YYYY-MM-DDTHH:mm:ssZ
<tags> Keywords and labels that can be added by a user to a resource to make it easy to find when doing a search.
<tag> String 0-* Elements
</tags>
<inactive> Whether or not the resource is inactive. When a user removes a resource, the resource is put in this state before it is removed from the ViPR database. Boolean Valid Values:
  •  true
  •  false
<global> Boolean
<remote> Boolean
<vdc>    
<id> ViPR ID of the related object URI
<link> A hyperlink to the related object
</vdc>      
<internal> Whether or not the resource is an internal resource. Boolean Valid Values:
  •  true
  •  false
</task>      
</tasks>

Examples

Request
POST: https://192.168.0.0:4443/block/volumes/urn:storageos:Volume:20da03df-beac-4ab6-bd19-42c416f4a4d9:/protection/snapshots HTTP/1.1

Content-Type: application/xml
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>

<?xml version="1.0" encoding="UTF-8"?>
<volume_snapshot_create>
   <name>rpsnap_for_cleanup-example.com-29849</name>
   <create_inactive null="true" />
   <type>rp</type>
</volume_snapshot_create>
Response
HTTP/1.1 202 Accepted
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<tasks>
   <task>
      <element>
         <description>Block snapshot create</description>
         <link href="/block/snapshots/urn:storageos:BlockSnapshot:aa5fd876-2191-4b6c-abaf-c39d4bbd98bb:/tasks/3b6e5d0a-13b1-450e-9294-fc3d7d0d180f"
            rel="self"/>
         <message>Block snapshot create</message>
         <op_id>3b6e5d0a-13b1-450e-9294-fc3d7d0d180f</op_id>
         <resource>
            <id>urn:storageos:BlockSnapshot:aa5fd876-2191-4b6c-abaf-c39d4bbd98bb:</id>
            <link href="/block/snapshots/urn:storageos:BlockSnapshot:aa5fd876-2191-4b6c-abaf-c39d4bbd98bb:"
               rel="self"/>
            <name>rpsnap_for_cleanup-example.com-29849</name>
         </resource>
         <start_time>1380722124180</start_time>
         <state>pending</state>
      </element>
   </task>
</tasks>
Notes: