Skip to content

Commit 3b03127

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into heidist-master
2 parents 40b53c5 + 230de29 commit 3b03127

9 files changed

+246
-32
lines changed
Loading
Loading
Loading

articles/azure-resource-manager/templates/template-deploy-what-if.md

Lines changed: 199 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Template deployment what-if (Preview)
33
description: Determine what changes will happen to your resources before deploying an Azure Resource Manager template.
44
author: mumian
55
ms.topic: conceptual
6-
ms.date: 11/20/2019
6+
ms.date: 03/05/2020
77
ms.author: jgao
88
---
99
# Resource Manager template deployment what-if operation (Preview)
@@ -13,12 +13,72 @@ Before deploying a template, you might want to preview the changes that will hap
1313
> [!NOTE]
1414
> The what-if operation is currently in preview. To use it, you must [sign up for the preview](https://aka.ms/armtemplatepreviews). As a preview release, the results may sometimes show that a resource will change when actually no change will happen. We're working to reduce these issues, but we need your help. Please report these issues at [https://aka.ms/whatifissues](https://aka.ms/whatifissues).
1515
16-
You can use the what-if operation with the `New-AzDeploymentWhatIf` PowerShell command or the [Deployments - What If](/rest/api/resources/deployments/whatif) REST operation.
16+
You can use the what-if operation with the PowerShell commands or REST API operations.
1717

18-
In PowerShell, the output looks like:
18+
In PowerShell, the output includes color-coded results that help you see the different types of changes.
1919

2020
![Resource Manager template deployment what-if operation fullresourcepayload and change types](./media/template-deploy-what-if/resource-manager-deployment-whatif-change-types.png)
2121

22+
The text ouptput is:
23+
24+
```powershell
25+
Resource and property changes are indicated with these symbols:
26+
- Delete
27+
+ Create
28+
~ Modify
29+
30+
The deployment will update the following scope:
31+
32+
Scope: /subscriptions/./resourceGroups/ExampleGroup
33+
34+
~ Microsoft.Network/virtualNetworks/vnet-001 [2018-10-01]
35+
- tags.Owner: "Team A"
36+
~ properties.addressSpace.addressPrefixes: [
37+
- 0: "10.0.0.0/16"
38+
+ 0: "10.0.0.0/15"
39+
]
40+
~ properties.subnets: [
41+
- 0:
42+
43+
name: "subnet001"
44+
properties.addressPrefix: "10.0.0.0/24"
45+
46+
]
47+
48+
Resource changes: 1 to modify.
49+
```
50+
51+
## What-if commands
52+
53+
You can use either Azure PowerShell or Azure REST API for the what-if operation.
54+
55+
### Azure PowerShell
56+
57+
To see a preview of the changes before deploying a template, add the `-Whatif` switch parameter to the deployment command.
58+
59+
* `New-AzResourceGroupDeployment -Whatif` for resource group deployments
60+
* `New-AzSubscriptionDeployment -Whatif` and `New-AzDeployment -Whatif` for subscription level deployments
61+
62+
Or, you can use the `-Confirm` switch parameter to preview the changes and get prompted to continue with the deployment.
63+
64+
* `New-AzResourceGroupDeployment -Confirm` for resource group deployments
65+
* `New-AzSubscriptionDeployment -Confirm` and `New-AzDeployment -Confirm` for subscription level deployments
66+
67+
The preceding commands return a text summary that you can manually inspect. To get an object that you can programmatically inspect for changes, use:
68+
69+
* `$results = Get-AzResourceGroupDeploymentWhatIf` for resource group deployments
70+
* `$results = Get-AzSubscriptionDeploymentWhatIf` or `$results = Get-AzDeploymentWhatIf` for subscription level deployments
71+
72+
> [!NOTE]
73+
> Prior to the release of version 2.0.1-alpha5, you used the `New-AzDeploymentWhatIf` command. This command has been replaced by the `Get-AzDeploymentWhatIf`, `Get-AzResourceGroupDeploymentWhatIf`, and `Get-AzSubscriptionDeploymentWhatIf` commands. If you've used an earlier version, you need to update that syntax. The `-ScopeType` parameter has been removed.
74+
75+
### Azure REST API
76+
77+
For REST API, use:
78+
79+
* [Deployments - What If](/rest/api/resources/deployments/whatif) for resource group deployments
80+
* [Deployments - What If At Subscription Scope](/rest/api/resources/deployments/whatifatsubscriptionscope) for subscription level deployments
81+
2282
## Change types
2383

2484
The what-if operation lists six different types of changes:
@@ -35,84 +95,191 @@ The what-if operation lists six different types of changes:
3595

3696
- **Deploy**: The resource exists, and is defined in the template. The resource will be redeployed. The properties of the resource may or may not change. The operation returns this change type when it doesn't have enough information to determine if any properties will change. You only see this condition when [ResultFormat](#result-format) is set to `ResourceIdOnly`.
3797

38-
## Deployment scope
98+
## Result format
99+
100+
You can control the level of detail that is returned about the predicted changes. In the deployment commands (`New-Az*Deployment`), use the **-WhatIfResultFormat** parameter. In the programmatic object commands (`Get-Az*DeploymentWhatIf`), use the **ResultFormat** parameter.
39101

40-
You can use the what-if operation for deployments at either the subscription or resource group level. You set the deployment scope with the `-ScopeType` parameter. The accepted values are `Subscription` and `ResourceGroup`. This article demonstrates resource group deployments.
102+
Set the format parameter to **FullResourcePayloads** to get a list of resources that will change and details about the properties that will change. Set the format parameter to **ResourceIdOnly** to get a list of resources that will change. The default value is **FullResourcePayloads**.
41103

42-
To learn about subscription level deployments, see [Create resource groups and resources at the subscription level](deploy-to-subscription.md#).
104+
The following results show the two different output formats:
43105

44-
## Result format
106+
- Full resource payloads
45107

46-
You can control the level of detail that is returned about the predicted changes. Set the `ResultFormat` parameter to `FullResourcePayloads` to get a list of resources what will change and details about the properties that will change. Set the `ResultFormat` parameter to `ResourceIdOnly` to get a list of resources that will change. The default value is `FullResourcePayloads`.
108+
```powershell
109+
Resource and property changes are indicated with these symbols:
110+
- Delete
111+
+ Create
112+
~ Modify
47113
48-
The following screenshots show the two different output formats:
114+
The deployment will update the following scope:
49115
50-
- Full resource payloads
116+
Scope: /subscriptions/./resourceGroups/ExampleGroup
51117
52-
![Resource Manager template deployment what-if operation fullresourcepayloads output](./media/template-deploy-what-if/resource-manager-deployment-whatif-output-fullresourcepayload.png)
118+
~ Microsoft.Network/virtualNetworks/vnet-001 [2018-10-01]
119+
- tags.Owner: "Team A"
120+
~ properties.addressSpace.addressPrefixes: [
121+
- 0: "10.0.0.0/16"
122+
+ 0: "10.0.0.0/15"
123+
]
124+
~ properties.subnets: [
125+
- 0:
126+
127+
name: "subnet001"
128+
properties.addressPrefix: "10.0.0.0/24"
129+
130+
]
131+
132+
Resource changes: 1 to modify.
133+
```
53134

54135
- Resource ID only
55136

56-
![Resource Manager template deployment what-if operation resourceidonly output](./media/template-deploy-what-if/resource-manager-deployment-whatif-output-resourceidonly.png)
137+
```powershell
138+
Resource and property changes are indicated with this symbol:
139+
! Deploy
140+
141+
The deployment will update the following scope:
142+
143+
Scope: /subscriptions/./resourceGroups/ExampleGroup
144+
145+
! Microsoft.Network/virtualNetworks/vnet-001
146+
147+
Resource changes: 1 to deploy.
148+
```
57149

58150
## Run what-if operation
59151

60152
### Set up environment
61153

62-
To see how what-if works, let's runs some tests. First, deploy a template from [Azure Quickstart templates that creates a storage account](https://github.com/Azure/azure-quickstart-templates/blob/master/101-storage-account-create/azuredeploy.json). The default storage account type is `Standard_LRS`. You'll use this storage account to test how changes are reported by what-if.
154+
To see how what-if works, let's runs some tests. First, deploy a [template that creates a virtual network](https://github.com/Azure/azure-docs-json-samples/blob/master/azure-resource-manager/what-if/what-if-before.json). You'll use this virtual network to test how changes are reported by what-if.
63155

64-
```azurepowershell-interactive
156+
```azurepowershell
65157
New-AzResourceGroup `
66158
-Name ExampleGroup `
67159
-Location centralus
68160
New-AzResourceGroupDeployment `
69161
-ResourceGroupName ExampleGroup `
70-
-TemplateUri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-storage-account-create/azuredeploy.json"
162+
-TemplateUri "https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/what-if/what-if-before.json"
71163
```
72164

73165
### Test modification
74166

75-
After the deployment completes, you're ready to test the what-if operation. Run the what-if command but change the storage account type to `Standard_GRS`.
167+
After the deployment completes, you're ready to test the what-if operation. This time deploy a [template that changes the virtual network](https://github.com/Azure/azure-docs-json-samples/blob/master/azure-resource-manager/what-if/what-if-after.json). It is missing one the original tags, a subnet has been removed, and the address prefix has changed.
76168

77-
```azurepowershell-interactive
78-
New-AzDeploymentWhatIf `
79-
-ScopeType ResourceGroup `
169+
```azurepowershell
170+
New-AzResourceGroupDeployment `
171+
-Whatif `
80172
-ResourceGroupName ExampleGroup `
81-
-TemplateUri "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-storage-account-create/azuredeploy.json" `
82-
-storageAccountType Standard_GRS
173+
-TemplateUri "https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/what-if/what-if-after.json"
83174
```
84175

85-
The what-if output is similar to:
176+
The what-if output appears similar to:
177+
178+
![Resource Manager template deployment what-if operation output](./media/template-deploy-what-if/resource-manager-deployment-whatif-change-types.png)
179+
180+
The text output is:
181+
182+
```powershell
183+
Resource and property changes are indicated with these symbols:
184+
- Delete
185+
+ Create
186+
~ Modify
187+
188+
The deployment will update the following scope:
86189
87-
![Resource Manager template deployment what-if operation output](./media/template-deploy-what-if/resource-manager-deployment-whatif-output.png)
190+
Scope: /subscriptions/./resourceGroups/ExampleGroup
191+
192+
~ Microsoft.Network/virtualNetworks/vnet-001 [2018-10-01]
193+
- tags.Owner: "Team A"
194+
~ properties.addressSpace.addressPrefixes: [
195+
- 0: "10.0.0.0/16"
196+
+ 0: "10.0.0.0/15"
197+
]
198+
~ properties.subnets: [
199+
- 0:
200+
201+
name: "subnet001"
202+
properties.addressPrefix: "10.0.0.0/24"
203+
204+
]
205+
206+
Resource changes: 1 to modify.
207+
```
88208

89209
Notice at the top of the output that colors are defined to indicate the type of changes.
90210

91-
At the bottom of the output, it shows the sku name (storage account type) will be changed from **Standard_LRS** to **Standard_GRS**.
211+
At the bottom of the output, it shows the tag Owner was deleted. The address prefix changed from 10.0.0.0/16 to 10.0.0.0/15. The subnet named subnet001 was deleted. Remember this changes weren't actually deployed. You see a preview of the changes that will happen if you deploy the template.
212+
213+
Some of the properties that are listed as deleted won't actually change. Properties can be incorrectly reported as deleted when they aren't in the template, but are automatically set during deployment as default values. This result is considered "noise" in the what-if response. The final deployed resource will have the values set for the properties. As the what-if operation matures, these properties will be filtered out of the result.
214+
215+
## Programmatically evaluate what-if results
216+
217+
Now, let's programmatically evaluate the what-if results by setting the command to a variable.
92218

93-
Some of the properties that are listed as deleted won't actually change. In the preceding image, these properties are accessTier, encryption.keySource and others in that section. Properties can be incorrectly reported as deleted when they aren't in the template, but are automatically set during deployment as default values. This result is considered "noise" in the what-if response. The final deployed resource will have the values set for the properties. As the what-if operation matures, these properties will be filtered out of the result.
219+
```azurepowershell
220+
$results = Get-AzResourceGroupDeploymentWhatIf `
221+
-ResourceGroupName ExampleGroup `
222+
-TemplateUri "https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/azure-resource-manager/what-if/what-if-after.json"
223+
```
224+
225+
You can see a summary of each change.
226+
227+
```azurepowershell
228+
foreach ($change in $results.Changes)
229+
{
230+
$change.Delta
231+
}
232+
```
94233

95-
### Test deletion
234+
## Confirm deletion
96235

97236
The what-if operation supports using [deployment mode](deployment-modes.md). When set to complete mode, resources not in the template are deleted. The following example deploys a [template that has no resources defined](https://github.com/Azure/azure-docs-json-samples/blob/master/empty-template/azuredeploy.json) in complete mode.
98237

99-
```azurepowershell-interactive
100-
New-AzDeploymentWhatIf `
101-
-ScopeType ResourceGroup `
238+
To preview changes before deploying a template, use the `-Confirm` switch parameter with the deployment command. If the changes are as you expected, confirm that you want the deployment to complete.
239+
240+
```azurepowershell
241+
New-AzResourceGroupDeployment `
242+
-Confirm `
102243
-ResourceGroupName ExampleGroup `
103244
-TemplateUri "https://raw.githubusercontent.com/Azure/azure-docs-json-samples/master/empty-template/azuredeploy.json" `
104245
-Mode Complete
105246
```
106247

107-
Because no resources are defined in the template and the deployment mode is set to complete, the storage account will be deleted.
248+
Because no resources are defined in the template and the deployment mode is set to complete, the virtual network will be deleted.
108249

109250
![Resource Manager template deployment what-if operation output deployment mode complete](./media/template-deploy-what-if/resource-manager-deployment-whatif-output-mode-complete.png)
110251

111-
It's important to remember what-if makes no actual changes. The storage account still exists in your resource group.
252+
The text output is:
253+
254+
```powershell
255+
Resource and property changes are indicated with this symbol:
256+
- Delete
257+
258+
The deployment will update the following scope:
259+
260+
Scope: /subscriptions/./resourceGroups/ExampleGroup
261+
262+
- Microsoft.Network/virtualNetworks/vnet-001
263+
264+
id:
265+
"/subscriptions/./resourceGroups/ExampleGroup/providers/Microsoft.Network/virtualNet
266+
works/vnet-001"
267+
location: "centralus"
268+
name: "vnet-001"
269+
tags.CostCenter: "12345"
270+
tags.Owner: "Team A"
271+
type: "Microsoft.Network/virtualNetworks"
272+
273+
Resource changes: 1 to delete.
274+
275+
Are you sure you want to execute the deployment?
276+
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
277+
```
278+
279+
You see the expected changes and can confirm that you want the deployment to run.
112280

113281
## Next steps
114282

115283
- If you notice incorrect results from the preview release of what-if, please report the issues at [https://aka.ms/whatifissues](https://aka.ms/whatifissues).
116284
- To deploy templates with Azure PowerShell, see [Deploy resources with Resource Manager templates and Azure PowerShell](deploy-powershell.md).
117285
- To deploy templates with REST, see [Deploy resources with Resource Manager templates and Resource Manager REST API](deploy-rest.md).
118-
- To roll back to a successful deployment when you get an error, see [Rollback on error to successful deployment](rollback-on-error.md).
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: About Azure file share backup
3+
description: Learn how to back up Azure file shares in the Recovery Services vault
4+
ms.topic: conceptual
5+
ms.date: 03/05/2020
6+
---
7+
8+
# About Azure file share backup
9+
10+
Azure file share backup is a native, cloud based backup solution that protects your data in the cloud and eliminates additional maintenance overheads involved in on-premises backup solutions. The Azure Backup service smoothly integrates with Azure file sync, and allows you to centralize your file share data as well as your backups. This simple, reliable, and secure solution enables you to configure protection for your enterprise file shares in few simple steps with an assurance that you can recover your data in case of any disaster scenario.
11+
12+
## Key benefits of Azure file share backup
13+
14+
* Zero infrastructure: No deployment is needed to configure protection for your file shares.
15+
* Built in management capabilities: You can schedule backups and specify the desired retention period without the additional overhead of data pruning.
16+
* Instant restore: Azure file share backup uses file share snapshots, so you can select just the files you want to restore instantly.
17+
* Alerting and reporting: You can configure alerts for backup and restore failures and use the reporting solution provided by Azure Backup to get insights on backups across your files shares.
18+
19+
## Architecture
20+
21+
![Azure file share backup architecture](./media/azure-file-share-backup-overview/azure-file-shares-backup-architecture.png)
22+
23+
## How the backup process works
24+
25+
1. The first step in configuring backup for Azure File shares is creating a recovery services vault. The vault gives you a consolidated view of the backups configured across different workloads.
26+
27+
2. Once you create a vault, the Azure Backup service discovers the storage accounts that can be registered with the vault. You can select the storage account hosting the file shares you want to protect.
28+
29+
3. After you select the storage account, the Azure Backup service lists the set of file shares present in the storage account and stores their names in the management layer catalog.
30+
31+
4. You then configure the backup policy (schedule and retention) according to your requirements, and select the file shares to back up. The Azure Backup service registers the schedules in the control plane to do scheduled backups.
32+
33+
5. Based on the policy specified, the Azure Backup scheduler triggers backups at the scheduled time. As part of that job, the file share snapshot is created using the File share API. Only the snapshot URL is stored in the metadata store.
34+
35+
>[!NOTE]
36+
>The file share data is not transferred to the Backup service, since the Backup service creates and manages snapshots that are part of your storage account.
37+
38+
6. You can restore the Azure file share contents (individual files or the full share) from snapshots available on the source file share. Once the operation is triggered, the snapshot URL is retrieved from the metadata store and the data is listed and transferred from the source snapshot to the target file share of your choice.
39+
40+
7. The backup and restore job monitoring data is pushed to the Azure Backup Monitoring service. This allows you to monitor cloud backups for your file shares in a single dashboard. In addition, you can also configure alerts or email notifications when backup health is affected. Emails are sent via the Azure email service.
41+
42+
## Next steps
43+
44+
* Learn how to [Back up Azure file shares](backup-afs.md)
45+
* Find answers to [Questions about backing up Azure Files](backup-azure-files-faq.md)
94.9 KB
Loading

articles/backup/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@
160160
items:
161161
- name: From the Azure portal
162162
items:
163+
- name: Overview
164+
href: azure-file-share-backup-overview.md
163165
- name: Backup
164166
href: backup-afs.md
165167
- name: Restore

0 commit comments

Comments
 (0)