Azure Backup - Restaurer une sauvegarde de VM Azure

how to restore an Azure VM?

I. Presentation

After seeing how to back up an Azure virtual machine with Azure Backup, we will see how to restore a virtual machine to a previous state, from our backups.

When restoring a VM with Azure Backup, there are several possibilities, including:

  • Completely restore the virtual machine by overwriting the existing virtual machine
  • Completely restore the virtual machine using a new name, which does not impact the existing virtual machine
  • Restore only certain files

In this example we will see how to restore an Azure VM in place of the existing VM. Before launching the restoration of a VM by overwriting the existing version, you need to shut down the VM from the Azure portal.

II. Create a storage account

We need to start by creating a storage account that will be used temporarily by Azure during the restore phase to store data. The restored Azure VM will no longer be linked to this storage account after the restore is complete.

From the Azure portal, navigate to “Storage accounts” and create a new storage account. Choose a subscription, assign a resource group, then:

  • Assign a name to this storage space, for example “restorebackuptemp
  • Choose a region, here “France Central” i.e. the same region as my Azure VMs
  • In terms of performance and redundancy, you can leave the default options

Azure Backup restore - Create a storage account

Continue to the end to create the storage account. Now let’s see how to restore the Azure VM.

III. Restore a VM completely

Still from the Azure portal, navigate to the Backup Center and click the “Restore“.

Azure Backup Restore - Restore a VM

Complete the first part of the form as follows:

  • Data source type : choose “Machine’s virtual Azure“, because it is an Azure VM that needs to be restored
  • Backup instance : click on “Select Backup Instance” to choose the VM to restore. In my example, it is the “PC-04” VM

Azure Backup Restore - Backup Instance

Then, you have to choose a restore point on which to rely to recover the data by clicking on the “Select“.

Azure Backup restore - Select restore point

After possibly filtering the restore points according to a specific period, select the one that interests you. Then continue with the configuration of the restore task.

Note : when restoring a “snapshot” type restore point, it is much faster than with a classic restore point (because it is not stored in the same place on Azure).

Azure Backup restore - Choosing which backup to restore

As I said in the introduction, you can decide to create a new VM from the backup by choosing “Create new“. In this case, it will be necessary to choose a resource group, a virtual network, etc… As if it were a new VM.

Azure Backup restore - Create new VM from backup

In this practical case, we restore the VM in place of the existing one, but which, unfortunately, is crashed and unusable! We select “Replace existing“. The form is shrinking… Choose the storage account created earlier at the parameter “Intermediate location“.

Click on “Restore“. Please note that this action is irreversible. : the VM will be overwritten by the backup!

Azure Backup Restore - Replace Existing VM

Within the Azure portal, a notification indicates that the restore is in progress.

Restauration Azure Backup - Notification

At the same time, in the “Backup Center“, if you click on “Backup Jobs“on the left, you can find the operation in progress on the VM with the type of operation”Restore“. Feel free to update regularly.

Azure Backup Restore - Jobs

At the end of the operation, the virtual machine is restored to its previous state! Phew, it is operational again!

IV. Conclusion

We have just seen how to restore a virtual machine with Azure Backup using a restore point from a previous backup! To go further, you can consult the Microsoft documentation, and read in particular the section “Post-restore steps” which lists any steps to take after restoring the VM. For example, if it is a VM with a static IP address defined via the Azure portal, the static IP address must be reassigned, because it will be defined dynamically following the restore.

Azure,Sauvegarde,Cloud,

#restore #Azure

Leave a Comment

Your email address will not be published. Required fields are marked *