Ready to Start Your Career?

Let’s forget the traditional way of storing, Here come secure Cloud Backup Solution.

vinothdarwin123's profile image

By: vinothdarwin123

June 25, 2019

Azure Recovery Service Vault: Recovery Service vault is a service from Microsoft for managing in house backup and data inside azure. By using this you can backup the for various Azure services such as IaaS VMs (Linux or Windows) and Azure SQL databases. Recovery Services vaults support System Center DPM, Windows Server, Azure Backup Server, and more. This is minimizing the management overhead and easy to organize your data.Azure recovery service vault can be used on premises backup as well. The Azure CLI is used to create and manage Azure resources from the command line or in scripts. Let’s manage Vault by Azure CLI.Let’s get into real time scenario where we are going recover a deleted hard disk from Backup inside azure.Create a recovery services vault:A Recovery Services vault is a logical container that stores the backup data for each protected resource, such as Azure VMs. When the backup job for a protected resource runs, it creates a recovery point inside the Recovery Services vault. You can then use one of these recovery points to restore data to a given point in time.Create a Recovery Services vault with az backup vault create$ az backup vault create --resource-group rg-01\ --name RSV01 \ --location NorthCentralUSEnable backup for an Azure VM$ az backup protection enable-for-vm \ --resource-group rg-01 \ --vault-name RSV01 \ --vm test-01 \ --policy-name DefaultPolicyAdding a New Data Disk to Linux VM:$ az vm disk attach \ -g rg-01 \ --vm-name test-01 \ --name DataDisk01 \ --new \ --size-gb 50Enabling the Backup:$ az backup protection backup-now \ --resource-group rg-01 \ --vault-name RSV01 \ --container-name test-01 \ --item-name test-01 \ --retain-until 25-12-2019Monitor the Backup Job:$ az backup job list \ --resource-group rg-01 \ --vault-name RSV01 \ --output tableList out the recent recovery point Name: $ az backup recoverypoint list \ --resource-group rg-01 \ --vault-name RSV01 \ --container-name test-01 \ --item-name test-01 \ --query [0].name \ --output tsvRestore a VM diskTo restore your disk from the recovery point, you first create an Azure storage account. This storage account is used to store the restored disk. In additional steps, the restored disk is used to create a VM.Creating Storage Account:$ az storage account create \ --resource-group rg-01 \ --name sabunty01 \ --sku Standard_LRSRestore the Disk into Storage Account: $ az backup restore restore-disks \ --resource-group rg-01\ --vault-name RSV01\ --container-name test-01\ --item-name test-01\ --storage-account sabunty01\ --rp-name 67526319273170Convert the restored Disk into Managed Disk:To use the exported disk , we need to convert them as Managed Disk.Exporting the connection string:$export AZURE_STORAGE_CONNECTION_STRING=$( az storage account show-connection-string \ --resource-group rg-01 \ --output tsv \ --name sabunty01 )Export the unmanaged disk and storing into a variable:$container=$(az storage container list --query [0].name -o tsv)$blob=$(az storage blob list --container-name $container --query [0].name -o tsv)$uri=$(az storage blob url --container-name $container --name $blob -o tsv)Conclusion: As you know that, Backup and restore was big head ache In traditional data center. Now it became very easy in azure, Start build your first recovery service vault in azure. Recovery Service vault is a service from Microsoft for managing in house backup and data inside azure. We made a real time scenario, where we made recover from hard disk from azure hosted environment. Recovery service Vault can be used to build and backup you’re on premises backup as well.Learn more about recovery service and prepare for Microsoft Azure Certifications with Cybrary's free Azure training courses.
Schedule Demo