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.