Archives For Snapshot


Have you ever been asked to modify large amounts of important data? Have you ever made a mistake that requires an embarrassing  amount of man hours to fix?

Well I have! Especially with the Windows Azure Blob Storage Service, where editing blobs couldn’t be easier.

Windows Azure SQL Database has a transaction mechanism that allows us to rollback when something goes wrong. On the other hand, Windows Azure Blob Storage Service does not provide you with transactions. When you overwrite a blob, the previous version is gone… But don’t worry, there are a couple of ways that can help you go about securing a backup.

Before attempting any dangerous data manipulations on the content of your blobs:

  • Make a copy on your local machine (This works great when you don’t have much data)
  • Copy them to a different Windows Azure Blob Storage Service container (This is a bit drastic, but it works)
  • Create a Snapshot for each blob (This is your best bet)
    The remainder of this post will focus on exploiting Blob Snapshots in order to provide a means by which we can rollback if something do horribly wrong with our batch processes.

Continue Reading…

I recently came across the this requirement

  • When content is modified, the editor has the ability to rollback to the original content.
  • The previous version of the content is available for 4 hours.
  • Content cannot be rolled back once the previous version has expired

This got me thinking about the BlobContainerWorker and how I could use it to satisfy these requirements.

I created the BlobSnapshotCleaner  to deleted Blob Snapshots based on their age. It’s also very good at deleting Snapshots that are blocking you from deleting Blobs from Visual Studio.

class Program
    static void Main(string[] args)
        var remover = new BlobSnapshotCleaner("StorageConnectionString", 


This console application is used as a host for the BlobSnapshotCleaner. You can find the source code below. Since the BlobSnapshotCleaner  implements PollingTask<TWorkItem>, it’s used pretty much like the MessageQueueWorker implemented in an earlier post. The BlobSnapshotCleaner  needs a Storage Account Connection String and the name of the Blob container that it will work with and the maximum age for Snapshots.

The code from this Post is part of the Brisebois.WindowsAzure NuGet Package

To install Brisebois.WindowsAzure, run the following command in the Package Manager Console

PM> Install-Package Brisebois.WindowsAzure

Get more details about the Nuget Package.

Continue Reading…