‹ All AZ-104 questions

AZ-104 Practice Question 23: Blob Versioning Overwrites

Microsoft Azure Administrator Associate (AZ-104) · Test 3 · question 3 of 10

Storagemedium

A nightly job overwrote pricing.json in a general-purpose v2 account with a truncated file, and the previous contents could not be recovered. Investigating, you find that the application takes a manual snapshot of each blob "when it remembers to", and that no other data-protection feature is enabled.

You must make sure every future write to a blob preserves the state that preceded it, recoverable by an identifier, without relying on application code to do anything. What should you configure?

Select one answer
Show answer and explanation

Answer:

  • C. Enable blob versioning on the storage account, and stop taking snapshots in application code

With versioning turned on, "Azure Storage automatically creates a new version with a unique ID when a blob is first created and each time that the blob is subsequently modified." When you modify a blob, "the current version becomes a previous version," so the pre-overwrite state survives and can be read or restored by its version ID. Microsoft is explicit about the second half too: "after you enable blob versioning, you also update your application to stop taking snapshots of block blobs ... Taking snapshots doesn't offer any additional protection to your block blob data if blob versioning is enabled, and it might increase costs and application complexity."

Option A keeps the flaw that caused the incident. A snapshot is created "manually ... by you or your application," so protection depends on the code path running, which is exactly what failed here.

Option B confuses two scopes. Container soft delete restores a deleted *container*; it does not roll an individual blob back to earlier contents, and it does nothing about overwrites.

Option D is both indirect and circular. Object replication "asynchronously copies block blobs" and mirrors updates and deletions to the destination (it propagates the truncation rather than shielding you from it), and it requires blob versioning to be enabled on both accounts in the first place.

Reference: Blob versioning in Azure Storage

Practice Test 3 ›

Study guides for AZ-104