Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
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.
Note
Learn more about the SQL backup supported configurations and scenarios.
Prerequisites
Before you back up a SQL Server database, see the backup criteria.
Configure backup for SQLServer database
You can now configure Azure backup for your SQL server running in Azure VM, directly from the SQL VM resource blade.
To configure backup from the SQL VM blade, follow these steps:
In the Azure portal, go to the SQL VM resource.
Note
SQL Server resource is different from the Virtual Machine resource.
Go to Settings > Backups.
If the backup isn’t configured for the VM, the following backup options appear:
- Azure Backup
- Automated Backup
On the Azure Backup blade, select Enable to start configuring the backup for the SQL Server using Azure Backup.
To start the backup operation, select an existing Recovery Services vault or create a new vault.
Select Discover to start discovering databases in the VM.
This operation will take some time to run when performed for the first time.
Azure Backup discovers all SQL Server databases on the VM. During discovery, the following operations run in the background:
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.
Azure Backup installs the AzureBackupWindowsWorkload extension on the VM. No agent is installed on the SQL database.
Azure Backup creates the service account NT Service\AzureWLBackupPluginSvc on the VM.
All backup and restore operations use the service account.
NT Service\AzureWLBackupPluginSvc needs SQL sysadmin permissions. All SQL Server VMs created in Azure Marketplace come with the SqlIaaSExtension installed.
The AzureBackupWindowsWorkload extension uses the SQLIaaSExtension to automatically get the necessary permissions.
Once the operation is completed, select Configure backup.
Define a backup policy using one of the following options:
- Select the default policy as HourlyLogBackup.
- Select an existing backup policy previously created for SQL.
- Create a new policy based on your RPO and retention range.
Select Add to view all the registered availability groups and standalone SQL Server instances.
On Select items to backup, expand the list of all the unprotected databases in that instance or the Always On availability group.
Select the databases to protect and select OK.
To optimize backup loads, Azure Backup allows/permits a maximum number of 50 databases in one backup job.
- To protect more than 50 databases, configure multiple backups.
- To enable the entire instance or the Always On availability group, in the AUTOPROTECT drop-down list, select ON, and then select OK.
Select Enable Backup to submit the Configure Protection operation and track the configuration progress in the Notifications area of the portal.
To get an overview of your configured backups and a summary of backup jobs, go to Settings > Backups in the SQL VM resource.
Next steps
- Restore SQL Server databases on Azure VM
- Manage and monitor backed up SQL Server databases
- Troubleshoot backups on a SQL Server database
- FAQ - Backing up SQL Server databases on Azure VMs - Azure Backup | Microsoft Learn
Related content
- Back up SQL server databases in Azure VMs using Azure Backup via REST API.
- Restore SQL Server databases in Azure VMs with REST API.
- Manage SQL server databases in Azure VMs with Azure portal, Azure CLI, REST API.