Microsoft Azure

Restoring Files with Azure File Sync

In this post, I will show you how to restore files that were synchronized to the cloud, using Azure File Sync, and backups up using Azure Backup.

Note that this post is based on the preview release of Azure Backup support for Azure Files.

Demo Lab

In my lab, a file server is synchronizing three shares (Accounting, Marketing and Sales) to the cloud using Azure File Sync. Each share is in its own sync group and is synchronizing to an Azure Files share in a general purpose storage account. Each Azure Files share is named after the synchronized folder on the file server (accounting, marketing and sales).

Sponsored Content

Passwords Haven’t Disappeared Yet

123456. Qwerty. Iloveyou. No, these are not exercises for people who are brand new to typing. Shockingly, they are among the most common passwords that end users choose in 2021. Research has found that the average business user must manually type out, or copy/paste, the credentials to 154 websites per month. We repeatedly got one question that surprised us: “Why would I ever trust a third party with control of my network?

I have already deployed Azure Backup to protect the files and the backups are stored as snapshots with the Azure Files share in the storage account.

Restoring a Share

I have created a scenario where all of the files in the Accounting share were deleted on the file server, and this damage was synchronized to the share in Azure Files. This could also have been a ransom-ware attack. Now I will show how to restore the entire share in the storage account.

You will start the restore process in the Manage Backups blade which you can reach by:

  • Navigating to the share in the storage account > Files and clicking Manage Backups.
  • Browsing to Backup Items in the recovery services vault that is managing the backups, and opening the share in question under Azure Storage (Azure Files).

Starting a restore for an Azure File Sync share in Manage Backups [Image Credit: Aidan Finn]
Starting a restore for an Azure File Sync share in Manage Backups [Image Credit: Aidan Finn]
Click Restore Share if you want to recover every item in the share. A Select Restore Point blade appears; select the backup job that you want to restore from, and then click OK. A Select Restore Location blade allows you to:

  • Restore to the original location or a new location
  • Choose how to handle conflicts: Overwrite Existing or Skip

In my case, I restored to the original location and chose to overwrite any existing files (as if I was hit by ransom-ware). I clicked OK and then confirmed the task by clicking Restore. A restore job began and the files were restored from the snapshot to the original location in the share. You can monitor the restore progress in Backup Jobs in the recovery services vault.

Monitoring the restore job of an Azure File Sync share [Image Credit: Aidan Finn]
Monitoring the restore job of an Azure File Sync share [Image Credit: Aidan Finn]
It took just under 14 minutes to restore nearly 4,000 files, with each file being nearly 7 MiB in size. A few minutes later, all of the files appeared in the share on the file server – this was fast because the files are “offline” (“O” attribute), meaning that users can see the files with their original names, locations, and permissions, but they are actually reparsed points or pointers that redirect to the master copies in the cloud. If a user opens the file, it is downloaded from the cloud via the file server.

Restoring a File

You can also restore one or a subset of files from a backup. In this example, I am going to restore a file from the Accounting share to a different share in the same storage account – it could be any existing storage account in the same region.

Once again, I opened Manage Backups for the share, but this time I click File Recovery. I chose a restore point to recover from, and then the Select Restore Location Blade appeared, which allows you to specify the Recovery Location, which can be either the original share or another share in the same or another storage account. I chose Alternative Location, and then entered:

  • Storage Account: I selected the same storage account, but I could have selected another one.
  • Select File Share: Choose a share that already exists in the storage account.
  • Folder Name: You can leave this empty to restore the file to root (/) or enter a folder to restore the file into.
  • In Case Of Conflicts: Overwrite the existing copy or create a new copy of the file.

Recovering a file from an Azure File Sync backup [Image Credit: Aidan Finn]
Recovering a file from an Azure File Sync backup [Image Credit: Aidan Finn]
Then you click Select File to choose the file(s) that you want to restore and click OK. When you’re sure, click Restore and an Azure Backup restore job will be triggered.

The file, which was 6.83 MiB in size, was restored to the new share in 83 seconds, and appeared on the file server soon after.

Related Topics:


Don't have a login but want to join the conversation? Sign up for a Petri Account

Comments (0)

Leave a Reply

Aidan Finn, Microsoft Most Valuable Professional (MVP), has been working in IT since 1996. He has worked as a consultant and administrator for the likes of Innofactor Norway, Amdahl DMR, Fujitsu, Barclays and Hypo Real Estate Bank International where he dealt with large and complex IT infrastructures and MicroWarehouse Ltd. where he worked with Microsoft partners in the small/medium business space.
Live Webinar - Thursday, December 2nd! Active Directory Masterclass: AD Configuration Strategies for Stronger SecurityREGISTER NOW - Thursday, December 2, 2021 @ 1 pm ET

Active Directory (AD) is leveraged by over 90% of enterprises worldwide as the authentication and authorization hub of their IT infrastructure—but its inherent complexity leaves it prone to misconfigurations that can allow attackers to slip into your network and wreak havoc. 

Join this session with Microsoft MVP and MCT Sander Berkouwer, who will explore:

  • Whether you should upgrade your domain controllers to Windows Server
    2019 and beyond
  • Achieving mission impossible: updating DCs within 48 hours
  • How to disable legacy protocols and outdated compatibility options in
    Active Directory

Sponsored by: