You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/app-service-undelete.md
+51-53
Original file line number
Diff line number
Diff line change
@@ -1,48 +1,48 @@
1
1
---
2
-
title: Restore deleted apps
2
+
title: Restore Deleted Apps
3
3
description: Learn how to restore a deleted app in Azure App Service. Avoid the headache of an accidentally deleted app.
4
4
author: seligj95
5
5
ms.author: jordanselig
6
6
ms.date: 10/4/2023
7
-
ms.topic: article
7
+
ms.topic: how-to
8
8
ms.custom: devx-track-azurepowershell
9
9
---
10
-
# Restore deleted App Service app
11
10
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
13
12
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.
15
14
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
17
16
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**.
20
21
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**.
25
26
26
-
## Restore deleted App Service app by using PowerShell
27
+
## Restore a deleted App Service app by using PowerShell
27
28
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/).
29
30
30
31
> [!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.
34
34
35
35
## Re-register App Service resource provider
36
36
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:
-**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
62
62
63
63
## Restore deleted app
64
64
65
65
>[!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.
71
71
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).
> 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.
-**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.
115
113
116
114
> [!NOTE]
117
115
> 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.
118
116
119
-
## Restore deleted function app
117
+
## Restore deleted Azure Functions app
120
118
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.
122
120
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:
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:
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:
137
135
138
136
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.
0 commit comments