Restore to Azure using PowerShell scripts – Part 1
I firstly wanted to highlight a series that is being written by Jorge on Microsoft Azure and Veeam.
He touches on connectivity, deployment, configuration and then restore options. This is where I want to jump in with the topic of my at least two-part series.
I will be touching on a feature within Veeam Backup & Replication called Veeam Restore to Microsoft Azure. Though before it was baked into Veeam Backup & Replication, it was a standalone free product available in the Microsoft Azure marketplace.
Veeam Backup & Replication 9.5, with this included feature, was launched at the back end of 2016, but the standalone has been around since around April 2016.
There are lots of resources out there running through the process and lots of demo videos on YouTube, but I wanted to show some more options that we can use this feature for.
A PowerShell script use case
The reason I wanted to put this concept out there was to highlight some of the additional functionality you could bring to your environment using this feature. The real use case that stands out today is the ability to migrate your workloads to Azure away from the on-premises configuration. This is achievable, but this is a one-way conversion. Very much like the physical to virtual (P2V) process we all know and went through a few years back. Another use case would be around leveraging Azure for an isolated test and development environment. Again, completely doable, but the issue within the interface is that you must be reactive to when you want to set this lab up and the wait time to transfer the image to Azure is the biggest piece to contend with.
What this PowerShell script concept will allow you to do is create a scheduled task to run proactively and give you the test bed without having to manually configure and wait for this to be set up. By using PowerShell script we can completely automate this process and have this run before you arrive in the office.
Pre-requisites and Azure requirements
There are a few things you need to have in place for us to start using this script that I will cover later on.
- Microsoft Azure Account — preferably the Azure Resource Manager and not Classic Mode
- A Veeam Backup & Replication server with the Veeam PowerShell SnapIn (This instance can be running anywhere including Azure)
- A Veeam backup chain, as with the Veeam Backup & Replication server this can be stored anywhere. If it was stored in Azure, it would save that conversion time
- Ability to add your Azure account to Veeam Backup & Replication via either interface or PowerShell. For the purposes of this blog post I will not cover this step
The other posts have already covered the process that Veeam Restore to Microsoft Azure takes, but the process involves the conversion of the VM’s backup file to a VM running in Microsoft Azure. By having the backup chain already in Microsoft Azure, you can expect that transfer time or the conversion time to be much faster than sending them from an on-premises location.
“A variable is a value that can change, depending on conditions or on information passed to the program. Typically, a program consists of instructions that tell the computer what to do and data that the program uses when it is running.”
I will place the actual script to discover the variables that we require. There is one variable here that will determine the Veeam Backup restore point. In the script example you are able to determine the latest restore point of a VM in the backup. All this additional information will become clear with the second part of the series:
- Backup job name, virtual machine name(s)
- Azure Subscription
- Azure Storage Account
- Azure VM configuration
- Azure Virtual Network
- Azure Resource Group
More resources can be found within the Veeam user guide.
Read the entire article here, Restore to Azure using PowerShell scripts – Part 1
Via the fine folks at Veeam