Recovery for Accidentally Deleted Files in Azure Storage Account Linked to Azure ML Studio

Ahmed Abdelhadi 40 Reputation points
2025-06-26T06:57:47.9533333+00:00

The files are not visible in the deleted items or recoverable versions. We are aware that Azure may retain deleted data for a limited time and that there is a 14-day window for recovery. We are within that window and request urgent support to attempt recovery of the deleted data.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,200 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deepanshu katara 16,720 Reputation points MVP Moderator
    2025-06-26T07:08:46.7266667+00:00

    Hello , Welcome to MS Q&A

    Since you're within the 14-day soft delete window in Azure, but the deleted files are not visible in the portal or recoverable items, here are some urgent recovery steps you can take:


    1. Use PowerShell to Recover Soft-Deleted Items (ADLS Gen2 or Blob Storage)

    If you're working with Azure Data Lake Storage Gen2 or Blob Storage, you can use PowerShell to list and restore soft-deleted items:

    PowerShell Script Example:

    $storageAccountName = "<your-storage-account>"
    $storageAccountKey = "<your-storage-key>"
    $ctx = New-AzStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey
    
    $filesystemName = "<your-filesystem>"
    $dirName = "<your-directory>"  # or "" for root
    $sinceDate = (Get-Date -AsUTC).AddDays(-14)  # Adjust if needed
    
    do {
        $deletedItems = Get-AzDataLakeGen2DeletedItem -Context $ctx -FileSystem $filesystemName -Path $dirName -MaxCount 100
        $deletedItems | Where-Object { $_.DeletedOn -ge $sinceDate } | Restore-AzDataLakeGen2DeletedItem
    } while ($deletedItems.Count -eq 100)
    
    

    📌 Reference: Azure Storage - Undelete Soft-delete Objects

    2. Use Azure Backup (If Enabled)

    If the data was protected by Azure Backup, you can recover it using the Backup Center or Recovery Services Vault:

    • Go to Backup Center > Backup Instances
    • Filter by Protection Status = Soft Deleted
    • Select the item and click Restore

    📌 Reference: Recover soft deleted data using Azure Backup

    Pls check and let us know if any ques

    Kindly accept answer if it helps

    Thanks

    Deepanshu


Your answer

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