How to Install Azure Backup Agent

In this post, I show you how to install Azure Backup Agent on your on-premises machine and use it to back up the machine to the Azure Cloud. Azure Backup uses the MARS agent to back up files, folders, and system states from on-premises machines and Azure VMs. You can take the backup for your Azure VM with VM Settings and store the backup in the Azure Recovery Services vault. Please see how to secure a Web Server on a Windows VM in Azure using TLS/SSL Certificates Saved in Azure Key Vault, and how to secure a Web Server on a Windows VM in Azure using TLS/SSL Certificates Saved in Azure Key Vault.
The MARS agent, also known as the Microsoft Azure Recovery Services (MARS) agent, is a software tool used to back up data from on-premises Windows machines and Azure VMs to a Recovery Services vault in Azure.
Azure Backup requires an Azure Recovery Services Vault for the storage of backup data in Azure using the Azure Backup Agent setup on the on-premises machine. There are various ways to back up your files; you can set up Norton Cloud Backup on Windows. Check out the Virtual Machine Snapshot vs Backup post to learn about VM snapshots and backups. You can also set up Veeam Backup for Microsoft Azure.
Azure Recovery Services Vault is a centralized management service in Azure that acts as a storage container for backup data and recovery points created from various Azure services and on-premises sources.
Why an Azure Backup Agent?
With Azure Backup Agent, you can back up specific files and folders or entire volumes. You can also back up the entire system state of your machine. This gives you granular control over what gets protected. The MARS agent seamlessly integrates with Azure Backup, making it easy to manage your backups and restore data.
Install Azure Backup Agent
To install Azure Backup Agent and initiate your first backup to Azure, you need to carry out the following steps:
Step 1: Create Azure Recovery Services Vault
All the backups will be stored in the Recovery Services Vault. So, the first resource to set up is the Recovery Services Vault. Kindly refer to one of my previous guides on backing up Azure VM with VM Settings to learn how to create a Recovery Services Vault.
Next, modify the storage replication from geo-redundant storage (GRS) to locally redundant storage (LRS) to reduce Azure storage costs.
To do so, from the Recovery Services vault you created, locate Properties -> Backup Configuration -> Updates -> Select Locally redundant storage and click on Save.

Step 2: Download and Install the MARS agent
In this step, you download and install the MARS agent on the on-premise machine to set up the backup. To do so, from the properties tab of the Recovery Services vault, locate the download under Recovery Services, or you can download it from here.

Step 3: Prepare Backup Infrastructure
Locate backup under the “Getting Started” tab

Select On-Premises as where your workloads are running, and select files and folders as the workloads you want to backup.
Next, click on Prepare Infrastructure:

On the Prepare Infrastructure page, download the vault credentials if you have not already done so, but if you have already downloaded the agent, check “Already downloaded.”

Note, you will need the vault credentials file above for server registration later in this demonstration. It also set to expire after 10 days.
As shown in the screenshot above, we can browse the jobs page, and we can also browse the alerts page to set up email notifications.
We will come back to the steps above. For now, let’s run the MARS agent installation on our on-premises machine.
Step 4: Install the MARS Agent on the On-Premises Machine
From the download folder of your on-premises machine, double-click on the MARS Agent you downloaded earlier. Leave everything as default and click on Next to continue.

On the proxy configuration page, leave everything as default and click on Next.

On the Microsoft Update Opt-In page, specify if you want to use Microsoft Update or not. Here, I selected that I do not want to use Microsoft Update.

Proceed to the installation page and click on Install.

As soon as you click on Install, the installation process will begin. Grab a cup of coffee and wait for it to finish.

Proceed to register your backup vault by clicking on “Proceed to Registration.”

Step 5: Register Server
As soon as you proceed to register your server, you will be taken to an interface similar to the one below:

From the screen above, select the credentials file you downloaded, and then select Next.

The next step requires that you generate a passphrase.
Note: The best practice is to store your passphrase securely in the Azure Key Vault.
If you have configured your key vault to store a passphrase, enter the key vault URL as shown below. For the sake of this demo, we will not store passphrase in the Azure Key Vault.

Here, I store the passphrase locally.

In the server registration screen, wait for it to complete.

Once it is complete, click on Close, leaving the “Launch Microsoft Azure Recovery Services Agent” dialog box checked. This enables you to launch the agent as soon as you click on Close.

Note you must configure and schedule backup options before your server can be backed up.
Step 6: Configure and Schedule Backup Options
When the MARS Agent opens up, click on “Schedule Backup.”

On the Getting Started screen, click Next to proceed.

Select a backup item. To select a backup item, click on Add Items, select C:\ drive, and then click OK.

The screenshot below shows that a backup item has been selected. Click next to continue.

Specify a backup schedule. As shown below, I specify the backup schedule as Week, set the timing at midnight, and select Monday – Friday.

Click on Next to continue.
Configure a retention policy. As shown below, the backup data will be retained for 104 weeks, 60 months, and 10 years. This policy is the default policy, and I will leave it as is.

Configure the initial backup type. Here, I chose online and clicked on Next.

On confirmation, click Finish

Take your first backup.

Configure a retention backup until the date you wish.

Confirmation

Backup in Progress

Check Azure Portal to verify the backup item

Clicking on Azure Backup Agent takes you to the status of your last backup. As shown below, the first backup we took was successful.

Navigate to Backup > Prepare infrastructure > Browse the jobs page to view backup jobs.

Step 7: Configure the Backup Email Notifications
As mentioned previously in Step 3 above, you can configure an email alert to stay informed whenever a backup is successful.
To do so, from the prepare infrastructure page, click on the “browse alerts page.”

Click on Configure Notifications to continue to the screen to configure the notifications.

On the Configure Notifications screen, set the Email Notifications radio button to On. Enter the email addresses you would like to be notified in the recipients’ field. Choose when to notify, select the alert severity level, and then click on Save.

The alert configuration is successful, as shown below.

Step 8: Clean up resources to avoid incurring Azure charges
Run az group delete --name <Resource_Group_Name> --no-wait to delete the resource group that holds the Recovery Services Vault.
Note you won't be able to delete that Resource Group if the Recovery Services Vault is still in use.
I hope you found this guide on how to install Azure Backup Agent useful. Please feel free to leave a comment below.