Blob storage: tiers, lifecycle and data protection
Pay less with access tiers, automate moves with lifecycle rules, and protect data with soft delete, versioning and immutability.
In this lesson you'll learn
- Containers, blob types and anonymous access
- Hot, cool, cold and archive tiers, and rehydration
- Lifecycle management, with a worked timeline
- Soft delete, versioning, snapshots, point-in-time restore, object replication and immutability
1. Containers and blobs
New to Blob storage? Start here
Blob storage holds files of any kind: images, PDFs, backups, logs. Blobs live in containers, which work like top-level folders. Names that include slashes, such as 2026/march.pdf, look like folders in tools, even though the storage is flat underneath.
| Blob type | Use |
|---|---|
| Block blob | Most files. The only type that supports access tiers. |
| Append blob | Logs, where data is only ever added to the end |
| Page blob | Random read and write, used for VHD disks |
Container access levels are Private (the default), Blob (anonymous read of blobs) and Container (anonymous read and list). None of them work unless the account allows anonymous access.
2. Access tiers
- The account default tier can be hot or cool. Cold and archive are set per blob.
- Rehydrating from archive takes up to 15 hours at Standard priority. High priority can be under an hour for small blobs.
3. Lifecycle management
Rules move blobs between tiers or delete them automatically, based on days since creation, last modification or last access.
{ "rules": [{ "name": "age-out-invoices", "enabled": true, "type": "Lifecycle",
"definition": {
"filters": { "blobTypes": ["blockBlob"], "prefixMatch": ["invoices/"] },
"actions": { "baseBlob": {
"tierToCool": { "daysAfterModificationGreaterThan": 30 },
"tierToArchive": { "daysAfterModificationGreaterThan": 180 },
"delete": { "daysAfterModificationGreaterThan": 2555 } } } } }] }
Example: where is an invoice on each date?
Exam focus
Tiering actions work on block blobs only. Delete works on block and append blobs. Lifecycle management needs a general-purpose v2 or premium block blob account. Filter by name with prefixMatch, or by blob index tags with blobIndexMatch.
4. Protecting blob data
| Feature | Protects against |
|---|---|
| Blob soft delete | Deleted or overwritten blobs, for 1 to 365 days |
| Container soft delete | Deleted containers |
| Versioning | Every change keeps the previous version automatically |
| Snapshots | Manual point-in-time copies of one blob |
| Point-in-time restore | Rolls block blobs back to an earlier time. It needs soft delete, versioning and change feed. |
| Object replication | Copies block blobs to another account asynchronously. It needs versioning on both accounts and change feed on the source. |
| Immutability (time-based retention or legal hold) | Anyone, even an admin, changing or deleting blobs (WORM) |
Example
A ransomware script on a SS Kaiser laptop encrypts files synced to a blob container. Because versioning is on, the previous clean version of every blob still exists, and point-in-time restore rolls the container back to the hour before the attack.
Exam traps to remember
- Archived blobs cannot be read until rehydrated.
- "Prevent anyone modifying data for a year" means an immutability policy, set under Access policy on the container.
- Lifecycle rules use days since modification unless the question says creation or last access.
Test yourself: 3 check questions and exam-style practice questions on this topic are in the AZ-104 Azure Administrator app.
Practise in the app