|
| 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/19/2024 |
| 6 | +ms.service: backup |
| 7 | +author: AbhishekMallick-MS |
| 8 | +ms.author: v-abhmallick |
| 9 | +--- |
| 10 | +# Back up a SQL Server from the Azure 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 | +To configure backup for SQL Server database from the SQL VM blade, follow these steps: |
| 26 | + |
| 27 | +1. In the [Azure portal](https://portal.azure.com/), go to the *SQL VM resource*. |
| 28 | + |
| 29 | + >[!Note] |
| 30 | + >SQL Server resource is different from the Virtual Machine resource. |
| 31 | +
|
| 32 | +2. Go to **Settings** > **Backups**. |
| 33 | + |
| 34 | + If the backup isn’t configured for the VM, the following backup options appear: |
| 35 | + |
| 36 | + - **Azure Backup** |
| 37 | + - **Automated Backup** |
| 38 | + |
| 39 | +3. On the **Azure Backup** blade, select **Enable** to start configuring the backup for the SQL Server using Azure Backup. |
| 40 | + |
| 41 | +4. 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). |
| 42 | + |
| 43 | +5. Select **Discover** to start discovering databases in the VM. |
| 44 | + |
| 45 | + This operation will take some time to run when performed for the first time. |
| 46 | + |
| 47 | + Azure Backup discovers all SQL Server databases on the VM. During discovery, the following operations run in the background: |
| 48 | + |
| 49 | + 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. |
| 50 | + 2. Azure Backup installs the AzureBackupWindowsWorkload extension on the VM. No agent is installed on the SQL database. |
| 51 | + 3. Azure Backup creates the service account NT Service\AzureWLBackupPluginSvc on the VM. |
| 52 | + 4. All backup and restore operations use the service account. |
| 53 | + 5. NT Service\AzureWLBackupPluginSvc needs SQL sysadmin permissions. All SQL Server VMs created in Azure Marketplace come with the SqlIaaSExtension installed. |
| 54 | + |
| 55 | + The AzureBackupWindowsWorkload extension uses the SQLIaaSExtension to automatically get the necessary permissions. |
| 56 | + |
| 57 | +6. Once the operation is completed, select **Configure backup**. |
| 58 | + |
| 59 | +7. Define a backup policy using one of the following options: |
| 60 | + |
| 61 | + 1. Select the default policy as *HourlyLogBackup*. |
| 62 | + 2. Select an existing backup policy previously created for SQL. |
| 63 | + 3. Create a new policy based on your RPO and retention range. |
| 64 | + |
| 65 | +8. Select **Add** to view all the registered availability groups and standalone SQL Server instances. |
| 66 | + |
| 67 | +9. On **Select items to backup**, expand the list of all the *unprotected databases* in that instance or the *Always On availability group*. |
| 68 | + |
| 69 | +10. Select the *databases* to protect and select **OK**. |
| 70 | + |
| 71 | +11. To optimize backup loads, Azure Backup allows/permits a maximum number of 50 databases in one backup job. |
| 72 | + |
| 73 | + 1. To protect more than 50 databases, configure multiple backups. |
| 74 | + 2. To enable the entire instance or the Always On availability group, in the AUTOPROTECT drop-down list, select ON, and then select OK. |
| 75 | + |
| 76 | +12. Select **Enable Backup** to submit the Configure Protection operation and track the configuration progress in the Notifications area of the portal. |
| 77 | + |
| 78 | +13. To get an overview of your configured backups and a summary of backup jobs, go to **Settings** > **Backups** in the SQL VM resource. |
| 79 | + |
| 80 | +## Next steps |
| 81 | + |
| 82 | +- [Restore SQL Server databases on Azure VM](restore-sql-database-azure-vm.md) |
| 83 | +- [Manage and monitor backed up SQL Server databases](manage-monitor-sql-database-backup.md) |
| 84 | +- [Troubleshoot backups on a SQL Server database](backup-sql-server-azure-troubleshoot.md) |
| 85 | +- [FAQ - Backing up SQL Server databases on Azure VMs - Azure Backup | Microsoft Learn](faq-backup-sql-server.md) |
0 commit comments