Many features of Microsoft Azure storage allow for a fail-safe if data is deleted or accidentally modified. One of those features that provides an extra layer of protection and that you need to be familiar with for the AZ-104 exam is blob versioning. Let’s take a look at what blob versioning is and how you configure it.

What is Blob Versioning?

When you enable blob versioning, it does what you would expect. It creates previous versions of the storage object so you can access earlier blob versions to recover data. This capability is true whether the object has been modified or even if it has been deleted.

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

Because blob versioning creates a new version of the blob with every write operation, organizations need to keep in mind that it will result in additional costs for cloud storage. Businesses should enable lifecycle management, which automatically deletes old versions of blobs to minimize the cost impact when using blob versioning.

How does blob versioning work?

When a new blob version is created at a given point in time, versions are identified with a blob version ID. Each time a blob is modified, a new version and unique version ID is created. When a new version is created, the current version becomes the previous version. Each blob can only have a single current version at a time.

When a blob is deleted, the current version is deleted, and there is no current version. The previous version chain is still intact. Below is a graphical representation of blob versioning and how it works:

Download Banner

Configure Blob Versioning

Blob versioning

What happens when you delete a blob or version?

There are a few things to note when you delete a blob or version. If versioning and soft delete are enabled for the storage account, note the following:

  • The current version of a blob becomes the previous version when you delete a blob
  • No new version is created
  • No soft-deleted snapshots are created
  • The soft delete retention period doesn’t go into effect for the blob that was deleted

Below is a high-level overview of what happens when you delete a blob or a blob version:

Configure Blob Versioning

When you delete a blob or blob version

Is this all the data protection you will need?

No. Keep in mind that blob versioning should only be considered a small part of any comprehensive data protection strategy for your blob data. There are other Microsoft Azure storage features that Microsoft recommends you enable to add to your data protection strategy. These include:

  • Container soft delete – It enables restoring a blob container that has been deleted
  • Blob soft delete – It does what the container soft delete does, only at the blob level, including the ability to restore a blob, snapshot, or version of a blob that has been deleted

Blob versioning considerations and best practices

There are a few things to note about blob versioning and best practices to follow.

  • A large number of blob versions can increase latency for blob listing operations
  • It is recommended to keep fewer than 1000 versions per blob
  • Blob versioning is available for general-purpose V2, premium block blob, and legacy blob storage accounts
  • Azure Data Lake Storage Gen2 isn’t currently supported
  • Blob versioning can’t help recover from the accidental deletion of a storage account or container
  • Blob versions are immutable, and the content or metadata of the version cannot be modified
  • Blob versioning and blob soft delete are recommended protection configurations for storage accounts
  • If versioning and soft delete are enabled for a storage account, when you delete a blob, the current version of the blob becomes the previous state
  • If you have manually created blob snapshots or you have an application doing this automatically, note that taking snapshots does not offer any additional protections to your block blob data if blob versioning is enabled and may just increase costs with no added benefit

Configuring blob versioning

Configuring Azure blob versioning is a simple setting in the data protection configuration for your storage account. Log into the Azure portal. Navigate to your storage account > data protection. Under the Tracking section, you can check the box, Enable versioning for blobs.
If you expand the options, you can choose to keep all versions or delete versions after (in days).

Configure Azure Blob Versioning

Enabling versioning for blobs

Below is a look at the options you get when you select to delete versions after (in days) radio button. You can enter the number of days you want to keep versions.

Configure Azure Blob Versioning

Keep versions after in days

Listing blob versions

You can also list blob versions after you have enabled blob versioning.

To list a blob’s versions in the Azure portal:

  1. Navigate in the Azure portal to your storage account, then navigate to the blob container
  2. Select the blob for which you want to list the versions
  3. Select the Versions tab to display the blob’s versions

Configure Azure Blob Versioning

Listing blob versions

Wrapping up blob versions

Microsoft Azure storage has many different capabilities that help protect your data. Enabling blob versions is a great way to have easy rollbacks to a previous version if the data changes or is deleted. Enabling blob versions is easy to do in the data protection configuration of the storage account. You can list versions of the blob from the Azure portal as well. Understand blob versioning and how this is enabled for the AZ-104 exam.

Related Posts:
Microsoft Azure Administrator: AZ-104: Configure Blob Lifecycle Management – Part 35

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

Rate this post