|
| 1 | +--- |
| 2 | +title: Back up SQL Server from the Azure VM blade using Azure Backup |
| 3 | +description: In this article, learn how to back up SQL Server databases from the Azure VM blade via the Azure portal. |
| 4 | +ms.topic: how-to |
| 5 | +ms.date: 07/23/2024 |
| 6 | +ms.service: backup |
| 7 | +author: AbhishekMallick-MS |
| 8 | +ms.author: v-abhmallick |
| 9 | +--- |
| 10 | +# Back up a SQL Server from the Azure SQL Server VM blade |
| 11 | + |
| 12 | +This article describes how to use Azure Backup to back up a SQL Server (running in Azure VM) from the SQL VM resource via the Azure portal. |
| 13 | + |
| 14 | +SQL Server databases are critical workloads that require a low recovery-point objective (RPO) and long-term retention. You can back up SQL Server databases running on Azure virtual machines (VMs) by using [Azure Backup](backup-overview.md). |
| 15 | + |
| 16 | +>[!Note] |
| 17 | +>Learn more about the [SQL backup supported configurations and scenarios](sql-support-matrix.md). |
| 18 | +
|
| 19 | +## Prerequisites |
| 20 | + |
| 21 | +Before you back up a SQL Server database, see the [backup criteria](backup-sql-server-database-azure-vms.md#prerequisites). |
| 22 | + |
| 23 | +## Configure backup for SQLServer database |
| 24 | + |
| 25 | +You can now configure Azure backup for your SQL server running in Azure VM, directly from the SQL VM resource blade. |
| 26 | + |
| 27 | +To configure backup from the SQL VM blade, follow these steps: |
| 28 | + |
| 29 | +1. In the [Azure portal](https://portal.azure.com/), go to the *SQL VM resource*. |
| 30 | + |
| 31 | + >[!Note] |
| 32 | + >SQL Server resource is different from the Virtual Machine resource. |
| 33 | +
|
| 34 | +1. Go to **Settings** > **Backups**. |
| 35 | + |
| 36 | + If the backup isn’t configured for the VM, the following backup options appear: |
| 37 | + |
| 38 | + - **Azure Backup** |
| 39 | + - **Automated Backup** |
| 40 | + |
| 41 | + :::image type="content" source="./media/backup-sql-server-database-from-azure-vm-blade/select-backups.png" alt-text="Screenshot shows how to select the Backups option on a SQL VM." lightbox="./media/backup-sql-server-database-from-azure-vm-blade/select-backups.png"::: |
| 42 | + |
| 43 | +1. On the **Azure Backup** blade, select **Enable** to start configuring the backup for the SQL Server using Azure Backup. |
| 44 | + |
| 45 | +1. To start the backup operation, select an existing Recovery Services vault or [create a new vault](backup-sql-server-database-azure-vms.md#create-a-recovery-services-vault). |
| 46 | + |
| 47 | +1. Select **Discover** to start discovering databases in the VM. |
| 48 | + |
| 49 | + :::image type="content" source="./media/backup-sql-server-database-from-azure-vm-blade/start-database-discovery.png" alt-text="Screenshot shows how to start discovering the SQL database." lightbox="./media/backup-sql-server-database-from-azure-vm-blade/start-database-discovery.png"::: |
| 50 | + |
| 51 | + This operation will take some time to run when performed for the first time. |
| 52 | + |
| 53 | + :::image type="content" source="./media/backup-sql-server-database-from-azure-vm-blade/database-discovery-in-progress.png" alt-text="Screenshot shows the database discovery operation in progress." lightbox="./media/backup-sql-server-database-from-azure-vm-blade/database-discovery-in-progress.png"::: |
| 54 | + |
| 55 | + Azure Backup discovers all SQL Server databases on the VM. During discovery, the following operations run in the background: |
| 56 | + |
| 57 | + 1. Azure Backup registers the VM with the vault for workload backup. All databases on the registered VM can only be backed up to this vault. |
| 58 | + 1. Azure Backup installs the AzureBackupWindowsWorkload extension on the VM. No agent is installed on the SQL database. |
| 59 | + 1. Azure Backup creates the service account NT Service\AzureWLBackupPluginSvc on the VM. |
| 60 | + 1. All backup and restore operations use the service account. |
| 61 | + 1. NT Service\AzureWLBackupPluginSvc needs SQL sysadmin permissions. All SQL Server VMs created in Azure Marketplace come with the SqlIaaSExtension installed. |
| 62 | + |
| 63 | + The AzureBackupWindowsWorkload extension uses the SQLIaaSExtension to automatically get the necessary permissions. |
| 64 | + |
| 65 | +1. Once the operation is completed, select **Configure backup**. |
| 66 | + |
| 67 | + :::image type="content" source="./media/backup-sql-server-database-from-azure-vm-blade/start-database-backup-configuration.png" alt-text="Screenshot shows how to start the database backup configuration." lightbox="./media/backup-sql-server-database-from-azure-vm-blade/start-database-backup-configuration.png"::: |
| 68 | + |
| 69 | +1. Define a backup policy using one of the following options: |
| 70 | + |
| 71 | + 1. Select the default policy as *HourlyLogBackup*. |
| 72 | + 1. Select an existing backup policy previously created for SQL. |
| 73 | + 1. [Create a new policy](tutorial-sql-backup.md#create-a-backup-policy) based on your RPO and retention range. |
| 74 | + |
| 75 | + :::image type="content" source="./media/backup-sql-server-database-from-azure-vm-blade/select-backup-policy.png" alt-text="Screenshot shows how to select a backup policy for the database." lightbox="./media/backup-sql-server-database-from-azure-vm-blade/select-backup-policy.png"::: |
| 76 | + |
| 77 | +1. Select **Add** to view all the registered availability groups and standalone SQL Server instances. |
| 78 | + |
| 79 | +1. On **Select items to backup**, expand the list of all the *unprotected databases* in that instance or the *Always On availability group*. |
| 80 | + |
| 81 | +1. Select the *databases* to protect and select **OK**. |
| 82 | + |
| 83 | + :::image type="content" source="./media/backup-sql-server-database-from-azure-vm-blade/confirm-database-selection.png" alt-text="Screenshot shows how to confirm the selection of database for backup." lightbox="./media/backup-sql-server-database-from-azure-vm-blade/confirm-database-selection.png"::: |
| 84 | + |
| 85 | +1. To optimize backup loads, Azure Backup allows/permits a maximum number of 50 databases in one backup job. |
| 86 | + |
| 87 | + 1. To protect more than 50 databases, configure multiple backups. |
| 88 | + 1. To enable the entire instance or the Always On availability group, in the AUTOPROTECT drop-down list, select ON, and then select OK. |
| 89 | + |
| 90 | +1. Select **Enable Backup** to submit the Configure Protection operation and track the configuration progress in the Notifications area of the portal. |
| 91 | + |
| 92 | + :::image type="content" source="./media/backup-sql-server-database-from-azure-vm-blade/enable-database-backup.png" alt-text="Screenshot shows how to enable the database backup operation." lightbox="./media/backup-sql-server-database-from-azure-vm-blade/enable-database-backup.png"::: |
| 93 | + |
| 94 | +1. To get an overview of your configured backups and a summary of backup jobs, go to **Settings** > **Backups** in the SQL VM resource. |
| 95 | + |
| 96 | + :::image type="content" source="./media/backup-sql-server-database-from-azure-vm-blade/backup-jobs-summary.png" alt-text="Screenshot shows how to view the backup jobs summary." lightbox="./media/backup-sql-server-database-from-azure-vm-blade/backup-jobs-summary.png"::: |
| 97 | + |
| 98 | +## Next steps |
| 99 | + |
| 100 | +- [Restore SQL Server databases on Azure VM](restore-sql-database-azure-vm.md) |
| 101 | +- [Manage and monitor backed up SQL Server databases](manage-monitor-sql-database-backup.md) |
| 102 | +- [Troubleshoot backups on a SQL Server database](backup-sql-server-azure-troubleshoot.md) |
| 103 | +- [FAQ - Backing up SQL Server databases on Azure VMs - Azure Backup | Microsoft Learn](/azure/backup/faq-backup-sql-server) |
0 commit comments