Azure File Shares, Snapshots and Soft Delete
30-second answer
An Azure file share is a managed SMB (or NFS) share inside a storage account. On a standard general-purpose v2 account you pick an access tier (Transaction optimized, Hot or Cool) and a quota up to 100 TiB; premium (SSD) shares live in a FileStorage account and are the only kind that supports NFS. A share snapshot is a read-only, incremental, point-in-time copy of the whole share (up to 200 per share) that you restore files from, including through Windows Previous Versions. Share soft delete keeps a deleted share, with its snapshots, for 1 to 365 days (7 by default) so you can undelete it.
Simulate it » No Azure account neededExam objective: 2.3.1 Create and configure a file share in Azure Files. 2.3.5 Configure snapshots and soft delete for Azure Files. (Skills measured as of April 17, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Open <strong>File shares</strong> and select <strong>+ File share</strong>.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Open File shares and select + File share.
- Name it finance. On a standard account choose Transaction optimized, Hot or Cool. NFS shares need a premium account.
- Backup uses Azure Backup, which schedules share snapshots for you.
- Select Create.
- Inside the share, Operations → Snapshots. Select + Add snapshot for a manual one before a risky change.
- Snapshots are read-only and incremental, up to 200 per share. Open one to browse it and Restore a file, or use Previous Versions in Windows.
- Snapshots don’t help if someone deletes the whole share. Under Data protection, keep soft delete for file shares on and set 14 days.
- If the share is deleted, Show deleted shares and Undelete. It comes back with its snapshots.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
Undo buttons: soft delete, versioning and snapshots
Blob soft delete and container soft delete keep deleted items for 1 to 365 days. Versioning keeps every previous version of a blob. For Azure Files, share snapshots are read-only point-in-time copies and share soft delete keeps a deleted share.
🤔 What happens if…
Read this tour as text
- The front door: the storage firewall. Every account has a public endpoint that accepts all networks by default. Set the default action to Deny and only what you list gets in: virtual network rules (subnets with the Microsoft.Storage service endpoint), IP rules (public addresses only) and trusted Azure services if you tick the exception.
- Three ways in, plus one for file shares. Callers prove who they are with an account key (full control), a SAS (limited rights for limited time) or a Microsoft Entra ID token checked against RBAC data roles. For SMB file shares, users bring a Kerberos ticket from AD DS, Microsoft Entra Domain Services or Microsoft Entra Kerberos.
- SAS tokens and stored access policies. A service SAS can point at a stored access policy on the container (up to 5 per container). The policy holds the permissions and expiry, so deleting or editing it revokes every SAS that names it. An ad hoc SAS can only be revoked by regenerating the key that signed it.
- Rotate access keys. Each account has two keys so you can rotate without downtime: move apps to key2, regenerate key1, and next time do the reverse. A key expiration policy flags old keys. Regenerating a key kills every SAS signed with it.
- Encryption at rest. Azure Storage always encrypts data with AES-256. By default Microsoft manages the key. With a customer-managed key in Key Vault (soft delete and purge protection on), the account’s managed identity wraps and unwraps its data key with your key, and you can revoke it.
- Redundancy and a region outage. LRS keeps 3 copies in one datacenter, ZRS spreads 3 across availability zones, GRS adds an async copy in the paired region and GZRS combines both. RA- versions let you read the secondary. A customer-managed failover promotes the secondary when the primary region is down.
- Moving data: AzCopy and object replication. AzCopy moves files in parallel from the command line, signed in with Microsoft Entra ID (and a Storage Blob Data role) or with a SAS. Storage Explorer does the same with a GUI. Object replication keeps copying new block blobs to another account by itself.
- Access tiers and lifecycle management. Blobs sit in Hot, Cool (30-day minimum), Cold (90 days) or Archive (180 days, offline). A lifecycle management rule moves or deletes blobs by age or last access, about once a day. Reading an archived blob means rehydrating it first.
- Undo buttons: soft delete, versioning and snapshots. Blob soft delete and container soft delete keep deleted items for 1 to 365 days. Versioning keeps every previous version of a blob. For Azure Files, share snapshots are read-only point-in-time copies and share soft delete keeps a deleted share.
Someone at Contoso deletes a contract, someone else overwrites one, and a whole file share disappears on a Friday afternoon. Find out what you can and can't get back, then switch on the protection that makes each mistake a two-minute fix.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
A script deleted a folder on the finance share, then someone deleted the share.
😊 THE SOLUTION
Restore files from a share snapshot and the share from soft delete.
- Files deleted✓ Share snapshots
- Whole share deleted✓ Share soft delete
- Need a schedule✓ Azure Backup
Start with a question
What if your office shared drive had a time machine?
Every office has had the moment: someone drags the wrong folder to the bin on the shared drive, and the quarterly reports are gone. On a good file server, IT opens last night’s copy and puts the folder back.
Azure Files gives you shared drives in the cloud, and share snapshots are that time machine. Share soft delete covers the bigger accident, when someone deletes the whole share.
Explain it like I’m 10
The technical explanation
Create a share
Portal: storage account, Data storage > File shares > + File share. You set a name (3 to 63 lowercase letters, numbers and single hyphens), the access tier and the maximum capacity, and on the Backup tab you can turn on Azure Backup straight away.
| Choice | Options |
|---|---|
| Account type | Standard general-purpose v2 (HDD) or Premium FileStorage (SSD) |
| Tier (standard) | Transaction optimized (busy, many operations), Hot (general team shares), Cool (archive-like, cheaper storage, dearer access) |
| Protocol | SMB 3.x (Windows, Linux, macOS, TCP port 445) or NFS 4.1 (Linux, premium only, virtual network access) |
| Size | Quota up to 100 TiB per share |
Standard shares cost per GB stored plus transactions; for example, Transaction optimized is around $0.06 per GB-month (illustrative). Premium shares are billed on provisioned size and give predictable IOPS and throughput.
Share snapshots
A snapshot captures the entire share at a point in time. It’s read-only and incremental: only changed data since the last snapshot is stored and billed. Up to 200 snapshots per share.
- Take one by hand before a risky change: share > Operations > Snapshots > + Add snapshot.
- Let Azure Backup take them on a schedule and manage retention.
- Restore a single file or folder from the portal, or on Windows through Previous Versions on the mounted drive.
- A share with snapshots can’t be deleted unless you delete the snapshots too (
--include snapshots).
Share soft delete
Soft delete for file shares is on Data management > Data protection, with retention from 1 to 365 days. New accounts have it on with 7 days. When a share is deleted, it waits in a soft-deleted state with its snapshots; Show deleted shares > Undelete brings it back. It’s share-level only: it doesn’t recover a single deleted file inside a live share.
CLI and PowerShell
az storage share-rm create -g rg-storage-prod --storage-account stcontosoprod \
-n finance --quota 1024 --access-tier TransactionOptimized --enabled-protocols SMB
az storage share-rm snapshot -g rg-storage-prod --storage-account stcontosoprod -n finance
az storage account file-service-properties update -g rg-storage-prod -n stcontosoprod \
--enable-delete-retention true --delete-retention-days 14
# Recover a deleted share
az storage share-rm list -g rg-storage-prod --storage-account stcontosoprod --include-deleted -o table
az storage share-rm restore -g rg-storage-prod --storage-account stcontosoprod \
-n finance --deleted-version <version>
New-AzRmStorageShare -ResourceGroupName rg-storage-prod -StorageAccountName stcontosoprod `
-Name finance -QuotaGiB 1024 -AccessTier TransactionOptimized
Update-AzStorageFileServiceProperty -ResourceGroupName rg-storage-prod -StorageAccountName stcontosoprod `
-EnableShareDeleteRetentionPolicy $true -ShareRetentionDays 14
Architect level Azure File Sync
If branch offices need fast local access, Azure File Sync installs an agent on a Windows Server that caches the Azure file share. Cloud tiering keeps hot files local and leaves cold ones as pointers in Azure. The cloud share is still where snapshots and soft delete protect the data.
Real-world business scenario
Litware Finance (fictional)
- The problem
- An admin cleanup script deleted the month-end folder on the finance share, and a week later another admin deleted a share he thought was a test copy.
- What they used
- Azure Backup now takes daily snapshots of each share, admins take a manual snapshot before scripted changes, and share soft delete is set to 14 days.
- Why that choice
- Snapshots bring back files and folders in minutes, and soft delete brings back a whole deleted share with its snapshots.
- The result
- The month-end folder was restored from the previous night's snapshot, and the deleted share was undeleted the same afternoon.
When to use it and when not to
✓ Use it when…
- Replacing a Windows file server or giving teams a shared drive.
- Lift-and-shift apps that read and write a network path.
- Protecting shares from mistakes with snapshots and soft delete.
✕ Think twice when…
- Huge volumes of web-served objects (Blob Storage is cheaper).
- NFS on a standard account (needs premium FileStorage).
- Relying on share soft delete to bring back one file.
↔ Alternatives to consider
- Azure Backup for Azure Files for scheduled snapshots and long retention.
- Azure File Sync to cache shares on-premises.
- Azure NetApp Files for very high-performance enterprise NAS.
Test yourself with exercises
5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What's a share snapshot?
Model answer
A read-only copy of the whole file share at one moment. It's incremental, so it only stores what changed since the previous one. If someone deletes or corrupts a file, you open the snapshot and copy the old version back, or use Previous Versions in Windows.
Intermediate Does share soft delete protect a single deleted file?
Model answer
No. Share soft delete works at the share level: if the whole share is deleted, you can undelete it with its snapshots during the retention period. For a single file you need a snapshot or Azure Backup, which takes snapshots on a schedule.
Experienced developer A team needs NFS 4.1 shares for Linux apps. What do you create?
Model answer
A premium FileStorage account, because NFS isn't available on standard general-purpose v2 accounts. NFS shares are reached through a virtual network (service endpoint or private endpoint), they don't use identity-based SMB auth, and secure transfer has to be off for NFS on that account because NFS encrypts differently.
Scenario Someone deleted the finance share on Friday and the CLI said it had snapshots. How do you get everything back?
Model answer
If share soft delete was on, I list deleted shares with az storage share-rm list --include-deleted, take the deleted version and run az storage share-rm restore. The share comes back with its snapshots. Then I'd add a delete lock on the storage account and make sure Azure Backup is protecting the share.
Quick revision
Key points
- Standard shares - Transaction optimized, Hot, Cool. Premium shares - SSD, FileStorage account.
- NFS needs a premium FileStorage account and virtual network access.
- Quota up to 100 TiB per share.
- Share snapshots - read-only, incremental, up to 200 per share, whole share.
- Share soft delete - 1 to 365 days, default 7, restores share and snapshots.
- Azure Backup schedules snapshots and can keep more of them in a vault.
Important terminology
- Azure file share
- A fully managed file share in a storage account, mounted over SMB or NFS.
- Access tier (file share)
- Transaction optimized, Hot or Cool on standard accounts; they trade storage price against transaction price.
- Premium file share
- An SSD-backed share in a FileStorage account, with provisioned performance and NFS support.
- Share snapshot
- A read-only, incremental copy of a whole file share at a point in time.
- Share soft delete
- A setting that keeps deleted file shares for a retention period so they can be restored.
- Quota
- The maximum size of a file share, up to 100 TiB.
Common mistakes
- Expecting share soft delete to restore a single file.
- Trying to create an NFS share on a standard account.
- Naming a share with fewer than 3 characters or uppercase letters.
Exam tips
- "Restore a file deleted from a share yesterday" = share snapshot (or Azure Backup).
- "Recover a deleted file share" = share soft delete.
- "NFS share for Linux" = premium FileStorage account.
Five quick revision questions
-
1.How many snapshots can one file share keep?Show
Up to 200.
-
2.What is the default retention for share soft delete on new accounts?Show
Seven days.
-
3.Which account type supports NFS shares?Show
Premium FileStorage.
-
4.Which CLI command takes a share snapshot?Show
az storage share-rm snapshot
-
5.What is the maximum quota of a file share?Show
100 TiB.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Blob Containers, Access Tiers and Lifecycle Management
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.