Back up Azure file shares in a Recovery Services vault
This article explains how to use the Azure portal to back up Azure file shares.
In this article, you'll learn how to:
- Create a Recovery Services vault.
- Discover file shares and configure backups.
- Run an on-demand backup job to create a restore point.
- Identify or create a Recovery Services vault in the same region as the storage account that hosts the file share.
- Ensure that the file share is present in one of the supported storage account types.
Limitations for Azure file share backup during preview
Backup for Azure file shares is in preview. Azure file shares in both general-purpose v1 and general-purpose v2 storage accounts are supported. Here are the limitations for backing up Azure file shares:
- Support for backup of Azure file shares in storage accounts with zone-redundant storage (ZRS) replication is currently limited to these regions.
- Azure Backup currently supports configuring scheduled once-daily backups of Azure file shares.
- The maximum number of scheduled backups per day is one.
- The maximum number of on-demand backups per day is four.
- Use resource locks on the storage account to prevent accidental deletion of backups in your Recovery Services vault.
- Don't delete snapshots created by Azure Backup. Deleting snapshots can result in loss of recovery points or restore failures.
- Don't delete file shares that are protected by Azure Backup. The current solution deletes all snapshots taken by Azure Backup after the file share is deleted, so all restore points will be lost.
Create a Recovery Services vault
A Recovery Services vault is an entity that stores backups and recovery points created over time. The Recovery Services vault also contains the backup policies that are associated with the protected virtual machines.
To create a Recovery Services vault, follow these steps.
Sign in to your subscription in the Azure portal.
On the left menu, select All services.
In the All services dialog box, enter Recovery Services. The list of resources filters according to your input. In the list of resources, select Recovery Services vaults.
The list of Recovery Services vaults in the subscription appears.
On the Recovery Services vaults dashboard, select Add.
The Recovery Services vault dialog box opens. Provide values for the Name, Subscription, Resource group, and Location.
Name: Enter a friendly name to identify the vault. The name must be unique to the Azure subscription. Specify a name that has at least 2 but not more than 50 characters. The name must start with a letter and consist only of letters, numbers, and hyphens.
Subscription: Choose the subscription to use. If you're a member of only one subscription, you'll see that name. If you're not sure which subscription to use, use the default (suggested) subscription. There are multiple choices only if your work or school account is associated with more than one Azure subscription.
Resource group: Use an existing resource group or create a new one. To see the list of available resource groups in your subscription, select Use existing, and then select a resource from the drop-down list. To create a new resource group, select Create new and enter the name. For more information about resource groups, see Azure Resource Manager overview.
Location: Select the geographic region for the vault. To create a vault to protect virtual machines, the vault must be in the same region as the virtual machines.
If you're not sure of the location of your VM, close the dialog box. Go to the list of virtual machines in the portal. If you have virtual machines in several regions, create a Recovery Services vault in each region. Create the vault in the first location, before you create the vault for another location. There's no need to specify storage accounts to store the backup data. The Recovery Services vault and Azure Backup handle that automatically.
When you're ready to create the Recovery Services vault, select Create.
It can take a while to create the Recovery Services vault. Monitor the status notifications in the Notifications area at the upper-right corner of the portal. After your vault is created, it's visible in the list of Recovery Services vaults. If you don't see your vault, select Refresh.
Modify storage replication
By default, vaults use geo-redundant storage (GRS).
- If the vault is your primary backup mechanism, we recommend that you use GRS.
- You can use locally redundant storage (LRS) as a low-cost option.
To modify the storage replication type:
In the new vault, select Properties under the Settings section.
On the Properties page, under Backup Configuration, select Update.
Select the storage replication type, and select Save.
You can't modify the storage replication type after the vault is set up and contains backup items. If you want to do this, you need to re-create the vault.
Discover file shares and configure backup
In the Azure portal, open the Recovery Services vault you want to use to back up the file share.
In the Recovery Services vault dashboard, select +Backup.
a. In Backup Goal, set Where is your workload running? to Azure.
b. In What do you want to back up?, select Azure File Share from the drop-down list.
c. Select Backup to register the Azure file share extension in the vault.
After you select Backup, the Backup pane opens and prompts you to select a storage account from a list of discovered supported storage accounts. They're either associated with this vault or present in the same region as the vault, but not yet associated to any Recovery Services vault.
From the list of discovered storage accounts, select an account, and select OK. Azure searches the storage account for file shares that can be backed up. If you recently added your file shares and don't see them in the list, allow some time for the file shares to appear.
From the File Shares list, select one or more of the file shares you want to back up. Select OK.
After you choose your file shares, the Backup menu switches to Backup policy. From this menu, either select an existing backup policy or create a new one. Then select Enable Backup.
After you set a backup policy, a snapshot of the file shares is taken at the scheduled time. The recovery point is also retained for the chosen period.
Create an on-demand backup
Occasionally, you might want to generate a backup snapshot, or recovery point, outside of the times scheduled in the backup policy. A common reason to generate an on-demand backup is right after you've configured the backup policy. Based on the schedule in the backup policy, it might be hours or days until a snapshot is taken. To protect your data until the backup policy engages, initiate an on-demand backup. Creating an on-demand backup is often required before you make planned changes to your file shares.
Create a backup job on demand
Open the Recovery Services vault you used to back up your file share. On the Overview pane, select Backup items under the Protected items section.
After you select Backup items, a new pane that lists all Backup Management Types appears next to the Overview pane.
From the Backup Management Type list, select Azure Storage (Azure Files). You'll see a list of all the file shares and the corresponding storage accounts backed up by using this vault.
From the list of Azure file shares, select the file share you want. The Backup Item details appear. On the Backup Item menu, select Backup now. Because this backup job is on demand, there's no retention policy associated with the recovery point.
The Backup Now pane opens. Specify the last day you want to retain the recovery point. You can have a maximum retention of 10 years for an on-demand backup.
Select OK to confirm the on-demand backup job that runs.
Monitor the portal notifications to keep a track of backup job run completion. You can monitor the job progress in the vault dashboard. Select Backup Jobs > In progress.
Learn how to: