Configure Azure Files and Azure Blob Storage
Create file shares and blob containers, pick access tiers, protect data with snapshots, soft delete and versioning, and automate tiering with lifecycle management.
- 20 min
- 6 concepts
- Try it yourself
- 5-question check
Learn
Azure Files gives you managed file shares that computers mount over SMB (or NFS), like a file server without the server. Blob Storage stores unstructured objects such as images, backups and logs in containers, reached over HTTPS.
Both have features to keep costs down and recover from mistakes. Knowing which feature belongs to which service is a common exam trap.
- 1
Create and configure a file share in Azure Storage
A file share lives in a storage account. Standard shares use HDD-backed storage; premium shares in a FileStorage account use SSDs. Windows, Linux and macOS can mount SMB shares over port 445.
Standard shares can use the transaction optimised, hot or cool tiers. Many networks block outbound port 445, so remote users often connect through a VPN or private endpoint.
Remember: If a share won't mount from home or the office, check whether port 445 is blocked.
- 2
Create and configure a container in Blob Storage
Containers organise blobs, a bit like folders. Each container has an anonymous access level: private (no anonymous access), blob (anonymous read of blobs) or container (anonymous read and list). Anonymous access is only possible if the account allows it.
Blobs come in three types: block blobs for files and documents, append blobs for logs, and page blobs for VM disks.
Remember: Keep containers private and turn off anonymous access at the account unless you truly need it.
- 3
Configure storage tiers
Blob access tiers balance storage cost against access cost. Hot is for frequent access. Cool is for infrequent access, kept at least 30 days. Cold is for rarely accessed data kept at least 90 days. Archive is offline, kept at least 180 days.
Archived blobs must be rehydrated to an online tier before they can be read, which can take up to 15 hours. Deleting or moving a blob before its minimum period incurs an early deletion charge.
Remember: Archive can be set on individual blobs but can't be an account's default tier.
- 4
Configure snapshots and soft delete for Azure Files
A share snapshot is a read-only, point-in-time copy of a whole share. Users can restore files from it, including through Previous Versions in Windows.
Soft delete for file shares keeps a deleted share recoverable for a retention period you set (1 to 365 days), so an accidental delete of a whole share can be undone.
Remember: Share snapshots protect files; soft delete protects the share itself.
- 5
Configure blob lifecycle management
A lifecycle management policy is a set of rules that move blobs between tiers or delete them, based on days since creation, last modification or last access.
For example: move to cool after 30 days, to archive after 90, delete after 365. Rules can filter by prefix or blob index tags. Lifecycle policies can't rehydrate blobs out of archive.
Remember: Using last access time needs access tracking turned on for the account.
- 6
Configure blob versioning
With versioning on, every time a blob is overwritten or deleted, the previous version is kept automatically. You can restore any earlier version.
Pair it with soft delete for blobs and soft delete for containers for full protection. Versions cost storage, so use lifecycle rules to delete old versions.
Remember: Versioning is for blobs. File shares use snapshots.
Blob access tiers
| Tier | Online? | Minimum retention | Best for |
|---|---|---|---|
| Hot | Yes | None | Data used often |
| Cool | Yes | 30 days | Infrequent access, still needed quickly |
| Cold | Yes | 90 days | Rare access, still needed quickly |
| Archive | No, rehydrate first | 180 days | Long-term retention, hours to retrieve |
Try it
Which feature solves each problem?
This interactive part needs JavaScript.
In the portal
- Create a file shareAzure portal: Storage accounts > your account > Data storage > File shares > File share
- Create a containerAzure portal: Storage accounts > your account > Data storage > Containers > Container
- Lifecycle rulesAzure portal: Storage accounts > your account > Data management > Lifecycle management
- Versioning and soft deleteAzure portal: Storage accounts > your account > Data management > Data protection
Key terms
Click a card to see the definition.
Check your understanding
5 questions. Score 80% or more and these skills are marked as confident in your AZ-104 study plan.
Which tier is offline and needs rehydration before reading?
Archive is the only offline tier; rehydration can take up to 15 hours.
What's the minimum retention for the cool tier in a general-purpose v2 account?
Cool is 30 days, cold 90 and archive 180.
Users want to restore an earlier copy of a file on an Azure file share. What should you have enabled?
Snapshots give point-in-time copies of shares. Versioning is for blobs.
Can a lifecycle management rule move blobs out of archive?
Lifecycle policies can't rehydrate archived blobs.
Which anonymous access level lets anyone list and read blobs in a container?
Container level allows anonymous read and list. Blob level allows read only.
Sources
- Microsoft Learn: Access tiers for blob data
- Microsoft Learn: Blob versioning
- Microsoft Learn: Optimize costs by automatically managing the data lifecycle
- Microsoft Learn: Overview of share snapshots for Azure Files
- Microsoft Learn: Enable soft delete on Azure file shares
Facts in this lesson are from Microsoft Learn. This site isn't affiliated with Microsoft.