Delete a backup for a web using Azure PowerShell
This sample script creates a web app in App Service with its related resources, and then creates a one-time backup for it.
This article has been updated to use the new Azure PowerShell Az module. To learn more about the new Az module and AzureRM compatibility, see Introducing the new Azure PowerShell Az module. For installation instructions, see Install Azure PowerShell.
$resourceGroupName = "myResourceGroup" $webappname = "<replace-with-your-app-name>" # List statuses of all backups that are complete or currently executing. Get-AzWebAppBackupList -ResourceGroupName $resourceGroupName -Name $webappname # Note the BackupID property of the backup you want to delete # Delete the backup by specifying the BackupID Remove-AzWebAppBackup -ResourceGroupName $resourceGroupName -Name $webappname ` -BackupId <replace-with-BackupID>
Clean up deployment
After the script sample has been run, the following command can be used to remove the resource group, web app, and all related resources.
Remove-AzResourceGroup -Name myResourceGroup -Force
This script uses the following commands. Each command in the table links to command specific documentation.
|Get-AzWebAppBackupList||Gets a list of backups for a web app.|
|Remove-AzWebAppBackup||Removes the specified backup of a web app.|
For more information on the Azure PowerShell module, see Azure PowerShell documentation.
Additional Azure Powershell samples for Azure App Service Web Apps can be found in the Azure PowerShell samples.
We'd love to hear your thoughts. Choose the type you'd like to provide:
Our feedback system is built on GitHub Issues. Read more on our blog.