Posts

Once you’ve setup Azure Backup to protect your Azure Virtual Machine (see this guide for more info), the process to restore it is quite simple. I recommend running test restores on a regular schedule to make sure it’s working correctly.

To restore an instance of your Azure Virtual Machine follow this quick guide.

  1. Log into https://manage.windowsazure.com
  2. In the left side menu, select “Recovery Services” Restore Azure Virtual Machine from Azure Backup
  3. Click to open the backup vault you created for the virtual machine.
  4. Click the “Protected items” tab across the top. Open Protected Items Under Azure Recovery Services
  5. Click “Restore” down the bottom to restore the selected virtual machine.Restoring Azure Virtual Machine Under Azure Recovery Services
  6. Select a recovery point and click next.
  7. Fill out the restore instance details. You will need to give it a unique name, but make sure you select the appropriate cloud service, storage account, and virtual network if you’re following this in a disaster recovery scenario.Choose Azure Virtual Machine Restore Instance
  8. Click the tick in the bottom right to start the restore process
  9. Once the restore is completed you can download the new RDP connect file and test.

 

If you’re running Azure Virtual Machines in production, you’ll probably want to protect them with Azure Backup. The good news is Azure provides a simple way to protect an entire virtual machine, so you can easily restore it if things go wrong.

Protecting Virtual Machine instances differs from the typical Azure Backup client that is usually installed on client PCs and On-premises servers.

Here’s how to set Azure Backup for an Azure Virtual Machine:

  1. Log into https://manage.windowsazure.com
  2. Open Recovery ServicesBackup Azure VirtualMachine With Recovery Services
  3. Click NewNew Azure Backup Vault
  4. Choose Backup Vault, Quick Create, give it a name and choose to place it in the same region as the virtual machine you’ll be protecting. Quick Create Azure Backup Vault In Azure Recovery Services
  5. The backup vault will appear in Recovery ServicesAzure Recovery Services To Backup Azure Virtual Machines
  6. Click on the vault and scroll down to Protect Azure Virtual Machines. Backup Azure Virtual Machine
  7. Click Discover Virtual Machines. It will take a view minutes. Once discovered, you’ll be notified that virtual machines were found in the same region. Register Azure Virtual Machine
  8. Click Register and choose the Virtual Machine that you want to protect.Registering Azure Server For Protection
  9. Wait for the Virtual Machine status to change to RegisteredRegistering Azure VirtualMachines For ProtectionRegistered Azure VirtualMachine For Protection
  1. Click ProtectProtect Azure Virtual Machine
  2. Choose the virtual machine you just registered.Selec tAzure Virtual Machine For Protection
  3. Choose the Default Policy Settings or configure your own and click Finish

 

We use Microsoft’s AzCopy to move large amounts of data from external sources into Microsoft Azure Storage.

The typical scenario for us is a customer who is moving onto an Azure Virtual Machine, and wants their data stored on that machine.

AzCopy is a versatile command line utility that allows you to move files from another PC or Server into Azure Storage, and then into your Azure virtual machine.

When migrating data to an Azure VM, the solution looks like this:Azcopy Process to Move Data Into Azure

To get started, you need to install AzCopy from here.
Next, create an Azure Storage Account. You can do this in either the old portal or the new portal.
Once you’ve created a storage account, you’ll need to create a storage container. Here is a quick guide for the old portal and the new portal.

Now that you’ve installed AzCopy, created a storage account and a container, you can put together your AzCopy commands. Typically you’ll create two commands, one that uploads your data into Azure Storage, and the other downloads your data from Azure Storage into your Azure Virtual Machine.

Here’s an example that will move local data from E:\NAS into Azure Storage, and then download it to E:\NAS on the destination virtual machine:

To Azure Blob Storage

AzCopy /Source:E:\NAS /Dest:https://<storageaccountname>.blob.core.windows.net/<containername> /DestKey:<LongStorageAccountKey> /S /V:C:\temp\NASDrive.log

From Azure Blob Storage

AzCopy /Source:https://<storageaccountname>.blob.core.windows.net/<containername> /Dest:E:\NAS /SourceKey:<LongStorageAccountKey> /S /V:C:\temp\NASDrive.log

These commands will also create a log file under C:\temp\NASDrive.log

Running the AzCopy commands

Running AzCopy To Migrate Data Into Azure

Open Command Prompt and navigate to the location where AzCopy was installed. Typically this is under “C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy”

Paste in your first command and run it to start the upload. In the meantime, you can install AzCopy on the destination server.

Once the upload is complete, go to the destination server and run the second command to download the data from Azure Blob Storage.

If you experience errors

AzCopy Warning After Data Migration Into Azure

Occasionally you may experience errors in the AzCopy transfer (usually the upload), where certain files will fail. The solution for this is usually to append the /NC: parameter and run the command again. The /NC: parameter limits the number of concurrent connections to Azure storage. I usually set it to /NC:5, where 5 is the maximum number of concurrent files that will be uploaded. The upper limit of concurrent connections is 512.

Updated command for uploading to Azure Blob Storage

AzCopy /Source:E:\NAS /Dest:https://<storageaccountname>.blob.core.windows.net/<containername> /DestKey:<LongStorageAccountKey> /S /V:C:\temp\NASDrive.log /NC:5

If you’re rerunning the command, you will be asked whether you want to skip files that already exist. Choose to skip All.

Here’s the results of the second transfer.Azcopy Summary For Azure Data Migration You may notice that the number of files transferred in this image is different to the number of files that failed in the previous image. In this case, we removed some unnecessary files before restarting the upload.

AzCopy Documentation

For more information on AzCopy, see the documentation here.