AWS/Azure/OpenShift Backup

How to back up an Azure VM from the VM settings

How-to-backup-Azure-VIM-2
Azure Virtual Machine Backup

When it comes to cloud computing, Microsoft Azure is one of the leading cloud providers in the Infrastructure as a Service (IaaS) cloud model. Just as you will have your on-premises PC backed up either to external hard disk storage, and keep the backup drive offsite that’s at a place different from your business premises to avoid any disaster that may result in data loss or breach is the same way Azure also gives you the opportunity to backup your Virtual Machine in the cloud. You may be interested in learning about how to provision Azure Resources using Azure Az PowerShell Cmdlet from Cloud Shell. Also, learn about how to how to secure access to your Virtual Machine with Just-in-Time (JIT) VM Access. If you want to get started with Azure DevOps, see also how to build your first CI/CD Pipeline in Azure DevOps using ASP.Net Core Application.

In this article, I will explain how to back up Azure VMs with the Azure Backup service. You can back up Azure VMs using a couple of methods. This guide describes how to back up a single Azure VM directly from the VM menu settings.

Requirements for Initiating Azure VM Backup

Before you start, you need the following:

  1. Aan active subscription on Azure. If you don’t have one already, you can sign up for Azure free account here.
  2. Azure VM agent extension muzt be installed and running on the machine.
The point to note is if your Virtual Machine was created from an Azure Marketplace image, the agent will be running automatically immediately the VM deployment is complete. A situation where you will be required to manually installed the agent is if you create a custom VM, you migrate a machine from on-premises to Azure. 

If you do need to install the VM agent manually, follow the instructions for Windows or Linux VMs. After the agent is installed, when you enable backup, Azure Backup installs the backup extension to the agent. It updates and patches the extension without user intervention.

Create VM from Azure Portal

  1. Sign into Azure Portal at portal.azure.com
  2. Type virtual machines in the search.
  3. Under Services, select Virtual machines.
  4. In the Virtual machines page, select Create then Virtual machine.
  5. In the Basics tab, under Project details, make sure the correct subscription is selected and then choose to Create new resource group. Type a name for your Resource Group. Here we use vmbackupRg
Creating-Azure-VM

6. Under Instance details, type the name for the Virtual machine and choose the Region of your choice. Choose Windows Server 2019 Datacenter for the Image and Standard_DS1_v2 for the Size. Leave the other defaults.

7. Click Review + Create

After the VM has been created successfully, click to go to resource. This will open up the VM you just created.

Back up from Azure VM settings

  1. With VM still open down, select Backup on the VM menu
  2. In Recovery Services vault, do the following:
    • If you already have a vault, select Select existing, and select a vault.
    • If you don’t have a vault, select Create new. Specify a name for the vault. It’s created in the same region and resource group as the VM. You can’t modify these settings when you enable backup directly from the VM settings.
Azure-Recovery-Service

3. In Choose backup policy, do one of the following:

- Leave the default policy. This backs up the VM once a day at the time specified, and    retains backups in the vault for 30 days.
- Select an existing backup policy if you have one.
- Create a new policy, and define the policy settings.

4. Click Edit this policy. Please note this is not compulsory as you choose to go with the default settings. You might just do this to enable you to explore the available backup policy options you can select based on your preference.

VM-Back-policy
VM Backup Policy Settings

5. Select Enable Backup. This associates the backup policy with the VM.

Summary-of-Backup-policy
Summary of Back Policy

The screenshot above shows the summary of the backup policy we defined. You can track the configuration progress in the portal notifications.

Deployment-Template
VM Backup Deployment Progress

After the job completes, in the VM menu, select Backup. The page shows the backup status for the VM, information about recovery points, jobs running, and alerts issued.

Back-up-Status
VM Backup Status
After enabling backup, an initial backup runs. You can start the initial backup immediately, or wait until it starts in accordance with the backup schedule. Until the initial backup completes, Last backup status shows as Warning (Initial backup pending). To see when the next scheduled backup will run, select the backup policy name.

The below screen shows you the overview screen of the jobs and backup instances.

Data-Source-Azure-VM
Backup Summary

Run a VM backup immediately

  1. To run a backup immediately after the initial backup is complete, in the VM menu, select Backup > Backup now.
Backup-Immediately
Backup VM Immediately

2. In Backup Now, use the calendar control to select until when the recovery point will be retained and OK.

Back-schedule
Backup Schedule

As you can see from the screenshot, my next backup will occur on December 1st, 2021.

Congratulations, you have just succeeded in configuring backup for your Azure Virtual Machine.

One last thing you need to do is to clean up your environment to avoid incurring unnecessary charges from Azure. To do so, launch the Cloud Shell directly on the Azure Portal, Select the PowerShell option and run the PowerShell command shown below:

Remove-AzResourceGroup -Name YourResourceGroup
PowerShell
Deleting Resource Group via PowerShell

Remember Resource group is the logical folder where the VM and the Backup we created above are stored. So deleting it will delete everything at once for you.

RG
Resource Group

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Kindly subscribe to TechDirectArchive
This is default text for notification bar