This excellent question was asked by Ralph at our IT Camp in Saint Louis a few weeks ago:
“One of the questions asked by our VP relates to Azure backups protecting from user error rather than hardware failure or disaster recovery. What is the Microsoft guidance on backing up VMs in the cloud?”
How do you protect the data on your servers today? The quick answer to this question is that you need to protect OS and application configuration and business data the same way on your physical virtual machines; no matter where they reside. A benefit of putting any storage (which includes your virtual machines) in Windows Azure is that it is all kept highly-available and geo-redundantly replicated; and that’s just automatic. But beyond that, you are responsible for any machine or data backups or archiving that you may feel is needed.
“Okay.. but what about Azure storage BLOB snapshots?”
Well.. yes, Windows Azure actually does have the ability to take and maintain BLOB snapshots through the REST APIs. And a few vendors have created solutions to use this as a way to keep point-in-time copies of virtual machine disks, and then restore machines from those snapshots. But using BLOB snapshots for Virtual Machines in Windows Azure is currently not supported by Microsoft.
I repeat: As of October 11, 2013, using BLOB snapshots for VMs in Windows Azure is not supported by Microsoft.
That said, Chris Clayton has a script that you can use to backup and restore Azure VMs using BLOB snapshots. But: “This is a demonstration and should not be used for production scenarios”…”This should not be used to replace your current backup and restore strategy.”
Companies like Cerebrata (Cloud Storage Studio and Azure Management Cmdlets) and ClumsyLeaf (CloudXplorer) and others also have tools and operations for taking and restoring Azure storage BLOB snapshots, but the process of restoring a snapshot currently involves saving a copy of the VM configuration, deleting the VM, deleting the original disks, restoring the snapshots, and then re-restoring the machine configuration. It’s still cumbersome, and prone to error.
And if you don’t do it right, you can end up with a corrupted VM. (Trust me.. I know from experience.)
“Will we have a supported way to do this in the future?”
I don’t know. Personally, I hope so.
In the meantime, treat your machines the same as you would any other machine. Backup their configuration and data according to your policies as required.
“Okay.. so what if I just want to make offline copies of my VMs? Can I do that?”
Absolutely. For the backup, what you’ll want to do is:
- Shutdown the VM
- Save the VM configuration
- Make a copy of the VM’s disks (maybe with a date-stamped disk name for easy retrieval)
- Optionally download the disks to local storage and delete them from Azure storage
And then for the restore:
- If not already in storage, copy the disks into Azure BLOB storage and designate them as “disks”
- Build an Azure VM from the saved configuration, but referring to the new disks
- Start the restored VM
EXTRA CREDIT: Someone who has more time than I do today – build us two PowerShell scripts for doing this!