|
| 1 | +--- |
| 2 | +title: Back up an Azure virtual machine with Azure extended zones portal |
| 3 | +description: In this article, learn how to back up an Azure VM with the Azure Backup extended zones service. |
| 4 | +ms.topic: how-to |
| 5 | +ms.date: 09/27/2024 |
| 6 | +author: ankitaduttaMSFT |
| 7 | +ms.author: ankitadutta |
| 8 | +--- |
| 9 | + |
| 10 | +# Back up an Azure Virtual Machine in Azure Extended Zones (preview) |
| 11 | + |
| 12 | +This article describes how to back up an existing Azure VM with the [Azure Extended Zones portal](https://ms.portal.azure.com/#home). |
| 13 | + |
| 14 | +Azure Backups can be created through the Azure portal. You can use the browser-based interface to create and configure backups and related resources to protect your data by taking regular backups. [Azure Backup](backup-overview.md) creates and stores recovery points in geo-redundant recovery vaults. |
| 15 | + |
| 16 | +[Azure Extended Zones](../extended-zones/overview.md) provide enhanced resiliency by distributing resources across multiple physical locations within an Azure region. This approach minimizes the impact of potential failures for critical infrastructure. By using Extended Zones, your organizations can achieve higher availability and fault tolerance for their applications. |
| 17 | + |
| 18 | +To use Azure Extended Zones, sign in to the [Azure Extended Zones portal](https://ms.portal.azure.com/#home). |
| 19 | + |
| 20 | +## Before you start |
| 21 | + |
| 22 | +Before you start backing up a VM in Extended Zones, review the [supported scenario](./backup-support-matrix-iaas.md). |
| 23 | + |
| 24 | + |
| 25 | +[!INCLUDE [backup-create-rs-vault.md](../../includes/backup-create-rs-vault.md)] |
| 26 | + |
| 27 | +## Apply a backup policy |
| 28 | + |
| 29 | +To apply a backup policy to your Azure VMs, follow these steps: |
| 30 | + |
| 31 | +1. Go to **Backup center** and select **+Backup** from the **Overview** tab. |
| 32 | + |
| 33 | + :::image type="content" source="./media/backup-azure-arm-vms-prepare/backup-button.png" alt-text="Screenshot showing the Backup button." lightbox="./media/backup-azure-arm-vms-prepare/backup-button.png"::: |
| 34 | + |
| 35 | +1. On the **Start: Configure Backup** blade, select **Azure Virtual machines** as the **Datasource type** and select the vault you have created. Then select **Continue**. |
| 36 | + |
| 37 | + :::image type="content" source="./media/backup-azure-arm-vms-prepare/select-backup-goal-1.png" alt-text="Screenshot showing Backup and Backup Goal blades." lightbox="./media/backup-azure-arm-vms-prepare/select-backup-goal-1.png"::: |
| 38 | + |
| 39 | +1. Select the [Enhanced Backup policy](./backup-azure-vms-enhanced-policy.md), as that is the one compatible with Azure Extended Zones. |
| 40 | + |
| 41 | + > [!NOTE] |
| 42 | + > To enable Azure Backup on Azure VMs in Azure Extended Zones, you can only use the Enhanced policy. This policy allows multiple daily backups, enabling hourly backups. [Learn more](backup-azure-vms-enhanced-policy.md). |
| 43 | +1. Assign the Backup policy. |
| 44 | + |
| 45 | + :::image type="content" source="./media/backup-azure-arm-vms-prepare/default-policy.png" alt-text="Screenshot showing the default backup policy." lightbox="./media/backup-azure-arm-vms-prepare/default-policy.png"::: |
| 46 | + |
| 47 | + If you don't want to use the default policy, select **Create New**, and create a custom policy as described in the next procedure. |
| 48 | + |
| 49 | + |
| 50 | +## Select a VM to back up |
| 51 | + |
| 52 | +To create a simple scheduled daily backup to a Recovery Services vault, follow these steps: |
| 53 | + |
| 54 | +1. Under **Virtual Machines**, select **Add**. |
| 55 | + |
| 56 | + :::image type="content" source="./media/backup-azure-arm-vms-prepare/add-virtual-machines.png" alt-text="Screenshot showing to add virtual machines." lightbox="./media/backup-azure-arm-vms-prepare/add-virtual-machines.png"::: |
| 57 | + |
| 58 | +1. The **Select virtual machines** pane opens. Select the VMs you want to back up using the policy. Then select **OK**. |
| 59 | + |
| 60 | + :::image type="content" source="./media/backup-azure-arm-vms-prepare/select-vms-to-backup.png" alt-text="Screenshot showing the Select virtual machines blade." lightbox="./media/backup-azure-arm-vms-prepare/select-vms-to-backup.png"::: |
| 61 | + |
| 62 | + >[!NOTE] |
| 63 | + > You can configure backup for all VMs in the same region and subscription as the vault. |
| 64 | +
|
| 65 | +## Enable backup on a VM |
| 66 | + |
| 67 | +A Recovery Services vault is a logical container that stores backup data for protected resources like Azure VMs. When a backup job runs for a protected resource, it creates a recovery point in the Recovery Services vault. You can use these recovery points to restore data to a specific point in time. |
| 68 | + |
| 69 | +To enable VM backup, in **Backup**, select **Enable backup**. This deploys the policy to the vault and to the VMs, and installs the backup extension on the VM agent running on the Azure VM. |
| 70 | + |
| 71 | +After enabling backup: |
| 72 | + |
| 73 | +- The Backup service installs the backup extension whether or not the VM is running. |
| 74 | +- An initial backup runs in accordance with your backup schedule. |
| 75 | +- When backups run, note that: |
| 76 | + - A VM that's running has the highest chance for capturing an application-consistent recovery point. |
| 77 | + - However, if the VM is turned off (an offline VM), it is still backed up, resulting in a crash-consistent recovery point. |
| 78 | +- Explicit outbound connectivity isn't required to backup of Azure VMs. |
| 79 | + |
| 80 | +### Create a custom policy |
| 81 | + |
| 82 | +If you selected to create a new backup policy, fill in the policy settings. |
| 83 | + |
| 84 | +1. In **Policy name**, specify a meaningful name. |
| 85 | +2. In **Backup schedule**, specify when backups should be taken. You can take daily or weekly backups for Azure VMs. |
| 86 | +3. In **Instant Restore**, specify how long you want to retain snapshots locally for instant restore. |
| 87 | + * When you restore, backed-up VM disks are copied from storage across the network to the recovery storage location. With instant restore, you can use locally stored snapshots taken during a backup job without waiting for the backup data to transfer to the vault. |
| 88 | + * You can retain snapshots for instant restore for between one to five days. The default value is two days. |
| 89 | +4. In **Retention range**, specify how long you want to keep your daily or weekly backup points. |
| 90 | +5. In **Retention of monthly backup point** and **Retention of yearly backup point**, specify whether you want to keep a monthly or yearly backup of your daily or weekly backups. |
| 91 | +6. Select **OK** to save the policy. |
| 92 | + > [!NOTE] |
| 93 | + > To enable Azure Backup on Azure VMs in Azure Extended Zones, use only the Enhanced policy. The Backup service creates a separate resource group (RG) to store the restore point collection (RPC). This RG is different from the RG of the VM. |
| 94 | +
|
| 95 | +:::image type="content" source="./media/backup-azure-arm-vms-prepare/new-policy.png" alt-text="Screenshot showing the new backup policy." lightbox="./media/backup-azure-arm-vms-prepare/new-policy.png"::: |
| 96 | + |
| 97 | + |
| 98 | +## Run an on-demand backup |
| 99 | + |
| 100 | +The initial backup runs in accordance with the schedule in the Backup policy. However, to run a backup job immediately, follow these steps: |
| 101 | + |
| 102 | +1. Go to **Backup center** and select the **Backup Instances** menu item. |
| 103 | +1. Select **Azure Virtual machines** as the **Datasource type**. Then search for the VM that you have configured for backup. |
| 104 | +1. Select the relevant row or select the more icon (…), and then select **Backup Now**. |
| 105 | +1. In **Backup Now**, use the calendar control to select the last day that the recovery point should be retained. Then select **OK**. |
| 106 | + |
| 107 | + |
| 108 | +## Monitor the backup job |
| 109 | + |
| 110 | +Monitor the portal notifications.To monitor the job progress, go to **Backup center** > **Backup Jobs** and filter the list for **In progress** jobs. Depending on the size of your VM, creating the initial backup may take a while. |
| 111 | + |
| 112 | +The Backup job details for each VM backup consist of two phases, the **Snapshot** phase followed by the **Transfer data to vault** phase. |
| 113 | + |
| 114 | +- The snapshot phase ensures the availability of a recovery point stored along with the disks for **Instant Restores** and are available for a maximum of five days depending on the snapshot retention configured by the user. |
| 115 | +- Transfer data to vault creates a recovery point in the vault for long-term retention. This phase starts after the snapshot phase is completed. |
| 116 | + |
| 117 | + :::image type="content" source="./media/backup-azure-arm-vms-prepare/backup-job-status.png" alt-text="Screenshot showing the backup job status." lightbox="./media/backup-azure-arm-vms-prepare/backup-job-status.png"::: |
| 118 | + |
| 119 | +There are two **Sub Tasks** running at the backend, one for front-end backup job that can be checked from the **Backup Job** details blade as shown: |
| 120 | + |
| 121 | + :::image type="content" source="./media/backup-azure-arm-vms-prepare/backup-job-phase.png" alt-text="Screenshot showing backup job status sub-tasks." lightbox="./media/backup-azure-arm-vms-prepare/backup-job-phase.png"::: |
| 122 | + |
| 123 | +The **Transfer data to vault** phase can take multiple days to complete depending on the size of the disks, churn per disk and several other factors. |
| 124 | + |
| 125 | +Job status can vary depending on the following scenarios: |
| 126 | + |
| 127 | +**Snapshot** | **Transfer data to vault** | **Job Status** |
| 128 | +--- | --- | --- |
| 129 | +Completed | In progress | In progress |
| 130 | +Completed | Skipped | Completed |
| 131 | +Completed | Completed | Completed |
| 132 | +Completed | Failed | Completed with warning |
| 133 | +Failed | Failed | Failed |
| 134 | + |
| 135 | +With this capability, for the same VM, two backups can run in parallel, but only one sub task can run at a time in either the snapshot or transfer data to vault phase. This decoupling prevents next-day backups from failing due to a backup job already in progress. Subsequent days' backups can have the snapshot completed, while **Transfer data to vault** is skipped if an earlier day’s backup job is in progress state. |
| 136 | + |
| 137 | +The incremental recovery point created in the vault will capture all the churn from the most recent recovery point created in the vault. There's no cost impact on the user. |
| 138 | + |
| 139 | +## Optional steps |
| 140 | + |
| 141 | +### Install the VM agent |
| 142 | + |
| 143 | +Azure Backup backs up Azure VMs by installing an extension to the Azure VM agent running on the machine. If your VM was created from an Azure Marketplace image, the agent is already installed and running. |
| 144 | +However, if you create a custom VM or migrate an on-premises machine, you might need to install the agent manually, as summarized in the following table: |
| 145 | + |
| 146 | +**VM** | **Details** |
| 147 | +--- | --- |
| 148 | +**Windows** | 1. [Download and install](https://go.microsoft.com/fwlink/?LinkID=394789&clcid=0x409) the agent MSI file. <br><br> 2. Install with admin permissions on the machine. <br><br> 3. Verify the installation. In *C:\WindowsAzure\Packages* on the VM, right-click **WaAppAgent.exe** > **Properties**. On the **Details** tab, **Product Version** should be 2.6.1198.718 or higher. <br><br> If you're updating the agent, make sure that no backup operations are running, and [reinstall the agent](https://go.microsoft.com/fwlink/?LinkID=394789&clcid=0x409). |
| 149 | +**Linux** | Install by using an RPM or a DEB package from your distribution's package repository. This is the preferred method for installing and upgrading the Azure Linux agent. All the [endorsed distribution providers](/azure/virtual-machines/linux/endorsed-distros) integrate the Azure Linux agent package into their images and repositories. The agent is available on [GitHub](https://github.com/Azure/WALinuxAgent), but we don't recommend installing from there. <br><br> If you're updating the agent, make sure no backup operations are running, and update the binaries.</li><ul> |
| 150 | + |
| 151 | +## Clean up deployment |
| 152 | + |
| 153 | +When no longer needed, you can disable protection on the VM, remove the restore points and Recovery Services vault, then delete the resource group and associated VM resources. |
| 154 | + |
| 155 | +If you want to restore the VM using the recovery points , skip the steps in this section and go to [Next steps](#next-steps). |
| 156 | + |
| 157 | +1. Select the **Backup** option for your VM. |
| 158 | + |
| 159 | +2. Choose **Stop backup**. |
| 160 | + |
| 161 | + :::image type="content" source="./media/quick-backup-vm-portal/stop-backup.png" alt-text="Screenshot showing to stop VM backup from the Azure portal." lightbox="./media/quick-backup-vm-portal/stop-backup.png"::: |
| 162 | + |
| 163 | +3. Select **Delete Backup Data** from the drop-down menu. |
| 164 | + |
| 165 | +4. In the **Type the name of the Backup item** dialog, enter your VM name, such as *myVM*. Select **Stop Backup**. |
| 166 | + |
| 167 | + Once the VM backup has been stopped and recovery points removed, you can delete the resource group. If you used an existing VM, you may want to leave the resource group and VM in place. |
| 168 | + |
| 169 | +5. In the menu on the left, select **Resource groups**. |
| 170 | +6. From the list, choose your resource group. If you used the sample VM quickstart commands, the resource group is named *myResourceGroup*. |
| 171 | +7. Select **Delete resource group**. To confirm, enter the resource group name, then select **Delete**. |
| 172 | + |
| 173 | + |
| 174 | +## Next steps |
| 175 | + |
| 176 | +- To learn more about Azure Extended Zones, continue to [Azure Extended Zones](../extended-zones/overview.md). |
| 177 | +- To learn more about Azure VM restore, continue to [Azure VM restore](./about-azure-vm-restore.md). |
| 178 | + |
| 179 | + |
| 180 | + |
| 181 | + |
| 182 | + |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | + |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | + |
0 commit comments