Book Image

Microsoft Azure Development Cookbook Second Edition

Book Image

Microsoft Azure Development Cookbook Second Edition

Overview of this book

Table of Contents (15 chapters)
Microsoft Azure Development Cookbook Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating and using a blob snapshot


The Azure Blob service supports the creation of read-only snapshots of a blob. A storage account is billed only for those blocks and pages in a snapshot that differ from those in the underlying blob. A blob snapshot is useful in providing a backup for a blob, as it can be used to reset the blob to an earlier state. Indeed, multiple snapshots can be made over time, allowing a historic record to be kept of the changes made to a blob.

A blob snapshot is created using the CloudBlockBlob.CreateSnapshot() method. Each snapshot of a blob is distinguished by its creation time, which must be provided to operations that are accessing the snapshot. A snapshot created at a particular datetime is addressed by appending a snapshot={datetime} query string to the URL, thus identifying the underlying blob.

For example, the following is the complete URL for a snapshot taken on 11/25/2010 of a blob named SnapshotsExample:

http://myaccountname.blob.core.windows.net/ chapter2...