Creating a Recovery Services vault

An Azure Recovery Services vault is a native service within Azure that stores data such as copies of data (backups), as well as configures VMs, servers, files, and more. An Recovery Services vault enables you to use the following:

• Azure Backup: Azure Backup is used to back up VMs, Azure File Shares, SQL servers, files and folders on-premises, Microsoft SharePoint, Microsoft Exchange, SAP HANA databases in Azure VMs, Azure Database for PostgreSQL servers, Azure Blobs, and Azure Managed Disks.

• Site Recovery: Site recovery is used for disaster recovery if resources become unavailable. This can be in a specific region within Azure or another data center located elsewhere, such as an on-premises environment.

Here are some of the benefits of using Recovery Services vaults:

• Security: Security is provided as part of the service to help protect cloud backups to ensure they can be safely recovered.

• Hybrid: Recovery Services vault enables Azure Backup to support cloud and on-premises workloads.

• Permissions: Role-Based Access Control (RBAC) permissions are supported to delegate the correct permissions to administrators or backup owners.

• Soft Delete: This is a feature that protects backups or backup data from being deleted by accident or maliciously. The data will be retained for 14 days after deletion to ensure there’s no data loss.

Let’s learn how to create a Recovery Services vault in our existing resource group (Az-104)

via PowerShell:

  1. First, we need to connect to our Azure tenant by using the Connect-AzAccount PowerShell command:

Figure 21.1 – Connecting to our Azure tenant via PowerShell

  1. If you have multiple subscriptions, you can use the Select-AzSubscription -SubscriptionId “your-subscription-id” PowerShell command to select a specific subscription.
  2. Now that we have selected our Azure tenant and subscription, let’s go ahead and create a new Recovery Services Vault by using New-AzRecoveryServicesVault -Name Az104RecoveryServicesVault -ResourceGroupName Az-104 -Location EastUS:

Figure 21.2 – Recovery Service vault created via PowerShell

  1. Next, we are going to set the redundancy level to georedundant storage:

$vault1 = Get-AzRecoveryServicesVault -Name Az104RecoveryServicesVault Set-AzRecoveryServicesBackupProperty -Vault $vault1 -BackupStorageRedundancy GeoRedundant

  1. The next step is to confirm that the new vault has been created in the specified resource group within Azure:

Figure 21.3 – Newly created Recovery Services vault

With that, we have successfully created a new Recovery Services vault within Azure via PowerShell. In the next section, we are going to take this a step further and discuss Azure Backup and how to configure a backup policy.