Soft Deleted Files in Azure Storage Account File Share

CA-Michael Sheppard 0 Reputation points
2026-03-04T21:42:54.0833333+00:00

We have a storage account that has a file share. The File share itself seems to have a soft delete for 14 days.

However, is there any kind of soft delete for the files in the share? Meaning, a user deletes a file off of a sync server share in between snapshots. I am not finding anyway to access these files if that does exist.

Is this even possible? If so, where is it configured?

Thanks,

Mike Sheppard

Azure Data Share
Azure Data Share

An Azure service that is used to share data from multiple sources with other organizations.


3 answers

Sort by: Newest
  1. Pilladi Padma Sai Manisha 11,715 Reputation points Microsoft External Staff Moderator
    2026-03-04T23:34:40.9066667+00:00

    Hi CA-Michael Sheppard,
    Thankyou for reaching microsoft Q&A!
    Azure file share soft delete protects the entire share from accidental deletion, retaining it (along with snapshots) for your configured 14 days. However, it does not provide soft delete or recovery for individual files or folders deleted within the share.​

    Recover Deleted Files

    Use share snapshots to restore files deleted between snapshots (e.g., via sync client). Snapshots are point-in-time, read-only copies of the whole share. In Azure portal, go to Storage account > File shares > [your share] > Snapshots tab, then browse the snapshot and copy the file to the live share.​

    If no prior snapshot exists, recovery is not possible without Azure Backup (which automates snapshots).​

    Enable/Configure Snapshots

    Snapshots are manual by default; automate via Portal (Share > Snapshots > + Add), PowerShell (New-AzStorageShare -Context $ctx -Name "myshare" -Snapshot), or Azure Backup for shares (Vault > Backup > Azure Files policy with daily snapshots and retention).

    For sync scenarios, schedule frequent snapshots (e.g., hourly) to minimize gaps.

    Let me know your resource group/storage account details if you need help checking snapshots!

    References:
    https://learn.microsoft.com/en-us/azure/backup/soft-delete-azure-file-sharehttps://learn.microsoft.com/en-us/azure/backup/azure-file-share-backup-overview
    https://learn.microsoft.com/en-us/azure/storage/files/storage-snapshots-fileshttps://learn.microsoft.com/en-us/azure/storage/files/storage-files-prevent-file-share-deletion

    Was this answer helpful?

    0 comments No comments

  2. kagiyama yutaka 5,490 Reputation points
    2026-03-04T23:31:48.62+00:00

    I think the only way to keep those mid‑sync ghost‑deletes alive is just turning on File‑Soft‑Delete on the share, so even a normal smb‑side delete falls into a small recoverable window instead of disappearing for good.

    Was this answer helpful?


  3. Marcin Policht 108.6K Reputation points MVP Volunteer Moderator
    2026-03-04T22:57:34.5133333+00:00

    In Azure Files, soft delete behavior can exist at two levels: the file share itself and the individual files within the share. The "soft delete for the file share" you mentioned protects against deletion of the entire share, allowing recovery within a retention period (14 days in your case). This does not automatically mean individual files have a soft delete.

    For files within a share, Azure introduced File Soft Delete, which protects deleted files or directories within the share. When enabled, if a user deletes a file, the file is retained in a hidden, soft-deleted state for the configured retention period. During this period, you can recover the file without restoring the entire share. However, this feature is not enabled by default and needs to be explicitly configured on the storage account or the specific file share.

    You can check or enable it using Azure CLI or PowerShell. For example, to enable soft delete on a file share using Azure CLI:

    az storage share-rm update \
        --resource-group <resource-group> \
        --account-name <storage-account> \
        --name <file-share-name> \
        --enable-soft-delete true \
        --delete-retention-days 14
    

    To list soft-deleted files, you can use:

    az storage file list \
        --share-name <file-share-name> \
        --account-name <storage-account> \
        --include-deleted
    

    Without enabling this, if a user deletes a file directly from a synced server share (for example via SMB), there is no automatic soft delete at the file level. You can remediate this by using Azure File Snapshots, which are point-in-time read-only copies of the entire share. You can recover files by browsing a snapshot, but snapshots need to have been taken prior to deletion.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.