Skip to content

Commit 2ca551b

Browse files
authored
Merge pull request #113302 from davidsmatlak/ds-armquickstart
New quickstart to create vault from ARM template
2 parents 1ab7a5b + 13de667 commit 2ca551b

File tree

4 files changed

+173
-0
lines changed

4 files changed

+173
-0
lines changed
137 KB
Loading
30.4 KB
Loading
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
---
2+
title: Quickstart to create an Azure Recovery Services vault using an Azure Resource Manager template.
3+
description: In this quickstart, you learn how to create an Azure Recovery Services vault using an Azure Resource Manager template.
4+
ms.topic: quickstart
5+
ms.custom: subject-armqs
6+
ms.date: 04/29/2020
7+
author: davidsmatlak
8+
ms.author: v-dasmat
9+
---
10+
11+
# Quickstart: Create a Recovery Services vault using a Resource Manager template
12+
13+
This quickstart describes how to set up a Recovery Services vault by using an Azure Resource Manager
14+
template. The [Azure Site Recovery](site-recovery-overview.md) service contributes to your business
15+
continuity and disaster recovery (BCDR) strategy so your business applications stay online during
16+
planned and unplanned outages. Site Recovery manages disaster recovery of on-premises machines and
17+
Azure virtual machines (VM), including replication, failover, and recovery.
18+
19+
[!INCLUDE [About Azure Resource Manager](../../includes/resource-manager-quickstart-introduction.md)]
20+
21+
If you don't have an active Azure subscription, you can create a
22+
[free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
23+
24+
## Prerequisites
25+
26+
None.
27+
28+
## Create a Recovery Services vault
29+
30+
### Review the template
31+
32+
The template used in this quickstart is from
33+
[Azure Quickstart templates](https://azure.microsoft.com/resources/templates/101-recovery-services-vault-create/).
34+
35+
:::code language="json" source="~/quickstart-templates/101-recovery-services-vault-create/azuredeploy.json" range="1-66" highlight="41-65":::
36+
37+
Two Azure resources are defined in the template:
38+
39+
- [Microsoft.RecoveryServices vaults](/azure/templates/microsoft.recoveryservices/2016-06-01/vaults): creates the vault.
40+
- [Microsoft.RecoveryServices/vaults/backupstorageconfig](/rest/api/backup/backupresourcestorageconfigs): configures the vault's backup redundancy settings.
41+
42+
The template includes optional parameters for the vault's backup configuration. The storage
43+
redundancy settings are locally-redundant storage (LRS) or geo-redundant storage (GRS). For more
44+
information, see [Set storage redundancy](../backup/backup-create-rs-vault.md#set-storage-redundancy).
45+
46+
For more Azure Recovery Services templates, see [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/?resourceType=Microsoft.Recoveryservices&pageNumber=1&sort=Popular).
47+
48+
### Deploy the template
49+
50+
To deploy the template, the **Subscription**, **Resource group**, and **Vault name** are required.
51+
52+
1. To sign in to Azure and open the template, select the **Deploy to Azure** image.
53+
54+
[![Deploy to Azure](../media/template-deployments/deploy-to-azure.svg)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-recovery-services-vault-create%2Fazuredeploy.json)
55+
56+
1. Select or enter the following values:
57+
58+
:::image type="content" source="media/quickstart-create-vault-template/create-vault-template.png" alt-text="Template to create a Recovery Services vault.":::
59+
60+
- **Subscription**: select your Azure subscription.
61+
- **Resource group**: select an existing group or select **Create new** to add a group.
62+
- **Location**: defaults to the resource group's location and becomes unavailable after a
63+
resource group is selected.
64+
- **Vault Name**: Provide a name for the vault.
65+
- **Change Storage Type**: Default is **false**. Select **true** only if you need to change the
66+
vault's storage type.
67+
- **Vault Storage Type**: Default is **GloballyRedundant**. If the storage type was set to
68+
**true**, select **LocallyRedundant**.
69+
- **Location**: the function `[resourceGroup().location]` defaults to the resource group's
70+
location. To change the location, enter a value such as **westus**.
71+
- Select the check box **I agree to the terms and conditions stated above**.
72+
73+
1. To begin the vault's deployment, select the **Purchase** button. After a successful deployment, a
74+
notification is displayed.
75+
76+
:::image type="content" source="media/quickstart-create-vault-template/deploymentsuccess.png" alt-text="Vault deployment was successful.":::
77+
78+
## Validate the deployment
79+
80+
To confirm that the vault was created, use Azure CLI or Azure PowerShell.
81+
82+
# [CLI](#tab/CLI)
83+
84+
```azurecli-interactive
85+
echo "Enter the resource group name:" &&
86+
read resourceGroupName &&
87+
echo "Enter the vault name:" &&
88+
read vaultName &&
89+
az backup vault show --name $vaultName --resource-group $resourceGroupName &&
90+
az backup vault backup-properties show --name $vaultName --resource-group $resourceGroupName &&
91+
echo "Press [ENTER] to continue ..."
92+
```
93+
94+
# [PowerShell](#tab/PowerShell)
95+
96+
```azurepowershell-interactive
97+
$resouceGroupName = Read-Host -Prompt "Enter the resource group name"
98+
$vaultName = Read-Host -Prompt "Enter the vault name"
99+
$vaultBackupConfig = Get-AzRecoveryServicesVault -Name $vaultName
100+
Get-AzRecoveryServicesVault -ResourceGroupName $resouceGroupName -Name $vaultName
101+
Get-AzRecoveryServicesBackupProperty -Vault $vaultBackupConfig
102+
Write-Host "Press [ENTER] to continue..."
103+
```
104+
105+
---
106+
107+
The following output is an excerpt of the vault's information:
108+
109+
# [CLI](#tab/CLI)
110+
111+
```Output
112+
"id": "/subscriptions/<Subscription Id>/resourceGroups/myResourceGroup
113+
/providers/Microsoft.RecoveryServices/vaults/myVault"
114+
"location": "eastus"
115+
"name": "myVault"
116+
"resourceGroup": "myResourceGroup"
117+
118+
"storageModelType": "GeoRedundant"
119+
"storageType": "GeoRedundant"
120+
"type": "Microsoft.RecoveryServices/vaults/backupstorageconfig"
121+
```
122+
123+
# [PowerShell](#tab/PowerShell)
124+
125+
```Output
126+
Name : myVault
127+
Type : Microsoft.RecoveryServices/vaults
128+
Location : eastus
129+
ResourceGroupName : myResourceGroup
130+
SubscriptionId : <Subscription Id>
131+
132+
BackupStorageRedundancy
133+
-----------------------
134+
GeoRedundant
135+
```
136+
137+
---
138+
139+
## Clean up resources
140+
141+
If you plan to use the new resources, no action is needed. Otherwise, you can remove the resource
142+
group and vault that was created in this quickstart. To delete the resource group and its resources
143+
use Azure CLI or Azure PowerShell.
144+
145+
# [CLI](#tab/CLI)
146+
147+
```azurecli-interactive
148+
echo "Enter the resource group name:" &&
149+
read resourceGroupName &&
150+
az group delete --name $resourceGroupName &&
151+
echo "Press [ENTER] to continue ..."
152+
```
153+
154+
# [PowerShell](#tab/PowerShell)
155+
156+
```azurepowershell-interactive
157+
$resouceGroupName = Read-Host -Prompt "Enter the resource group name"
158+
Remove-AzResourceGroup -Name $resouceGroupName
159+
Write-Host "Press [ENTER] to continue..."
160+
```
161+
162+
---
163+
164+
## Next steps
165+
166+
In this quickstart, you created a Recovery Services vault. To learn more about disaster recovery,
167+
continue to the next quickstart article.
168+
169+
> [!div class="nextstepaction"]
170+
> [Set up disaster recovery](azure-to-azure-quickstart.md)

articles/site-recovery/toc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
items:
1212
- name: Replicate an Azure VM to another region
1313
href: azure-to-azure-quickstart.md
14+
- name: Create a vault - ARM template
15+
displayName: Resource Manager
16+
href: quickstart-create-vault-template.md
1417
- name: Tutorials
1518
items:
1619
- name: Azure VM disaster recovery to Azure

0 commit comments

Comments
 (0)