Recover Deleted files from Azure virtual machine backup or Recovery Services vaults
Recover Deleted files from Azure virtual machine backup or Recovery Services vaults

Recover Deleted files from Azure virtual machine backup or Recovery Services vaults

In this article...

  1. Generate and download scripts to browse and recover files.
  2. Ensure the machine meets the requirements before executing the script.
  3. Running the script and identifying volumes
  4. Closing the connection


Azure Backup provides the capability to restore Azure virtual machines (VMs) and disks from Azure VM backups, also known as recovery points. This article explains how to recover files and folders from an Azure VM backup. Restoring files and folders is available only for Azure VMs deployed using the Resource Manager model and protected to a Recovery Services vault.

Note

This feature is available for Azure VMs deployed using the Resource Manager model and protected to a Recovery Services vault. File recovery from an encrypted VM backup isn't supported.

Recovery Diagram


Step 1: Generate and download script to browse and recover files

To restore files or folders from the recovery point, go to the virtual machine and perform the following steps:

  1. Sign in to the Azure portal and in the left pane, select Virtual Machines. From the list of virtual machines, select the virtual machine to open that (that you want to back up) virtual machine's dashboard.
  2. In the virtual machine's menu, select Backup to open the Backup dashboard.

Back-Up Option Location

3. In the Backup dashboard menu, select File Recovery.

File Recovery Option

4. The File Recovery menu opens.

Option to choose a recovery point
Important:

Users should note the performance limitations of this feature. As pointed out in the footnote section of the above blade, this feature should be used when the total size of recovery is 10 GB or less. The expected data transfer speeds are around 1 GB per hour.        

  1. From the Select Recovery point drop-down menu, select the recovery point that holds the files you want. By default, the latest recovery point is already selected.
  2. Select Download Executable (for Windows Azure VMs) or Download Script (for Linux Azure VMs, a Python script is generated) to download the software used to copy files from the recovery point.


Download Executable


Azure downloads the executable or script to the local computer.


Downloaded exe


  1. To run the executable or script as an administrator, it's suggested you save the downloaded file to your computer.
  2. The executable or script is password protected and requires a password. In the File Recovery menu, select the copy button to load the password into memory.


Password to run exe


Step 2: Ensure the machine meets the requirements before executing the script

After the script is successfully downloaded, make sure you have the right machine to execute this script. The VM where you are planning to execute the script, should not have any of the following unsupported configurations. If it does, then choose an alternate machine that meets the requirements.

Dynamic disks

You can't run the executable script on the VM with any of the following characteristics: Choose an alternate machine.

  • Volumes that span multiple disks (spanned and striped volumes).
  • Fault-tolerant volumes (mirrored and RAID-5 volumes) on dynamic disks.

Windows Storage Spaces

You can't run the downloaded executable on the same backed-up VM if the backed-up VM has Windows Storage Spaces. Choose an alternate machine.

Virtual machine backups having large disks

If the backed-up machine has a large number of disks (>16) or large disks (> 4 TB each) it's not recommended to execute the script on the same machine for restoration, since it will have a significant impact on the VM. Instead, it's recommended to have a separate VM only for file recovery (Azure VM D2v3 VMs) and then shut it down when not required.


Step 3: Running the script and identifying volumes

Note:

The script is generated in the English language only and is not localized. Hence it might require that the system locale is in English for the script to execute properly.        


After you meet all the requirements listed above, copy the script from the downloaded location (usually the Downloads folder), see the Steps above to learn how to generate and download the script. Right-click the executable file and run it with Administrator credentials. When prompted, type the password or paste the password from memory, and press Enter. Once the valid password is entered, the script connects to the recovery point.


Secret Key


When you run the executable, the operating system mounts the new volumes and assigns drive letters. You can use Windows Explorer or File Explorer to browse those drives. The drive letters assigned to the volumes may not be the same as the original virtual machine. However, the volume name is preserved. For example, if the volume on the original virtual machine was "Data Disk (E:\)", that volume can be attached on the local computer as "Data Disk ('Any letter':\). Browse through all volumes mentioned in the script output until you find your files or folder.

Drives Allocation


Step 4: Closing the connection

After identifying the files and copying them to a local storage location, remove (or unmount) the additional drives. To unmount the drives, on the File Recovery menu in the Azure portal, select Unmount Disks.


Where to Unmount Disks


Once the disks have been unmounted, you'll receive a message. It may take a few minutes for the connection to refresh so that you can remove the disks.


Thank You for Reading! I appreciate you taking the time to read my article. If you have any questions, need assistance, or would like to discuss anything further, please don’t hesitate to reach out to Ehtisham Ali


Syed Muhammad Ali Hashmi

System Administrator | Microsoft Azure | Microsoft 365 | Network Engineer | Google IT Support Professional Certified | 🏅5 Times National Gold Medalist

3mo

This is a very informative method for recovering deleted data. However, I'm curious—why can't we apply this approach on the same machine where the storage account drive is already mapped?

Like
Reply

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics