Finally I was able to play around with Azure's file recovery features and I have to say - I'm very impressed Microsoft! Thanks for coming in clutch on this one! As well as for my coworker (ftashev) for showing me this!
So for this scenario we'll pretend that you accidentally deleted an important file necessary for running your Azure based server. Now you have two options, restore a VM to the previous condition or use file recovery. I chose file recovery since I think it's an amazing feature that is less invasive than rolling back the server.
- Go to your VM and select Backup in the options
2. Now click on File Recovery
3. Select the recovery point you want and then click on Download Script. The script you will download is in written in python if your VM is running linux. Make sure to copy the password that gets generated, you will need it to execute the script.
4. Copy the script to your VM and let's execute it.
It will ask you to install
iscsi-initiator-utils, press "y" to continue:
Microsoft Azure VM Backup - File Recovery ______________________________________________ The script requires 'lshw','iscsi-initiator-utils' to run Do you want us to install 'lshw','iscsi-initiator-utils' on this machine? Please press 'Y' to continue with installation, 'N' to abort the operation. :
5. After the installation is complete, the script will prompt you for the password that was supplied with the script. Enter that here now.
Please enter the password as shown on the portal to securely connect to the recovery point. :
note - You will need to make sure port 3260 is allowed.
6. Now if the script executed correctly you should be able to see new mounts on your machine.
df -h shows me the following:
As you can see on the bottom I have four different volumes from the back up. I can go into them and recover the precious file I accidentally deleted.
7. Once you have recovered the file, click on Unmount Disks.
8. Then go back to the terminal and enter
umount on each of the backup mounts.
umount /20181022192418/Volume1 umount /20181022192418/Volume2 umount /20181022192418/Volume3 umount /20181022192418/Volume4