Blob Versioning

What it is

Blob versioning keeps earlier states of a blob so you can recover after a modification or deletion. Each version has an ID. A blob has at most one current version; its prior versions remain available until someone or a lifecycle policy deletes them.

Why it exists

It provides point-in-time recovery for blob data after accidental overwrites, application bugs, or unwanted deletion. It does not protect a deleted storage account or a deleted container; use appropriate resource locks and recovery planning for those risks.

Key ideas

  • Account-wide setting — it applies to blobs in the storage account, not one chosen container.
  • Writes create history. Creating or modifying a blob creates a version; the old current version becomes a previous version. Some append-blob and page-blob write operations do not create a version, so use a manual snapshot when that exact operation must be captured.
  • A delete removes the current version, not the history. Existing versions remain as previous versions. To restore content, copy a chosen earlier version to become a new current version.
  • Versions are immutable — their contents and metadata cannot be edited in place.
  • Plan lifecycle and cost. Frequent writes can create many versions, add storage cost, and slow blob listing. Lifecycle management can delete or tier older versions.
  • Soft delete complements versioning. It adds a retention window for deleted versions; it is not the same feature as a version history.

Northwind example

Northwind overwrites price-list.csv every morning. With versioning enabled, Tuesday’s upload becomes the new current version and Monday’s file remains a previous version. When Priya spots a bad price import, the team copies Monday’s version to a new current version. They also set a lifecycle rule so outdated versions do not accumulate forever.

How object replication ties in

Object replication requires blob versioning on both source and destination accounts, which is why the two features are commonly configured together. See object-replication.

How it fits (diagram)

Exam notes

  • Versioning recovers earlier blob states; soft delete retains deleted versions for a defined period.
  • Versioning is account-wide and needs lifecycle planning.
  • Restoring means copying an earlier version to a new current version.

blob-storage · immutable-storage · object-replication · storage-performance

📘 Source: Microsoft Learn — Blob Versioning