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.
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).
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.
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:
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:
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.
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.
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:
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.