One basic task I found very underwhelming in the Microsoft Azure Resource Manager (ARM) portal was the backup. If you're thinking about taking a snapshot of a server as a precaution before you make any updates—sorry—snapshots don’t exist. You'll have to replace snapshots with backup and restore. I’ll break this down into the three parts: Backup, Recover, and Restore.
Setup the Backup Job
The backup is actually very easy and fast. First, you need to create a Recover Services Vault from the portal. One downside is that you can’t backup a server without adding it to the backup jobs. However, after you have added it, you can run on demand backups at any point.
Run the On-Demand Backup
There are really two options at this point.
The first option is to restore from the backup in the portal to a new server. This is by far the fastest option, so for critical issues this may be what you have to do. The downsides to this option are that you can’t set a static IP, the restored VHD is assigned a random name and the VHD is saved in the root of the storage account versus the VHD container. If you want to restore the server from backup with the same server name, you must first DELETE THE EXISTING SERVER and then restore to a new VM with the same name (this is true regardless of the option you choose).
Option two is to recover the VHD to a share where you can change the VHD name (because you CANNOT change a VHD name once it is created) and then move it to the VHD folder. I like option two because it is cleaner and more organized. The downside though is that it is a lot slower.
Option two is what I will cover here. For this, you need to first create an Azure File Share because you do not want to transfer this much data in and out of azure.
Example: AzCopy /Source:https://rsgroup.blob.core.windows.net/vhdpath /Dest:z: /SourceKey:abc /Pattern:"vhdname.vhd"
/blobType:Page
switch.Example: AzCopy /Source:z: /Dest:https://rsgroup.blob.core.windows.net/vhds /DestKey:abc /Pattern:"vhdname.vhd" /blobType:Page
Note: You must use the /blobType:Page
switch or the VM creation will fail.
Note: You also must copy from the mapped drive or the /blobType:Page
switch is invalid.
Create a new VM with a static IP and attach the recovered VHD
There you go!
Related Post: Bug Fix: View Templates Folder in Azure Resource Manager Premium Storage
Lewan is a Microsoft Silver Partner, and a Microsoft Certified Solutions Expert (MCSE) and Microsoft Certified Professional (MCP).