Beginning with version 2017-04-17, the
Snapshot Share operation creates a read-only snapshot of a share.
|Enabled file share protocol||Available|
You can construct the
Snapshot Share request as follows. HTTPS is recommended.
|Method||Request URI||HTTP version|
Replace the path components shown in the request URI with your own, as follows:
||The name of your storage account.|
||The name of your file share.|
For details on path naming restrictions, see Naming and referencing shares, directories, files, and metadata.
You can specify the following additional parameter on the request URI.
The following table describes required and optional request headers.
||Required. Specifies the authorization scheme, account name, and signature. For more information, see Authorize requests to Azure Storage.|
||Required. Specifies the Coordinated Universal Time (UTC) time for the request. For more information, see Authorize requests to Azure Storage.|
||Required for all authorized requests. Specifies the version of the operation to use for this request. For more information, see Versioning for the Azure Storage services.|
||Optional. Specifies a user-defined, name-value pair, associated with the share snapshot. If you don't specify any name-value pairs, the operation copies the base share metadata to the snapshot.
If you specify one or more name-value pairs, the share snapshot is created with the specified metadata. In this case, metadata isn't copied from the base share.
Metadata names must adhere to the naming rules for C# identifiers.
||Optional. Provides a client-generated, opaque value with a 1-kibibyte (KiB) character limit that's recorded in the logs when logging is configured. We highly recommend that you use this header to correlate client-side activities with requests that the server receives. For more information, see Monitor Azure Blob Storage.|
Request Syntax: PUT https://myaccount.file.core.windows.net/myshare?restype=share&comp=snapshot HTTP/1.1 Request Headers: x-ms-version: 2017-04-17 x-ms-date: Mon, 10 May 2017 22:50:32 GMT x-ms-meta-Name: StorageSample Authorization: SharedKey myaccount:Z5043vY9MesKNh0PNtksNc9nbXSSqGHueE00JdjidOQ=
The response includes an HTTP status code and a set of response headers.
A successful operation returns status code 201 (Created). For information about status codes, see Status and error codes.
The response for this operation includes the following headers. The response can also include additional, standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.
||Contains a value that represents the version of the share snapshot, in quotes.
A share snapshot can't be modified, so the
||Returns the date and time the share was last modified. For more information, see Representation of date-time values in headers.
A share snapshot can't be modified, so the last modified time of a particular share snapshot never changes. However, if you supplied new metadata with the
||Uniquely identifies the request that was made and can be used for troubleshooting the request. For more information, see Troubleshooting API operations.|
||Indicates the version of Azure Files used to run the request.|
||A UTC date/time value that indicates the time at which the response was initiated. The service generates this value.|
||Can be used to troubleshoot requests and corresponding responses. The value of this header is equal to the value of the
Response Status: HTTP/1.1 201 Created Response Headers: Content-Length: 0 Date: Mon, 10 May 2017 23:00:12 GMT ETag: "0x8CB14C3E29B7E82" Last-Modified: Mon, 10 May 2017 23:00:06 GMT x-ms-version: 2017-04-17 x-ms-snapshot: 2017-05-10T17:52:33.9551861Z Server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
Only the account owner can call this operation.
Share snapshots provide read-only versions of shares. After you create a share snapshot, you can't modify it. A share snapshot provides a convenient way to create a consistent backup of all files on a share.
Each time you call the
Snapshot Share operation, a new share snapshot is created, with a unique
DateTime value that identifies the share snapshot relative to its base share. You can use this
DateTime value to perform further operations on the share snapshot and its contents. You should treat this
DateTime value as opaque.
DateTime value identifies the share snapshot on the request URI. For example, a file on the base share and its snapshots have URIs similar to the following examples:
- File on the share:
- File on the share snapshot:
A share can support the creation of 200 share snapshots. If you attempt to create more than 200 share snapshots, the service returns error code 409 (Conflict). If you attempt to create a share snapshot while a previous
Snapshot Share operation is in progress, the service also returns error code 409 (Conflict).
Existing share snapshots are never overwritten. They must be deleted explicitly. To explicitly delete share snapshots, call Delete Share and set the
x-ms-include-snapshots header, along with the
sharesnapshot query parameter, to the appropriate value.