Skip to content

Commit 8760c04

Browse files
authored
Merge pull request #100336 from Daniellezha/patch-1
Update app-service-undelete.md
2 parents a75a362 + 796447d commit 8760c04

File tree

1 file changed

+37
-8
lines changed

1 file changed

+37
-8
lines changed

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

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,56 @@ The detailed information includes:
4949
## Restore deleted app
5050

5151
>[!NOTE]
52-
> `Restore-AzDeletedWebApp` isn't supported for function apps.
52+
>- `Restore-AzDeletedWebApp` isn't supported for function apps.
53+
>- 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.
54+
>- 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.
5355
54-
Once the app you want to restore has been identified, you can restore it using `Restore-AzDeletedWebApp`.
5556

57+
Once the app you want to restore has been identified, you can restore it using `Restore-AzDeletedWebApp`, please see below examples
58+
>*You can find the full commandlet reference here: **[Restore-AzDeletedWebApp](/powershell/module/az.websites/restore-azdeletedwebapp)*** .
59+
60+
>Restore to the original app name:
5661
```powershell
5762
Restore-AzDeletedWebApp -TargetResourceGroupName <my_rg> -Name <my_app> -TargetAppServicePlanName <my_asp>
5863
```
64+
65+
>Restore to a different app name:
66+
```powershell
67+
Restore-AzDeletedWebApp -ResourceGroupName <original_rg> -Name <original_app> -TargetResourceGroupName <target_rg> -TargetName <target_app> -TargetAppServicePlanName <target_asp>
68+
```
69+
70+
>Restore a slot to target app:
71+
```powershell
72+
Restore-AzDeletedWebApp -TargetResourceGroupName <my_rg> -Name <my_app> -TargetAppServicePlanName <my_asp> -Slot <original_slot>
73+
```
74+
5975
> [!NOTE]
6076
> Deployment slots are not restored as part of your app. If you need to restore a staging slot, use the `-Slot <slot-name>` flag.
61-
>
77+
> 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.
78+
79+
>Restore only site content to the target app
80+
```powershell
81+
Restore-AzDeletedWebApp -TargetResourceGroupName <my_rg> -Name <my_app> -TargetAppServicePlanName <my_asp> -RestoreContentOnly
82+
```
83+
84+
>Restore used for scenarios where multiple apps with the same name have been deleted with `-DeletedSiteId`
85+
```powershell
86+
Restore-AzDeletedWebApp -ResourceGroupName <original_rg> -Name <original_app> -DeletedId /subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/locations/location/deletedSites/1234 -TargetAppServicePlanName <my_asp>
87+
88+
```
6289

6390
The inputs for command are:
6491

6592
- **Target Resource Group**: Target resource group where the app will be restored
66-
- **Name**: Name for the app, should be globally unique.
93+
- **TargetName**: Target app for the deleted app to be restored to
6794
- **TargetAppServicePlanName**: App Service plan linked to the app
68-
69-
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.
95+
- **Name**: Name for the app, should be globally unique.
96+
- **ResourceGroupName**: Original resource group for the deleted app
97+
- **Slot**: Slot for the deleted app
98+
- **RestoreContentOnly**: y 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.
7099

71100
> [!NOTE]
72101
> 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.
73-
>
74102
75-
You can find the full commandlet reference here: [Restore-AzDeletedWebApp](/powershell/module/az.websites/restore-azdeletedwebapp).
103+
104+

0 commit comments

Comments
 (0)