Skip to content

Commit b7f47d1

Browse files
committed
Merge branch 'main' into release-migrate-new-structure
2 parents 09bb72a + 85af13f commit b7f47d1

File tree

93 files changed

+1654
-1252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1654
-1252
lines changed

articles/api-management/api-management-howto-api-inspector.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Detailed steps follow.
9797
9898
```json
9999
{
100-
"credentialsExpireAfter": PT1H,
100+
"credentialsExpireAfter": "PT1H",
101101
"apiId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}",
102102
"purposes": ["tracing"]
103103
}
Lines changed: 72 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,145 +1,150 @@
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 a 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 list, select the deleted app. Apps that were deleted in the last 30 days appear in the list.
23+
1. Select the destination app from the dropdown list that correlates to where you want to restore your app.
24+
1. If you want to restore the deleted app to a slot of the destination app, select the slot checkbox and select available slots from the dropdown list.
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

47-
For details on a specific deleted app you can use:
47+
To get details on a specific deleted app, you can use:
4848

4949
```powershell
5050
Get-AzDeletedWebApp -Name <your_deleted_app> -Location <your_deleted_app_location>
5151
```
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 that contains 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.
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 cmdlet.
70+
>* Custom domains, bindings, or certs that you import to your app aren't restored. You need to add them again after your app is restored.
71+
72+
After you identify the app you want to restore, you can restore it by using `Restore-AzDeletedWebApp`, as shown in the following examples.
7073

74+
You can find the full cmdlet reference here: [`Restore-AzDeletedWebApp`](/powershell/module/az.websites/restore-azdeletedwebapp).
7175

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)*** .
76+
Restore to the original app name:
7477

75-
>Restore to the original app name:
7678
```powershell
7779
Restore-AzDeletedWebApp -TargetResourceGroupName <my_rg> -Name <my_app> -TargetAppServicePlanName <my_asp>
7880
```
7981

80-
>Restore to a different app name:
82+
Restore to a different app name:
83+
8184
```powershell
8285
Restore-AzDeletedWebApp -ResourceGroupName <original_rg> -Name <original_app> -TargetResourceGroupName <target_rg> -TargetName <target_app> -TargetAppServicePlanName <target_asp>
8386
```
8487

85-
>Restore a slot to target app:
88+
Restore a slot to the target app:
89+
8690
```powershell
8791
Restore-AzDeletedWebApp -TargetResourceGroupName <my_rg> -Name <my_app> -TargetAppServicePlanName <my_asp> -Slot <original_slot>
8892
```
8993

9094
> [!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.
95+
> Deployment slots aren't restored as part of your app. If you need to restore a staging slot, use the `-Slot <slot-name>` flag.
96+
> The cmdlet restores the original slot to the target app's production slot.
97+
> 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 cmdlet.
98+
99+
Restore only site content to the target app:
94100

95-
>Restore only site content to the target app
96101
```powershell
97102
Restore-AzDeletedWebApp -TargetResourceGroupName <my_rg> -Name <my_app> -TargetAppServicePlanName <my_asp> -RestoreContentOnly
98103
```
99104

100-
>Restore used for scenarios where multiple apps with the same name have been deleted with `-DeletedSiteId`
105+
Restore in scenarios where multiple apps with the same name were deleted with `-DeletedSiteId`:
106+
101107
```powershell
102108
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>
103109
104110
```
105111

106112
The inputs for command are:
107113

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.
114+
- **Target Resource Group**: Target resource group where the app will be restored.
115+
- **TargetName**: Target app to which you're restoring the deleted app.
116+
- **TargetAppServicePlanName**: App Service plan linked to the app.
117+
- **Name**: Name for the app. We recommend that it's globally unique.
118+
- **ResourceGroupName**: Original resource group for the deleted app. You can get it from `Get-AzDeletedWebApp -Name <your_deleted_app> -Location <your_deleted_app_location>`.
119+
- **Slot**: Slot for the deleted app.
120+
- **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 cmdlet.
115121

116122
> [!NOTE]
117123
> 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.
118124
119-
## Restore deleted function app
125+
## Restore deleted Azure Functions app
120126

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.
127+
If a function app was hosted on a Dedicated App Service plan, it can be restored, as long as it used the default App Service storage.
122128

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

125-
```powershell
126-
Get-AzDeletedWebApp -ResourceGroupName <RGofDeletedApp> -Name <NameofApp>
127-
```
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:
131+
```powershell
132+
Get-AzDeletedWebApp -ResourceGroupName <RGofDeletedApp> -Name <NameofApp>
133+
```
130134

131-
```powershell
132-
Restore-AzDeletedWebApp -ResourceGroupName <RGofnewapp> -Name <newApp> -deletedId "/subscriptions/xxxx/providers/Microsoft.Web/locations/xxxx/deletedSites/xxxx"
133-
```
135+
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). Restore to the newly created function app by using this cmdlet:
136+
137+
```powershell
138+
Restore-AzDeletedWebApp -ResourceGroupName <RGofnewapp> -Name <newApp> -deletedId "/subscriptions/xxxx/providers/Microsoft.Web/locations/xxxx/deletedSites/xxxx"
139+
```
134140

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-
141+
Currently there's no support to use the `Restore-AzDeletedWebApp` cmdlet to undelete 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 you didn't delete file shares, you can use the following steps as a workaround:
137142

138143
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.
144+
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.
140145

141-
| App Setting | Suggested value |
142-
| ------------ | ---------------- |
143-
| **AzureWebJobsStorage** | Connection String for the storage account used by the deleted app. |
144-
| **WEBSITE_CONTENTAZUREFILECONNECTIONSTRING** | Connection String for the storage account used by the deleted app. |
145-
| **WEBSITE_CONTENTSHARE** | File share on storage account used by the deleted app. |
146+
| App setting | Suggested value |
147+
| ------------ | ---------------- |
148+
| `AzureWebJobsStorage` | Connection string for the storage account used by the deleted app |
149+
| `WEBSITE_CONTENTAZUREFILECONNECTIONSTRING` | Connection string for the storage account used by the deleted app |
150+
| `WEBSITE_CONTENTSHARE` | File share on storage account used by the deleted app |

0 commit comments

Comments
 (0)