Hello Vijay !
Thank you for posting on Microsoft Learn.
You can use Azure Backup to create full VM backups, or you can take snapshots and custom images to restore the VM later. Below are the different methods:
Azure Backup is the highly recommended method for backing up the entire VM, including OS, data disks, and system state.
- Go to the Azure Portal (https://portal.azure.com).
- Navigate to "Backup Center" from the left-side menu.
- Click "Vaults", then "+ Create", and choose "Recovery Services Vault".
- Provide a name for the vault, select the resource group, and choose the region.
- Once the vault is created, open it and go to "Backup".
- Under "Where is your workload running?", select "Azure".
- Under "What do you want to back up?", choose "Azure Virtual Machine".
- Click "Select", then select the VM you want to back up.
- Choose the backup policy:
- Default policy: Daily backups with a 30-day retention.
- Custom policy: Define backup frequency and retention period.
- Click "Enable Backup" to start the backup process.
- Default policy: Daily backups with a 30-day retention.
For the Restoration:
- Go to Backup Center → Protected Items → Azure Virtual Machines.
- Select the VM and choose "Restore VM".
- You can restore the VM to a new instance or replace the existing one.
A second alternative, if you want an image-based backup of your VM, you can capture a Managed Image.
- Go to Azure Portal and open the VM.
- Deallocate the VM:
- Click "Stop" → Click "Deallocate".
- Click Capture on the VM page.
- Provide an image name and save it in a resource group.
- Choose Automatically delete this VM after image creation (optional).
- Click "Create".
For the Restoration: When you create a new VM, select "Use existing image" and choose your managed image.
A third alternative is to take a Snapshot of the VM Disks
- Go to Azure Portal and open the VM.
- Click Disks, then select the OS Disk.
- Click "Create Snapshot".
- Select Full snapshot or Incremental snapshot.
- Click "Create".
The Restoration: You can create a new disk from the snapshot and attach it to a new or existing VM.
Finally you can also use Azure Site Recovery (For Disaster Recovery), it replicates your VM to another region for high availability.
- Go to Azure Portal → Site Recovery.
- Click "Set up Recovery".
- Select your VM and target region.
- Configure replication policy.
- Enable replication.
For the Failover/Restore: You can trigger failover to recover your VM in another region.
Links to help you :
https://docs.azure.cn/en-us/virtual-machines/linux/tutorial-custom-images
https://learn.microsoft.com/en-us/azure/virtual-machines/capture-image-resource
https://www.reddit.com/r/AZURE/comments/1gr7dld/creating_vm_image_from_a_vm_without_destroying_it/
https://helpcenter.veeam.com/docs/vbazure/guide/overview.html?ver=70