DataOps Observer
← All labs

Data recovery / Intermediate / 25–40 min

The data file overwritten in Azure

Investigate an overwritten dataset and test recovery from a real Azure Blob snapshot into a separate directory.

LAB IDdataops-01-azure-blob-restoreTRACK / dataops.observer
Engineer monitoring a data pipeline beside storage servers

The scenario

A data export in an isolated Azure storage account was overwritten after a snapshot was taken. Locate the snapshot, recover the original data into a clean local directory, and check its integrity without replacing the live blob.

Mission objectives

  • Inspect the changed data and the available Azure Blob snapshot.
  • Restore the snapshot to a separate private directory.
  • Verify the recovered data and remove the isolated Azure resources.

Lab README

Restore an Azure Blob snapshot

This exercise provisions a uniquely named Azure resource group, storage account and private blob container with Terraform. It uploads a small synthetic dataset, takes a real Azure Blob snapshot, then overwrites the current blob. Investigate and restore the original into a separate local directory; do not overwrite the source blob.

Azure Storage and transactions can incur charges. Use an isolated subscription with known safe guardrails and clean up promptly. The storage endpoint is publicly reachable using account credentials, but anonymous blob access is disabled. The account key, Terraform state and restored data are sensitive; use a private Linux filesystem and never publish them. Do not add other blobs, snapshots or containers: teardown refuses unexpected resources or data.

Install Azure CLI, Terraform 1.5+, Python 3 and Bash on Linux. Log in and select the intended subscription. Microsoft.Resources and Microsoft.Storage must already be registered, and your identity must be able to read storage account keys. The Blob endpoint must be reachable.

export AZURE_SUBSCRIPTION_ID="your-subscription-id"
./setup.sh "$AZURE_SUBSCRIPTION_ID" northeurope --accept-costs
./lab.sh

Inspect the current data and snapshot, then use the lab commands to download a snapshot into the clean private restore directory. Run ./verify.sh and ./teardown.sh. Verification compares recovered data with the original and checks that the overwritten source was not changed. Teardown destroys the lab blob, snapshot, container, account and group after checking their identities and contents; confirm the group is absent before removing .lab-state.

View Markdown source ↗

Get the lab

Download and inspect the installer before running it. It checks the archive's SHA-256 digest and refuses to overwrite an existing lab directory.

curl -fsSLO https://devops.download/labs/dataops-01-azure-blob-restore.sh
less dataops-01-azure-blob-restore.sh
bash dataops-01-azure-blob-restore.sh
cd labs/dataops-01-azure-blob-restore
./setup.sh "$AZURE_SUBSCRIPTION_ID" northeurope --accept-costs

When you've made your changes, run ./verify.sh. Remove lab resources with ./teardown.sh.

Download the archive instead ↗

Need a nudge?

Hint #1

Compare the current blob with the available snapshots using ./lab.sh.

Hint #2

Restore a snapshot to the clean local directory, then run ./verify.sh. Do not overwrite the source blob.

Hint #3 · Deep Dive Runbook on opsbreakfix.com

Read the deep dive runbook ↗

Solved it?

Read the Official Root Cause Analysis & Certification Roadmap on opsbreakfix.com

Continue to opsbreakfix.com ↗