In this post, I’m going to show you how you can restore one or a few files from an Azure virtual machine backup without restoring the entire virtual machine, thanks to Azure Backup Instant File Recovery, currently in preview.
Before Instant File Recovery
In the past, if you wanted to restore an individual file from an Azure virtual machine backup, things got very complicated. You could restore the entire virtual machine, but that’s a slow process, especially if you want to get just one or a few files back from the past. And what if you don’t know when the file was last there or last in a healthy state? You might end up having to do a lot of restores just to find when the file was last available and reliable.
Instant File Recovery
The clues for Instant File Recovery have been in the Azure Portal for a while, but the feature recently arrived for virtual machines. We now have the ability to mount a recovery point, from our on-premises PC, to restore a file from an Azure virtual machine with application consistency. We can browse the file structure as it was when the recovery point was created, find a file or folder, and copy/paste it to wherever we need it.
Note: Veeam FastSCP might prove to be a handy tool to copy the file back to the desired virtual machine in Azure from your on-premises PC.
You can use the new ability to restore individual or sets of files or folders in the Azure Recovery Services vault, even if you started backing up Azure virtual machines before the Instant File Recovery feature was released in February 2017.
Start your recovery by browsing to Backup in the settings of the Azure virtual machine. Click File Recovery (Preview) to start the restoration of a file(s)/folder(s) from the virtual machine.
The File Recovery blade appears. Choose a recovery point (i.e., a point when a backup was made) that you want to restore file(s)/folder(s) from. Note the AppConsistent flag that is shown, the magic phrase in application backups.
Click Download Executable to download a tool; this tool will be run on the machine that you want to restore file(s)/folder(s) to.
Copy this tool to the machine that you want to restore to; in my case, I downloaded the tool to my PC and copied it to an Azure virtual machine – to avoid doing web browsing from a server. Execute the tool; this will reach out from your machine to Azure and mount the recovery point using iSCSI.
In the below screenshot you can see:
- The tool after I ran it.
- The iSCSI configuration tool, which shows the connection to Azure from my virtual machine.
This iSCSI connection will stay active until:
- I click Unmount Disks in the Azure Backup portal or
- 12 hours pass, offering me plenty of time to do a large restore
You can open File Explorer; each of the volumes from the backed up virtual machine are mounted as volumes. In the below screenshot, we can see that the OS volume (C:) is mounted as H: and the data disk (F:) is mounted as G:.
I can browse the file system in the recovery points, find the files or folders I need to restore, open them (even attach databases or stream media), and copy/paste the items to the desired location in the file system of my virtual machine.
Note that the restore speed will be approximately 1GB per hour, depending on where you are restoring to (bandwidth limitation at your office, for example, if you are restoring to your PC). Microsoft states that if you need to restore more than 10GB, then you should restore the entire virtual machine to an alternative location and extract the files from the temporarily restored machine.
Once you are finished, un-mount the recovery point (or let it time out), delete the tool, and delete the temp files/folders that the tool created when you ran it (where the tool was copied to).