Tag Archives: Azure Files

Azure Files Backup and Restore

In contrast to SharePoint Online and OneDrive for Business there’s no recycle bin for Azure Files available. Data is Azure is stored redundant and you can even opt for a multi-geo redundancy, but when (accidentally) deleting files they are gone.

To prevent unwanted deletion of data you can use Azure Backup to make sure your data is always safe, and that you can restore data.

To implement backups in Azure, you must create an Azure Recovery Services Vault. To do this, go to the Azure Portal and type Recovery Services Vault in the All services search box and click Create Recovery Services Vault. When entering the details make sure you use the same region as where your file share is located (West Europe in my example) as shown in the following screenshot:

Create Recovery Services Vault

Click Review + Create and click Create.

In the All Resources blade click on the newly created Vault to see all properties for the new Vault. To create a backup of the Azure Files, click + Backup and in the What do you want to backup drop down box select Azure FileShare (Preview) and click Backup. It can take a couple of seconds before the correct Storage Account appears:

Select Storage Account

Select the Storage Account and click OK. It can take a minute before the Storage Account is validated. The file shares that can be backed up will also be automatically discovered, this can also take some time. Select the file share and click OK.

The last step is to configure an Azure backup policy as shown in the following screenshot:

Azure Backup Policy

Create your own policy, pay attention to the retention time which is 30 days by default, click OK and click Enable backup.

The Azure Recovery Services Vault and backup policy will now be created. After some time the backup is created, and an initial backup will be performed.

Initial backup pending

You can open the backup items and click backup now or you can wait until the next backup has automatically run (3:30 AM in my example).

Restore files from Azure Backup

Backing up files is nice and important, but even more important is the ability to restore files from backup. And restoring files from Azure backup is pretty simple.

Open the Azure Portal and navigate to the Recovery Services Vault that was created previously. In the details of the Vault, click on backup items under Protected items. You will see several backup management types, select the Azure Storage (Azure Files) option. There should be one or more Backup items available. Select one of the backup items and click on the context menu (the three dots on the right of the backup item) and select File Recovery as shown in the following screenshot:

Backup Items

Click on the date and time restore point and click OK. Click on Select File and browse through the directory structure that’s in the backup set, until you’ve found the file or directory you want to restore. Select this item and click Select. Select Original location or Alternate location and in the drop down box determine what action should be taken in case of conflicts (Overwrite, Skip or Create Copy). Click OK and click Restore to start the restore of your deleted item(s). After a short amount of time (depending of the size and amount of files) the data should be restored, and visible again the Windows Explorer.


In Azure Files there’s no recycle bin for restoring (accidentally) deleted files, so you have to rely on backup and restore. To achieve this, you can implement the Azure Recovery Services Vault. You can implement a Vault (in the same region as where your data is stored) and create a backup policy to store backup files in the Vault. Once backed up, you can restore files easily from the Vault using the Azure Portal. It depends on your own retention policy how long the data should be kept in the Vault, but your data should be safe now.


Azure Files instead of SharePoint Online

Most of my customers are in one way or another moving to Office 365. Not only Exchange Online, but also OneDrive for Business, SharePoint Online, Teams and other cloud services.

SharePoint Online a great solution of collaboration solutions, when multiple people are working on multiple documents in a department, group or project style.

One of my clients has a department with two employees, but with approx. 4TB of primarily static data. They store data on a file share and store it there for 20 years or more. The directory structure reflect the organization, but also the timeframe, so the directory structure is deep and filenames are typically long. Combine this with the 256 character URL limit in SharePoint and there’s the challenge, you can not simple move this to SharePoint Online. Restructuring the data would be a solution when moving to SharePoint Online, but that would be a massive project.

Another solution would be the use of Azure Files, where a file share is created in Azure and where the users can access the files directly in Azure, just like a regular share on the on-premises fileserver. And if you have a low bandwidth and high latency Internet connection, you can always implement a caching server on-premises, where an offline copy is stored on-premises. Compare this to OneDrive for Business where a copy of the data can be stored on your workstation.

To create an Azure file share, follow these steps:

In the Azure Portal, create a new Resource Group (or use an existing one).

To create a new storage account, select All Services in the Azure Portal, and in the all services blade type storage accounts. Click on Storage Accounts and click +Add to create a new storage account. Select your subscription, the Resource Group, enter a unique name, select the location/region closest to your own location and the performance characteristics, like in the following screenshot:

Create Storage Account

Click Review + Create, and after reviewing click Create to create the new storage account.

When the storage account is created you can create the file share. Select the storage account and under File service, select Files and click + File Share. In the upper right corner, enter a name and quota, and click on Create.

The file share is now created and can be viewed in the Azure Portal:

Azure File Share

When you click the Connect icon, commands are shown for Windows, Linux en MacOS to connect the clients to the new file share. When using PowerShell, pay attention to the -Global and -Persist switch to make sure the connection will be kept after you close the PowerShell window and after rebooting. You can use tools of your choice (Storage Explorer, Windows Explorer, XCopy, RoboCopy etc) to copy data from the old location to the Azure File Share.

On the client, you can see the newly created file share in Windows explorer:

Azure File Share Explorer


In some scenarios it is not always feasible to use SharePoint Online for storing files, and in such scenarios Azure Files can be a good candidate. In this blog I’ve showed you how to create a storage account and an Azure File Share to be used within (Windows) clients.
In my next blog I’ll discuss Azure files and backup, since there’s no Recycle Bin in Azure Files like there is in SharePoint Online or OneDrive for Business.