Restore web app folder ( no backup)

James Anderson 0 Reputation points

during a publish operation, a folder was over written that should not have been, is there a way to restore to a point before the last publish? backup was not enabled

  1. Suchitra Suregaunkar 14,595 Reputation points Microsoft External Staff Moderator

    Hello James,

    Could you please let us know if the comment above resolved your issue? If you need any further assistance, feel free to reach out—we're always here to support you.

    If you found the comment helpful, please consider clicking "Upvote it."

    Thank You.


Sign in to comment

2 answers

  1. Bharath Y P 9,730 Reputation points Microsoft External Staff Moderator

    Hello James, unfortunately Azure App Service doesn’t keep automatic point-in-time backups unless you’ve explicitly configured them. If you didn’t enable backups before that publish, there isn’t a built-in “undo” for the overwritten folder. Here are a few things you can try and tips for next time:

    1. Check your deployment artifacts in Kudu
      • Go to https://<your-app>.scm.azurewebsites.net → Debug Console → site → deployments
      • You’ll often see the ZIP packages from recent deployments under “SitePackages” or numbered folders.
      • If you find the previous package, download and extract it, then copy the folder you need back into wwwroot.
    2. Redeploy from your source control or CI/CD pipeline
      • If your app code lives in GitHub, Azure Repos, or local source control, grab the last good commit and push it again.
    3. Use a staging slot next time
      • Deploy to a non-production slot first, validate changes, then swap into production to avoid accidental overwrites.
    4. Enable App Service backups for future restores
      • In the Azure Portal, browse to your Web App → “Backups” blade → configure a storage account and schedule.
      • You can trigger on-demand backups or keep hourly/daily snapshots.
    5. Automate backup with CLI/PowerShell
      • Azure CLI: az webapp config backup create --resource-group RG --webapp-name MyApp --container-url "<your-storage-SAS-URL>"
      • PowerShell: New-AzWebAppBackup -ResourceGroupName RG -Name MyApp -StorageAccountUrl "<your-storage-SAS-URL>"

    Hope that helps!

    Reference list:

    If the information was useful, please consider accepting the answer and upvoting. Feel free to reach out if you need any further assistance. Thank you.

    0 comments No comments

    Sign in to comment
  2. AI answer

    There is no built-in way in Azure App Service to roll back web app content if:

    • A publish overwrote files, and
    • App Service backups or snapshots were not enabled/configured beforehand.

    Restore options in App Service (portal backups, az webapp config snapshot restore, or “undelete” for deleted apps) all require that a backup/snapshot or deleted-app record already exists. Without such a backup, App Service cannot reconstruct the previous state of a specific folder.

    If backups were enabled (for future reference):

    • From the Azure portal, use Backups → Restore to restore the app or a slot to a previous backup.
    • Or use Azure CLI az webapp config snapshot list and az webapp config snapshot restore to restore a snapshot to the same or another app.

    For the current incident (no backup configured), the only remaining options are external to App Service, such as:

    • Re-deploying the previous version from source control (Git, GitHub, Azure Repos, etc.).
    • Restoring files from any external backup system that may have captured the content.

    To avoid this in the future, configure App Service backups or use deployment slots and swap after validation.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.
Sign in to answer

Your answer