Implement and Manage Storage · Topic 3 of 3

Azure Files and Blob Storage

AZ-104 Files and Blob: file shares, containers and public access, access tiers, soft delete, share snapshots, blob versioning and lifecycle management rules.

  • 5 min
In a nutshell
  • A share holds up to 200 snapshots. Share soft delete defaults to 7 days.
  • Container access levels are Private, Blob and Container. Account level settings can block anonymous access.
  • Minimum stay: cool 30 days, cold 90 days, archive 180 days. Archive must be rehydrated.

What it is

Azure Files gives you managed file shares that behave like a network drive. Blob Storage holds objects such as images, backups and logs in containers.

Both services have protection features, and the exam asks which one recovers a deleted or changed item, and which one controls cost.

Filesshares and snapshotsBlobcontainers and tiersProtectionsoft delete, versioningCostlifecycle rules

How it works

Azure Files shares

A file share is reached over SMB, or over NFS on premium shares. Standard shares can use the transaction optimized, hot or cool tier, and premium shares use SSD storage. You set a quota when you create the share and can mount it from Windows, Linux or macOS.

  • Share snapshots are read-only, point-in-time copies of a share. They are incremental, and a share can hold up to 200. Windows users can open earlier versions from File Explorer.
  • Soft delete for file shares keeps a deleted share recoverable. The default retention is 7 days and can be set from 1 to 365 days.

Blob containers and public access

A container groups blobs. Its access level controls anonymous reads.

Access levelAnonymous access
PrivateNone. This is the default
BlobRead individual blobs if the URL is known
ContainerList and read every blob

You can turn off anonymous access for the whole account, which overrides the container setting.

Access tiers

Blobs sit in the hot, cool, cold or archive tier. Hot suits frequent use, and each cooler tier lowers storage cost and raises access cost. The minimum stay is 30 days for cool, 90 for cold and 180 for archive. Archive is offline, and a blob must be rehydrated to an online tier before it can be read, which can take hours. The account has a default tier of hot or cool for new blobs.

Soft delete and versioning

FeatureWhat it protects against
Blob soft deleteAccidental delete or overwrite, for a retention of 1 to 365 days
Container soft deleteAccidental container delete, with a default of 7 days and a range of 1 to 365
Blob versioningOverwrites and deletes, by automatically keeping previous versions

Versioning keeps a previous version each time a blob is overwritten or deleted, and you restore by promoting one. Point in time restore for block blobs needs versioning, change feed and blob soft delete to be turned on.

Lifecycle management

A lifecycle rule moves or deletes blobs automatically. A rule has a filter, such as a blob type or name prefix, and actions on a schedule of days.

  • tierToCool, tierToCold and tierToArchive move blobs to a cooler tier.
  • delete removes blobs.

The conditions are measured in days since the blob was last modified, since it was created, or since it was last accessed. Last access time tracking must be turned on to use access based rules. Rules can also act on previous versions and snapshots, and the policy runs once a day.

Blob createdhot tierafter 30 daysCool tierlower storage costafter 180 daysArchive tierofflineafter 365 daysDeletedrule removes it

Mounting a share

The portal's Connect page for a share generates a script for Windows, Linux or macOS. The script stores the credentials and mounts the share as a drive. Mounting uses SMB over port 445, so that port must be open from the client. If an internet provider or firewall blocks outbound port 445, use a VPN or private endpoint instead.

A lifecycle rule in JSON

Lifecycle rules are stored as a JSON policy. This one moves log blobs to cool after 30 days, to archive after 180 and deletes them after a year.

{ "rules": [ { "name": "age-out-logs", "enabled": true, "type": "Lifecycle",
  "definition": {
    "filters": { "blobTypes": ["blockBlob"], "prefixMatch": ["logs/"] },
    "actions": { "baseBlob": {
      "tierToCool": { "daysAfterModificationGreaterThan": 30 },
      "tierToArchive": { "daysAfterModificationGreaterThan": 180 },
      "delete": { "daysAfterModificationGreaterThan": 365 } } } } } ] }

Choosing a protection feature

The goalFeature
Recover a blob that was deletedBlob soft delete
Recover an earlier version of an overwritten blobBlob versioning
Recover a deleted containerContainer soft delete
Recover a deleted file shareSoft delete for file shares
Let Windows users open earlier versions of filesShare snapshots
Roll many containers back to a timePoint in time restore

How the exam asks about this

  • "Reduce cost for data nobody reads after 90 days." A lifecycle rule to cool or archive.
  • "Read an archived blob within the hour." Copy it to an online tier with high rehydration priority.
  • "Block anonymous access to every container." Disable blob anonymous access on the account.
  • "How many snapshots can a share hold?" 200.
  • Access time based rules need last access time tracking turned on.

What to remember for the exam

  • A share holds up to 200 snapshots. Share soft delete defaults to 7 days.
  • Container access levels are Private, Blob and Container. Account level settings can block anonymous access.
  • Minimum stay: cool 30 days, cold 90 days, archive 180 days. Archive must be rehydrated.
  • Blob soft delete covers 1 to 365 days. Container soft delete defaults to 7 days.
  • Versioning keeps previous versions automatically.
  • Lifecycle rules move or delete blobs by age. Access based rules need last access tracking.
Exam tip

"Recover a blob overwritten by mistake" points to versioning or soft delete. "Move old data to a cheaper tier automatically" points to a lifecycle rule.

Common mistakes

Reading from archive directly. Archived blobs cannot be read until rehydrated.

Expecting soft delete to protect against every change. It covers deletes and overwrites for the retention period only.

Confusing share snapshots with soft delete. Snapshots keep earlier states of files. Soft delete recovers a deleted share.

Forgetting last access tracking. Access based lifecycle rules do not work without it.

Check yourself

  • How many snapshots can one Azure Files share hold?

    Up to 200.

  • Which feature moves blobs to the archive tier automatically based on age?

    Blob lifecycle management.

  • What three features does point in time restore for blobs depend on?

    Blob versioning, change feed and blob soft delete.

Topic 3 of 3 in Implement and Manage Storage

Test yourself on Implement and Manage Storage

The full Microsoft AZ-104 question bank has 650 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.