Skip to content

Commit c6fc95f

Browse files
committed
376112-content-pattern-metadata-updates-app-service
1 parent b204038 commit c6fc95f

20 files changed

+678
-692
lines changed

articles/app-service/app-service-undelete.md

+51-53
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
11
---
2-
title: Restore deleted apps
2+
title: Restore Deleted Apps
33
description: Learn how to restore a deleted app in Azure App Service. Avoid the headache of an accidentally deleted app.
44
author: seligj95
55
ms.author: jordanselig
66
ms.date: 10/4/2023
7-
ms.topic: article
7+
ms.topic: how-to
88
ms.custom: devx-track-azurepowershell
99
---
10-
# Restore deleted App Service app
1110

12-
If you happened to accidentally delete your app in Azure App Service, you can now restore it by using the Azure portal or PowerShell.
11+
# Restore a deleted App Service app
1312

14-
## Restore deleted App Service app by using the portal
13+
If you accidentally deleted an app in Azure App Service, you can now restore it by using the Azure portal or PowerShell.
1514

16-
If you deleted your app in Azure App Service, you can now restore it from the portal by using following steps:
15+
## Restore deleted App Service app by using the Azure portal
1716

18-
1. Navigate to App Services in the portal.
19-
1. Click on **Manage Deleted Apps**.
17+
If you deleted your app in Azure App Service, you can restore it from the portal by following these steps:
18+
19+
1. Go to App Services in the Azure portal.
20+
1. Select **Manage Deleted Apps**.
2021
1. Select **Subscription**.
21-
1. From the dropdown, select the deleted app. Apps deleted in last 30 days will show up in the drop down list.
22-
1. Select destination app from the dropdown where you want to restore your app.
23-
1. If you would like to restore the deleted app to a slot of destination app, check the slot checkbox and select available slots from the dropdown.
24-
1. By default only app content is restored. If you want app configuration also to be restored, check **Restore App configuration**.
22+
1. From the dropdown, select the deleted app. Apps deleted in the last 30 days show in the dropdown list.
23+
1. Select the destination app from the dropdown that correlates to where you want to restore your app.
24+
1. If you would like to restore the deleted app to a slot of the destination app, select the slot checkbox and select available slots from the dropdown.
25+
1. By default, only app content is restored. If you want app configuration to also be restored, select **Restore App configuration**.
2526

26-
## Restore deleted App Service app by using PowerShell
27+
## Restore a deleted App Service app by using PowerShell
2728

28-
If you deleted your app in Azure App Service, you can restore it using the commands from the [Az PowerShell module](/powershell/azure/).
29+
If you deleted your app in Azure App Service, you can restore it by using the commands from the [`Az PowerShell module`](/powershell/azure/).
2930

3031
> [!NOTE]
31-
> - Deleted apps are purged from the system 30 days after the initial deletion. After an app is purged, it can't be recovered.
32-
> - Undelete functionality isn't supported for function apps hosted on the Consumption plan or Elastic Premium plan.
33-
32+
> * Deleted apps are purged from the system 30 days after the initial deletion. After an app is purged, it can't be recovered.
33+
> * Undelete functionality isn't supported for function apps hosted on the Consumption plan or Elastic Premium plan.
3434
3535
## Re-register App Service resource provider
3636

37-
Some customers might come across an issue where retrieving the list of deleted apps fails. To resolve the issue, run the following command:
37+
Some customers might experience failure to retrieve the list of deleted apps. To resolve the issue, run the following command:
3838

3939
```powershell
4040
Register-AzResourceProvider -ProviderNamespace "Microsoft.Web"
4141
```
4242

4343
## List deleted apps
4444

45-
To get the collection of deleted apps, you can use `Get-AzDeletedWebApp`.
45+
To access the collection of deleted apps, you can use `Get-AzDeletedWebApp`.
4646

4747
For details on a specific deleted app you can use:
4848

@@ -52,25 +52,25 @@ Get-AzDeletedWebApp -Name <your_deleted_app> -Location <your_deleted_app_locatio
5252

5353
The detailed information includes:
5454

55-
- **DeletedSiteId**: Unique identifier for the app, used for scenarios where multiple apps with the same name have been deleted
56-
- **SubscriptionID**: Subscription containing the deleted resource
57-
- **Location**: Location of the original app
58-
- **ResourceGroupName**: Name of the original resource group
59-
- **Name**: Name of the original app.
60-
- **Slot**: the name of the slot.
61-
- **Deletion Time**: When was the app deleted
55+
* **`DeletedSiteId`**: Unique identifier for the app, used for scenarios where multiple apps with the same name were deleted
56+
* **`SubscriptionID`**: Subscription containing the deleted resource
57+
* **Location**: Location of the original app
58+
* **`ResourceGroupName`**: Name of the original resource group
59+
* **Name**: Name of the original app
60+
* **Slot**: Name of the slot
61+
* **Deletion Time**: When the app was deleted
6262

6363
## Restore deleted app
6464

6565
>[!NOTE]
66-
>- `Restore-AzDeletedWebApp` isn't supported for function apps hosted on the Consumption plan or Elastic Premium plan.
67-
>- The Restore-AzDeletedWebApp cmdlet restores a deleted web app. The web app specified by TargetResourceGroupName, TargetName, and TargetSlot will be overwritten with the contents and settings of the deleted web app. If the target parameters are not specified, they will automatically be filled with the deleted web app's resource group, name, and slot. If the target web app does not exist, it will automatically be created in the app service plan specified by TargetAppServicePlanName.
68-
>- By default `Restore-AzDeletedWebApp` will restore both your app configuration as well any content. If you want to only restore content, you use the **`-RestoreContentOnly`** flag with this commandlet.
69-
>- Custom domains, bindings, or certs that you import to your app won't be restored. You'll need to re-add them after your app is restored.
70-
66+
>
67+
>* `Restore-AzDeletedWebApp` isn't supported for function apps hosted on the Consumption plan or Elastic Premium plan.
68+
>* The `Restore-AzDeletedWebApp` cmdlet restores a deleted web app. The web app specified by `TargetResourceGroupName`, `TargetName`, and `TargetSlot` is overwritten with the contents and settings of the deleted web app. If the target parameters aren't specified, they're automatically filled with the deleted web app's resource group, name, and slot. If the target web app doesn't exist, it's automatically created in the App Service plan specified by `TargetAppServicePlanName`.
69+
>* By default `Restore-AzDeletedWebApp` restores both your app configuration and any content. If you want to only restore content, you use the `-RestoreContentOnly` flag with this commandlet.
70+
>* Custom domains, bindings, or certs that you import to your app isn't restored. You'll need to add them again after your app is restored.
7171
72-
After identifying the app you want to restore, you can restore it using `Restore-AzDeletedWebApp`, as shown in the following examples.
73-
>*You can find the full commandlet reference here: **[Restore-AzDeletedWebApp](/powershell/module/az.websites/restore-azdeletedwebapp)*** .
72+
After identifying the app you want to restore, you can restore it by using `Restore-AzDeletedWebApp`, as shown in the following examples.
73+
>You can find the full commandlet reference here: [`Restore-AzDeletedWebApp`](/powershell/module/az.websites/restore-azdeletedwebapp).
7474
7575
>Restore to the original app name:
7676
```powershell
@@ -88,15 +88,13 @@ Restore-AzDeletedWebApp -TargetResourceGroupName <my_rg> -Name <my_app> -TargetA
8888
```
8989

9090
> [!NOTE]
91-
> Deployment slots are not restored as part of your app. If you need to restore a staging slot, use the `-Slot <slot-name>` flag.
92-
> The commandlet is restoring original slot to the target app's production slot.
93-
> By default `Restore-AzDeletedWebApp` will restore both your app configuration as well any content to target app. If you want to only restore content, you use the `-RestoreContentOnly` flag with this commandlet.
94-
91+
> Deployment slots aren't restored as part of your app. If you need to restore a staging slot, use the `-Slot <slot-name>` flag.
92+
> The commandlet restores the original slot to the target app's production slot.
93+
> By default, `Restore-AzDeletedWebApp` restores both your app configuration as well any content to the target app. If you want to only restore content, you use the `-RestoreContentOnly` flag with this commandlet.
9594
>Restore only site content to the target app
9695
```powershell
9796
Restore-AzDeletedWebApp -TargetResourceGroupName <my_rg> -Name <my_app> -TargetAppServicePlanName <my_asp> -RestoreContentOnly
9897
```
99-
10098
>Restore used for scenarios where multiple apps with the same name have been deleted with `-DeletedSiteId`
10199
```powershell
102100
Restore-AzDeletedWebApp -ResourceGroupName <original_rg> -Name <original_app> -DeletedId /subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/providers/Microsoft.Web/locations/location/deletedSites/1234 -TargetAppServicePlanName <my_asp>
@@ -105,38 +103,38 @@ Restore-AzDeletedWebApp -ResourceGroupName <original_rg> -Name <original_app> -D
105103

106104
The inputs for command are:
107105

108-
- **Target Resource Group**: Target resource group where the app is to be restored
109-
- **TargetName**: Target app for the deleted app to be restored to
110-
- **TargetAppServicePlanName**: App Service plan linked to the app
111-
- **Name**: Name for the app, should be globally unique.
112-
- **ResourceGroupName**: Original resource group for the deleted app, you can get it from Get-AzDeletedWebApp -Name <your_deleted_app> -Location <your_deleted_app_location>
113-
- **Slot**: Slot for the deleted app
114-
- **RestoreContentOnly**: By default `Restore-AzDeletedWebApp` restores both your app configuration as well any content. If you want to only restore content, you can use the `-RestoreContentOnly` flag with this commandlet.
106+
- **`Target Resource Group`**: Target resource group to which you're restoring the app.
107+
- **`TargetName`**: Target app to which you're restoring the deleted app.
108+
- **`TargetAppServicePlanName`**: App Service plan linked to the app.
109+
- **Name**: Name for the app. We recommend that it's globally unique.
110+
- **`ResourceGroupName`**: Original resource group for the deleted app, you can get it from `Get-AzDeletedWebApp -Name <your_deleted_app> -Location <your_deleted_app_location>`
111+
- **Slot**: Slot for the deleted app.
112+
- **`RestoreContentOnly`**: By default `Restore-AzDeletedWebApp` restores both your app configuration as well any content. If you want to only restore content, you can use the `-RestoreContentOnly` flag with this commandlet.
115113

116114
> [!NOTE]
117115
> If the app was hosted on and then deleted from an App Service Environment, it can be restored only if the corresponding App Service Environment still exists.
118116
119-
## Restore deleted function app
117+
## Restore deleted Azure Functions app
120118

121-
If the function app was hosted on a **Dedicated app service plan**, it can be restored, as long as it was using the default App Service storage.
119+
If the function app was hosted on a **Dedicated app service plan**, it can be restored, as long as it used the default App Service storage.
122120

123-
1. Fetch the DeletedSiteId of the app version you want to restore, using Get-AzDeletedWebApp cmdlet:
121+
1. Fetch the `DeletedSiteId` of the app version you want to restore, by using `Get-AzDeletedWebApp` cmdlet:
124122

125123
```powershell
126124
Get-AzDeletedWebApp -ResourceGroupName <RGofDeletedApp> -Name <NameofApp>
127125
```
128-
2. Create a new function app in a Dedicated plan. Refer to the instructions for [how to create an app in the portal](../azure-functions/functions-create-function-app-portal.md#create-a-function-app).
129-
3. Restore to the newly created function app using this cmdlet:
126+
127+
1. Create a new function app in a Dedicated plan. Refer to the instructions for [how to create an app in the portal](../azure-functions/functions-create-function-app-portal.md#create-a-function-app).
128+
1. Restore to the newly created function app by using this cmdlet:
130129

131130
```powershell
132131
Restore-AzDeletedWebApp -ResourceGroupName <RGofnewapp> -Name <newApp> -deletedId "/subscriptions/xxxx/providers/Microsoft.Web/locations/xxxx/deletedSites/xxxx"
133132
```
134133

135-
Currently there's no support for Undelete (Restore-AzDeletedWebApp) Function app that's hosted in a Consumption plan or Elastic premium plan since the content resides on Azure Files in a Storage account. If you haven't 'hard' deleted that Azure Files storage account, or if the account exists and file shares haven't been deleted, then you may use the steps as workaround:
136-
134+
Currently there's no support to undelete (`Restore-AzDeletedWebApp`) a function app hosted in a Consumption plan or Elastic premium plan because the content resides on Azure Files in a storage account. If you didn't hard delete that Azure Files storage account, or if the account exists and file shares weren't deleted, then you can use the following steps as a workaround:
137135

138136
1. Create a new function app in a Consumption or Premium plan. Refer the instructions for [how to create an app in the portal](../azure-functions/functions-create-function-app-portal.md#create-a-function-app).
139-
2. Set the following [app settings](../azure-functions/functions-how-to-use-azure-function-app-settings.md?tabs=portal#settings) to refer to the old storage account , which contains the content from the previous app.
137+
1. Set the following [app settings](../azure-functions/functions-how-to-use-azure-function-app-settings.md?tabs=portal#settings) to refer to the old storage account, which contains the content from the previous app.
140138

141139
| App Setting | Suggested value |
142140
| ------------ | ---------------- |

0 commit comments

Comments
 (0)