Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 17 of 47
❮Prev Next❯

Azure File Shares, Snapshots and Soft Delete

Module 2: Storage ⏱ 11 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    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 needed

    Exam 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.

    Azure portal: Create a file share, take snapshots and turn on share soft delete Create a share, take a snapshot and undelete the share.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    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
    1. Open File shares and select + File share.
    2. Name it finance. On a standard account choose Transaction optimized, Hot or Cool. NFS shares need a premium account.
    3. Backup uses Azure Backup, which schedules share snapshots for you.
    4. Select Create.
    5. Inside the share, Operations → Snapshots. Select + Add snapshot for a manual one before a risky change.
    6. 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.
    7. Snapshots don’t help if someone deletes the whole share. Under Data protection, keep soft delete for file shares on and set 14 days.
    8. 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.

    😟 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
    🛠️ Solved with: Share snapshots + soft delete

    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.

    ChoiceOptions
    Account typeStandard 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)
    ProtocolSMB 3.x (Windows, Linux, macOS, TCP port 445) or NFS 4.1 (Linux, premium only, virtual network access)
    SizeQuota 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

    Finance

    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.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    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.

    Question 1

    Question 1 of 5

    Linux virtual machines must mount an Azure file share by using NFS 4.1. Which storage account should you create for the share?

    Question 2

    Question 2 of 5

    A user deleted a folder from an Azure file share yesterday. The share has share soft delete enabled and daily share snapshots. How should you recover the folder?

    Question 3

    Question 3 of 5

    What is the maximum number of share snapshots that one Azure file share can keep?

    Question 4

    Question 4 of 5

    A file share was deleted. Share soft delete is enabled with a retention period of 14 days. The share had three snapshots. What can you restore?

    Question 5

    Question 5 of 5

    You need to create a 2 TiB SMB file share named finance on a standard general-purpose v2 account. The share will have many read and write operations. Which Azure CLI command should you run?

    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. 1.How many snapshots can one file share keep?Show

      Up to 200.

    2. 2.What is the default retention for share soft delete on new accounts?Show

      Seven days.

    3. 3.Which account type supports NFS shares?Show

      Premium FileStorage.

    4. 4.Which CLI command takes a share snapshot?Show

      az storage share-rm snapshot

    5. 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

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.