[Updated] AZ-104: Microsoft Azure Administrator
Administer Data Protection
File and Folder Backup
In this guide, you will learn how to back up files and folders from both on-premises systems and Azure File Shares using Azure Backup. The process involves deploying an Azure Recovery Services Vault to securely store your data. The vault leverages managed Azure storage along with robust backup functionalities.
Overview
Azure Backup offers native integration with Azure Files for seamless file share protection. For on-premises Windows servers, the Microsoft Azure Recovery Services (MARS) Agent is required to replicate your data to the Recovery Services Vault.
The guide is divided into two main sections:
- Backing up Azure File Shares using the Azure portal
- Backing up on-premises files and folders using the MARS Agent on a Hyper-V machine
Setting Up Azure File Share Backup
Creating a Storage Account and File Share
- In the Azure portal, navigate to Storage Accounts and create a new account. Select your subscription and create a new resource group.
- Provide a distinctive name for the storage account (for example, "RSV Demo"), and choose the appropriate options (e.g., Standard, LRS advanced). Click Review + Create and proceed after validation.
- After the storage account is deployed, configure a file share within it.
You can then upload files directly via the Azure portal:
- Image:
After creating the file share, click on Browse and upload your files.
- Image:
Configuring the Recovery Services Vault
In the Azure portal, go to Recovery Services Vaults and create a new vault. Use an existing resource group or create a new one (for example, RG Data Protection), assign a name such as "RSV01", and select your preferred region (e.g., East US).
- Image:
- Image:
If a private endpoint is not required, skip its configuration by clicking Review endpoint and then Review and Create.
- Image:
- Image:
After the vault is deployed, register your file share for backup:
In the Recovery Services Vault, select Backup, specify that your workload runs in Azure, and choose File Share as the backup option.
Select the target storage account and file share from the list. Optionally, you can enable a lock on the storage account to prevent accidental deletion.
Complete the registration process by setting your backup policy details such as frequency and retention period.
- Image:
- Image:
Click Enable Backup to start protecting your file share. Once enabled, you can view the backup items in your Recovery Services Vault:
- Image:
If you see a warning such as "Initial Backup Pending", trigger the backup manually by clicking Back Up Now within the backup item details.
- Image:
Once the backup status changes to "Success", you can simulate a restore process by deleting some files from the file share.
- Image:
Next, navigate back to the file share, delete some files, and then restore them from the Recovery Services Vault by choosing the File Recovery option. Select an appropriate restore point (if multiple exist), and pick the individual files you need. In case of conflicts, options to skip or override are provided.
- Image:
After the restore process, you will see the recovered files back in your file share.
On-Premises Files and Folders Backup
To back up on-premises files and folders, you need to install the MARS Agent. This section explains how to configure your on-premises environment and register it with the Recovery Services Vault.
Preparing the Infrastructure
In the Azure portal under the backup section for on-premises, select Files and Folders and click Prepare Infrastructure. This action provides download links for the MARS Agent and the vault credentials.
- Image:
- Image:
Download both the MARS Agent installer and the vault credentials file (an XML text file) and copy them to your on-premises Windows Server or Hyper-V machine.
- Image:
- Image:
Installing and Registering the MARS Agent
Execute the MARS Agent installer on your server. During installation, configure the cache location and any necessary proxy settings if using a private network connection.
- Image:
- Image:
When prompted, load the downloaded vault credentials file. This file links your server to the Recovery Services Vault. An example vault credentials file is shown below:
<?xml version="1.0" encoding="utf-8"?>
<RBackupVaultAADCreds xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Azure.Portal.RecoveryServices.Models.Common">
<Version>2.0</Version>
<SubscriptionId>2cda1881-8c1e-4c15-be23-9aegTyfo9o1e41T5XhR</SubscriptionId>
<ResourceType>Vaults</ResourceType>
<ResourceName>rsv-01</ResourceName>
<ManagementCert>MIIBIjANBgkqhkiG9w0B...</ManagementCert>
</RBackupVaultAADCreds>
The wizard will then request you to input a password for backup encryption (a minimum of 16 characters). It is recommended to store this password securely for recovery purposes.
- Image:
- Image:
Once registration is complete, the MARS Agent appears in the All Programs list as Azure Backup.
Scheduling and Running Backups
Open the Azure Backup console on your server and choose the files and folders you wish to protect. For example, you might want to back up data from
C:\Users\Administrator\Documents
.Configure your preferred backup schedule (up to three times per day) and define the retention period.
- Image:
- Image:
For the initial backup, select whether to transfer data online or offline. For larger datasets, options such as using a Data Box or physical disk are available, whereas online transfers are typically sufficient for smaller volumes.
- Image:
- Image:
After scheduling, the backup process starts automatically. You can also trigger an immediate backup if necessary. In cases where a backup job fails (for instance, due to temporary network issues), you can restart the process from the MARS Agent console.
- Image:
Restoring Files and Folders from an On-Premises Backup
Open the Azure Backup console and select Recover Data.
- Image:
- Image:
Choose the server and specify the recovery location (typically the primary region). Select your desired recovery mode (individual files and folders, volume, or system state), then choose the appropriate volume (e.g., C:) and the date that corresponds to the desired recovery point.
Mount the recovery point. It will appear as a temporary drive on your system, allowing you up to six hours (extendable up to seven days if necessary) to copy the data back to its original location.
- Image:
- Image:
After verifying and copying over the recovered files, unmount the temporary recovery volume. Detailed backup history and recovery points can be reviewed within the Recovery Services Vault.
- Image:
Conclusion
In this article, we demonstrated how to protect your data using Azure Backup for both Azure File Shares and on-premises files and folders. By setting up a Recovery Services Vault and configuring appropriate backup policies, you can ensure your critical data is securely stored and can be restored when needed.
Note
Azure Backup not only handles files and folders but can also be applied to virtual machines, making it an essential component in a comprehensive data protection strategy.
Watch Video
Watch video content