Monday, December 24, 2018

Back up On-premises server and files to Azure using MARS agent


On-Premises Backup



Azure Backup & Recovery Services vault


In reference to Azure Backup and Recovery Service vault already we have been talking in a bit details in one of my previous post Backup a Virtual machine

Azure Backup is precisely Azure cloud based service which can be used to backup or protect and restore back the data for on-premises servers, virtual machines, virtualized workloads, SQL server, and more. In the Azure Eco system, the Azure Backup is an integral part of Azure stack as well bundled with Operations Management Suite (OMS), which is a scalable solution to allow backup and recovery of your data to and from the Microsoft Data centres. 

Besides this a Recovery Services vault is corresponded with Azure Backup, in fact, an online storage entity or a logical container that stores all backup and recovery point definitions. You can use Recovery Services vault to keep backup data for Azure services such as IaaS VMs, Azure SQL databases and on-premises servers and workstations etc. 

Azure Backup (MARS) agent


Previously we have been walking through how to back up a virtual machine (VM) using Azure Recovery Services vault, next will focus to back up On-Premises server, files & folders and workload etc. to the Microsoft Azure. In fact, Recovery Services vaults support multiple Azure Backup Components like System Center DPM, Windows Server, Azure Backup Server, and more to make it easy to organize your backup data in the context of minimizing management overhead.

Azure Backup (MARS) agent is one of the Azure Backup Component to protect certain different types of data like files, folders, virtual machines, applications, workloads, server, etc. Here MARS stands as Microsoft Azure Recovery Services, enables back up on-premises client machines, servers and file & folders etc. in the Azure cloud, essentially stored in the Recovery Services vault.

Note: There is currently no support for backing up Linux workloads using the MARS agent.

Here in this walk through article, we will see how to back up on-premises file and folders to Azure using the Azure backup (MARS) agent.

Pre-requisites


Before moving ahead, we need some pre-requisites to accomplish this on-premises Azure Backup task on top of Azure Cloud using an Azure backup agent.
  1. Azure subscription, if you don't have an account then sign up for a free Azure account - https://azure.microsoft.com/en-gb/free/
  2. An existing physical server or an Azure virtual machine (VM) (where you can install the MARS agent and initiate some backups/restores from).


STEP – 1: Launch Recovery Services vault


Login to the Azure portal https://portal.azure.com/

On the Hub menu, click All services and in the Filter dialog type Recovery. 

All services


Promptly the list of resources filters as you type, click the Recovery Services vaults in the list when it is available.

All service filter dialog


STEP – 2: Add a Recovery Services vault


Post selection of Recovery Services vault, the dashboard of the Recovery Services vaults will be loaded, most probably there would be no recovery services vault to display since we have not created yet.

Recovery Service vault


On the Recovery Services vaults menu, click Add, the Recovery Services vault blade will be loaded, prompting you to provide the following details – 
  • Name – The name of Recovery Services vault.
  • Subscription – The name of your Azure subscription, it would be either free, paid or specific subscription etc. 
  • Resource group – The name of the resource group used to organize related resources, you can either create a new resource or choose an existing one.
  • Location – The region where to store your logic app information.


Add Recovery Services vault


STEP – 3: Create the Recovery Services vault


Once you are sure about the details and region, go ahead and click the Create button that appears at the bottom of the Recovery Services vault blade.

After you click the Create button, the validation starts and post validation resource deployment proceeds, it can take several minutes for the Recovery Services vault to be created.

Normally, as soon as your vault is created, it appears in the list of Recovery Services vaults. Though, if after several minutes you don't see your vault, click Refresh button.

Recovery Services vaults


Sooner, the newly created Recovery Resources vaults will be reflected in the list.

List of Recovery Services vault


STEP – 4: Create a Backup in the Recovery Services vault


Post creation of the Recovery Services vault, select the same vault from the list, it will load the newly created Recovery Services vault blade.

Overview Recovery Services vault


On the vault dashboard menu, click + Backup to open the Backup blade.

Backup - Recovery Services vaults


Next, the Backup Goal blade will be open.

Backup Goal


Here, on the Backup Goal blade, select On- Premises option from the Where is your workload running drop-down menu, as well mark Files and folders from the What do you want to backup drop-down. 

Backup Goal On-Premises

You will get a next step to prepare the infrastructure the time you select On-Premises and Files and folders, go ahead and click Prepare Infrastructure button.

Backup Goal - Prepare Infrastructure


STEP – 5: Download MARS Agent


As soon as you click the Prepare Infrastructure button, the Prepare Infrastructure blade will be loaded. Here onward need to download the Recover Services (MARS) agent and required to install over the client or VM server.

Prepare infrastructure - Download


Click the download link to download the MARS agent to the Windows server, it will launch the Save As dialog box to save the agent’s installer file ‘MARSAgentInstaller.exe’.

Save As - MARS agent


STEP – 6: Download vault credentials


It is essential to register the MARS agent with specific Recovery Services vault, hence download the vault credentials once you downloaded the MARS agent. 

You can notice the Download tab has been enabled once you select the checkbox Already downloaded.
  
Download checkbox


Click the Download button to download the vault credentials for the Recovery Service vault, it will take for a while and launch the Save As dialog box to save the vault credential file something like ‘demoRecoveryServiceVault_Fri Dec 21 2018’ (you can change the file name or can go with the default one).

Save As - vault credential


STEP – 7: Install MARS Agent


Next, time to install the MARS agent utility over the client server or any dedicated Virtual Machine (VM), which needed to protect files and folders.

Execute the installer file ‘MARSAgentInstaller.exe’ under administrator privileges.

Install MARS agent


The sooner the installation process will be started, if you prefer some precise setting, then provide the details otherwise go with default settings.

Installation Settings


Just do click the Next button in each wizard.

Proxy Configuration


Here you will get the installation wizard, go ahead and click the Install button.

Installation


It will take a few moments to install the agent, will get the succeed acknowledgement.

Installation Successful



STEP – 8: MARS agent registration


MARS agent installed, proceed by clicking the Proceed to Registration button to register the MARS agent with the downloaded vault credential.

It will launch the wizard for vault credentials.

Vault Identification


Click the Browse button and select the downloaded vault credential.

Vault Identification - mapped credential


Post mapping the vault credential the brief will be appearing in the wizard, go ahead to click the Next button.

Promptly, you will get the Encryption Setting wizard to generate the Passphrase. Passphrase is used to encrypt and decrypt backups from the server, henceforth mandatory to keep this passphrase somewhere else to an external location.

Once you have generated the passphrase as well assign the location to save it, click the Finish button to complete the registration process.

Encryption Setting

  
Server Registration


STEP – 9: Validate the mapped VM/server using Azure Portal


MARS agent installed as well synced up with the precise vault credentials, you can validate the same mapping with Azure Portal.

Navigate the Recovery Service vault ‘demoRecoveryServiceVault’ and click the Backup Infrastructure under Manage section, proceed with Protected Servers which exist under Management Servers section.

Vault - Backup Infrastructure


Here it will load the Protected Servers blade, which list one active Azure Backup Agent, click the same to move inside to see the details of mapped server as well agent version.

Protected Servers


STEP – 10: Configure Backup items and Schedule Backup


Let’s head back to your On-Premises server and launch the Microsoft Azure Backup

Install MARS


Select the Schedule Backup action from the Actions menu available on the right side, it will launch the Getting started screen.

MARS - Schedule Backup
 Getting started

Click the Next button and skip the Getting started screen, it will load the Add Items screen.

Select Items to Backup


Here, click the Add Items and select the preferred files and folders you want to backup. I am going to back up a couple of demo files and folders for this activity.

Select Items


Click the OK button as soon as you select the files and folders, later proceed with a Next button to launch the schedule screen.

Select Items to Backup

Specify Backup Schedule

Next, time to configure the Backup Schedule settings to meet your requirements and proceed by clicking the Next button. It will load the Retention Policy screen.

Select Retention Policy


Here required to configure the Retention Policy as per the necessities and go ahead to click the Next button, that will launch the Initial Backup Type screen.

Since the MARS agent gives the facility to take online as well offline backup, but for the demo purpose, we will go with Automatically over the network option i.e. encrypted over the internet, and click the Next button.

Choose Initial Backup Type


Have a look the Confirmation window and validate with View Details button and click the Finish button.

Confirmation


Sooner the wizard will display the succeed acknowledgement of creating backup schedule.

Modify Backup Progress


Congratulations, the Azure Backup agent configured!! 😊

STEP – 11: Initiate one-time backup 


Here the backup schedule has been configured on the VM/client server, but it is better to kick off a one-time backup to make sure each configuration will work as per the expectation.

Select the Back Up Now action from the Actions menu which exist on right side of MARS wizard.

MARS - Back Up Now


Check the Select Backup Item screen and review the Confirmation screen and click Back Up button.

Back Up Now - Confirmation

Sooner the backup process will be goes through with the following stages – 
  • Tasks it goes through:
  • Takes snapshot
  • Prepares storage
  • Generates metadata
  • Data transfer

Backup progress

You can close the above window at any point during the backup or can wait to get successful status scree, which in fact depends on the size of files and folders.

Backup Progress - Completed


STEP – 12: Tracking backup items on Azure Portal 


One-time back up has been initiated successfully, the same can be tracked through the Azure Portal. 

Navigate the Recovery Service vault ‘demoRecoveryServiceVault’ and click the Backup Item under the Protected items section.

Vault - Backup items


Here the Azure Backup Agent count seems to appear one, click this and you will get the agent blade which reflects successful backup for the said server.

Backup Items - Success


Congratulations, one-time back Up done!! 😊

STEP – 13: Recover files and folders from the Azure 


Just we completed one successful backup from our On-Premises machine and validate it over the Azure Portal also. Next onward we will walk through the recovery job from the backed up files and folders.

Before moving ahead, I will delete the few files and folders which were backed up from the On-Premise machine.

Below snapshot displays the original state of files and folders.

Original files and folders


Now I deleted some items from the above location, seems appearing less items post deletion.

Post deletion of files and folders


Next, to kick off the recovery task, select the Recover Data action from the Actions menu which exist on right side of the Microsoft Azure Backup wizard.

MARS - Recover Data


It will launch the Getting Started wizard, proceed with a default selection of This server and click Next button.

Getting Started - Recover Data


On the next screen, select Individual files and folders and click the Next button.

Select Recovery Mode


Next, the Select Volume and Date screen appears, here required to select the volume you backed up. For example, C:\ drive in my case and even it would be pre-populated correctly if you only backed up a single volume.

Later on select a restore point and click the Mount button accordingly.

Select Volume and Date


Promptly the recovery task will be initiated, the same you can see the progress in the Browse And Recover Files screen.

Browse And Recover Files


Here, post completion the recovery point will be mounted as a volume on the local machine, in my case, it is F:\ drive, click the Browse button to explore the volume.

Mounted files and folders

Here you can see all files and folders appearing which were already backed up using the MARS agent.

When finished with the backup volume, go back to the Recovery Data Wizard and click Unmount button, subsequently it will confirm the unmount.

Unmount Confirmation


Continue by clicking the Yes button, done the recovery job.

Congratulations, recovery of file and folder done!! 😊

Stay in touch for more posts!!

No comments:

Post a Comment