• A Microsoft Azure Account.
  • Basic knowledge of Azure CLI.
  • On-Premises File server & an Azure Virtual Machine running Windows server 2016 or Linux.

You can use the Azure backup service to backup on-premise servers, files, and cloud-based virtual machines in Azure. To do that, we need a resource called a Recovery services vault. Setting up a vault is a pretty easy step for anyone new to Azure.

To create a vault, use the Azure CLI command as shown below.

Replace:- vault name, resource group and desired location.

Having created the vault, we head the portal, create a new backup job with a backup goal, prepare the Infrastructure and download the MARS agent (Microsoft Azure Recovery Services). This is what enables us to back up our on-premises resources to Azure.

After downloading the MARS agent, make sure to download the vault credentials because we shall need these on our on-premise server on which we have the MARS agent installed.

Copy the downloaded vault credentials file and use it during the process of registering the server in the MARS agent's installation process. Vault credentials expire every after two days.

On the next screen, generate a passphrase, save it to a safe location, and never lose it. Data backed up in Azure needs this passphrase. Once it's lost, you cannot recover anything.
When that is done, we can start our initial backup process.

Selecting which folders to backup.
Specify when to run the backup.
I will use the first option since I have available bandwidth to successfully carry it out.

When we confirm our schedule, backups will always occur at that specified time. However, we can also perform an Ad-hoc backup by clicking on the backup now button as shown below, select the appropriate retention period and confirm.

Successful backup.

Back in the Azure portal, we can confirm our backed-up items by browsing to Recovery services vault > Backup Items > Azure Backup Agent, and we will see our backed-up items.

In this last part, we will configure Azure backup for an Azure virtual machine running Windows server 2016.

The first step is to head over to our recovery services vault -> Backup and then select Azure as the place where our workload is running.

Select the Azure VM that you wish to backup and then enable the backup. When we check our backup items section, we can confirm that we now have an Azure VM, and then we can perform an initial backup of our VM by clicking on the Backup now button.