How to backup and restore Azure file shares

Recently Azure Backup announced support for Azure file share as a workload, in public preview. Sonia took it for a spin!

But first … a word about Public Preview

A public preview feature or service is available as a beta for customers to test. Previews are provided “as-is” with no service level agreement and limited warranty. They are subject to change and are not recommended for production environments until the feature or service reaches general availability. That said, they are a great way to get used to a new capability in your own test environments. For more info, visit Supplemental Terms of Use for Microsoft Azure Previews. 

Why this is a big deal

Organizations may be looking to use Azure file shares for a number of reasons, such as replacing on-prem hardware or shifting the workload to the Cloud to reduce global connections into one on-prem point. As soon as you mention files, you should have a backup strategy in place that meets your organization's restore point objectives and time objectives – this can range from “we need a file that someone just accidentally deleted” to “we need a file from four years ago as part of an audit investigation.” This new capability gives administrators the ability to easily restore individual files, without wrangling an entire account or virtual machine backup, and control the costs associated with now only backing up the required file shares.


In essence, the Azure file share sits inside a Account. Azure Backup can now see that file share and create backup snapshots of it, into the same Account. To do this, the Storage Account is registered with a Services Vault, where the backup policy and retention points are managed.


For important considerations such as supported regions, protection limits, restore limits and retention limits, visit Azure file share backup support matrix.  

Set up your Azure file share backup

  1. First, you'll need an Azure file share with some files in it! If you don't have one and you want to test this, follow the steps in Create an Azure file share.
  2. Then you'll need to create a Services vault. This needs to be in the same region as the storage account that hosts the file share. Detailed steps are here: Create a Recovery Services vault.
  3. In the Recovery Services vault, you add the backup. Azure FileShare will appear as a workload you can back up, navigating to the storage account lets you select the file share(s), and then you're in familiar backup configuration territory! Now you can configure your backup policy.

    Azure file share backup default daily policyAzure file share backup default daily policy

    You can choose the default Daily Policy or create a new one, to tweak the timing of your backup and your retention points. Consider what this policy needs to be to meet your organization's needs and you can create different policies for different file shares. Here I've set weekly, monthly and yearly backup points to be retained.

    Azure Backup retention pointsAzure Backup retention points

  4. Review your settings and click Enable Backup, then you're all set for the first scheduled time. At any time, you can also run an on-demand backup job.


Restoring files

Restoration is done from the Recovery Services vault, where you will find your Azure Storage (Azure Files) backups. You can restore the full file share or one or multiple files, to either their original location or an alternative Azure file share folder, with the option to overwrite or skip if existing files are found. Choosing the restore point then gives you a list of files available for recovery:


For detailed steps, visit Restore Azure file shares.

Finally, you can track the progress of your restoration, via the Backup Jobs pane in your Recovery Services vault:


And if you need more detailed reporting on a regular basis, visit Configure Azure Backup Reports (preview).

Important note – resource lock

Azure Backup will add a Do Not Delete resource lock to your storage account. As the storage account is used to store the backup snapshots, this is done to protect accidental deletion of the backups. Do not remove this resource lock:


Alternatives to the Azure Portal

The Azure Portal steps are often easier to make visual documentation from, like this article, but if you're a fan of other methods you can also configure Azure File share backup, restore files and manage your backups with the Azure CLI, PowerShell or the REST API.

Learn more:

About Azure File Share Backup

Troubleshoot problems while backing up Azure file shares

Manage Azure File Share backups:  Monitor jobs, create a new policy, modify policy, stop or resume protection on a file share, delete backup date and unregister a storage account.


This article was originally published by Microsoft's Core Infrastructure and Security Blog. You can find the original article here.