How do I backup a windows azure virtual machine?

Solution 1:

If you're talking about backing up the vhd of the virtual machine, you can:

  • Create periodic blob snapshots (since the vhd is stored in a Windows Azure Storage blob). Initially snapshots don't really take up any space since they're effectively an index of storage pages. Over time, if these pages change, then the snapshot(s) grow in size. You can create as many snapshots as you want, but you'll need to purge them over time to avoid storage growth as your vhd changes.
  • Create blob copies. This is a complete copy of the vhd, unlike the snapshot. And you can make copies across storage accounts (or even across data centers).

Regarding the snapshots: You can create a brand new blob from a snapshot, which you may find convenient at times.

Regarding the blob-copies: The one challenge you might run into, when making a blob copy: If the source changes during the copy, the copy will fail. So for an OS vhd, this operation should only be done if the Virtual Machine is in a stopped state. You may find snapshots to be the better mechanism in this case.

There's really no Azure-specific mechanism for things like system restore points, as that's within the OS itself.

Solution 2:

There is a service in preview, called Azure Recovery services. With it, you can take backup of your Azure VMs as well as your local VMs, to the cloud. It looks pretty similar to the built-in Windows Backup

http://www.windowsazure.com/en-us/documentation/services/recovery-services/

Solution 3:

This is a nice tutorial complementing David's answer: Create Backups of Virtual Machines in Windows Azure by using PowerShell

You can backup AzureOSDisk and AzureDataDisk in four steps:

  • Select virtual machine to back up
  • Identify virtual hard disks
  • Create cloud storage container for storing backups
  • Back up virtual machines in Windows Azure to cloud storage