I have deleted my Azure App Service…

Posted by

We all know the power of Azure App Service, but as always we have a lot of data and a lof of services related with it.

Imagine that we have a Azure App Service and by human mistake we delete the production App Service, and what’s more, we don’t have Azure Backup configured for this Service, so probably all your company work will be lost.

To our luck, in Azure we have something what is called Azure App Service Web App Undelete where we can be able to restore the app without any support plan.

We have to take into account that this only works for sites deleted in the past 30 days, and we have to be sure that the Plan of our App Service is at least in Basic, this feature does not work in Free mode, but I still think that this is pretty cool, isn’t it?

So we will be able to restore the following:

  • The content of the deleted app.
  • The configuration of the app (the commands allows to skip the restoration of the app configuration).
  • The undelete commands will also to restore the *.azurewebsites.net host name if still available.

So we can list the deleted apps and restore them, I am going to show you how to do it by PowerShell and CLI:

Get-AzureRmDeletedWebApp -name
Restore-AzureRmDeletedWebApp -ResourceGroupName  -Name  -TargetAppServicePlanName

If we want to do it by using CLI, we need to execute the following:

 

az webapp deleted list --name <name of the deleted app>
az webapp deleted restore --deleted-id <id of the deleted app> --name <name of the app to restore to> --resource-group <resource group of the app to restore to>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s