Backup and Restore for SQL Server in Azure Virtual Machines
Backing up data in SQL Server databases is an important part of the strategy in protecting against data loss due to application or user errors. This topic addresses SQL Server database backup and restore functionality. Starting in SQL Server 2012 SP1 Cumulative Update 2, you can back up to and restore from the Azure Blob Storage service directly using the T-SQL Backup statement.
Backup and Restore of databases can be done using native SQL Server Backup and Restore. For all supported versions of SQL Server, you can attach data disks to the Azure virtual machine and use SQL Server native backup to back up the data to the attached disks. However, there is a limit to the number of disks you can attach to an Azure virtual machine, based on the size of the virtual machine. There is also the overhead of disk management to consider. For more up to date information on virtual machine sizes and the number of disks that can be attached to each, see Virtual Machines.
The sections below include information specific to the different versions of SQL Server supported in an Azure virtual machine.
Backup and Restore in SQL Server 2014
SQL Server 2014 includes the following enhancements:
- Backup and Restore to Azure:
- SQL Server Backup to URL now has support in SQL Server Management Studio. The option to backup to Azure is now available when using Backup or Restore task, or maintenance plan wizard in SQL Server Management Studio. For more information, see SQL Server Backup to URL.
- SQL Server Managed Backup to Azure: New functionality that enables automated backup management. This is especially useful for automating backup management for SQL Server instances running on an Azure Machine. For more information, see SQL Server Managed Backup to Azure.
- For an overview of all the options for SQL Server Backup to Azure, see SQL Server Backup to Azure.
- Encryption: SQL Server 2014 supports encrypting data when creating a backup. It supports several encryption algorithms and the use osf a certificate or asymmetric key. For more information, see Backup Encryption.
Backup and Restore in SQL Server 2012
For detailed information on SQL Server Backup and Restore in SQL Server 2012, see Backup and Restore of SQL Server Databases (SQL Server 2012).
Starting in SQL Server 2012 SP1 Cumulative Update 2, you can back up to and restore from the Azure Blob Storage service. This enhancement can be used to backup SQL Server databases on a SQL Server running on an Azure Virtual Machine or an on-premises instance. For more information, see SQL Server Backup and Restore with Azure Blob Storage Service.
Some of the benefits of using the Azure Blob storage service include the ability to bypass the 16 disk limit for attached disks, ease of management, the direct availability of the backup file to another instance of SQL Server instance running on an Azure virtual machine, or an on-premises instances for migration or disaster recovery purposes. For a full list of benefits to using an Azure blob storage service for SQL Server backups, see the Benefits section in SQL Server Backup and Restore with Azure Blob Storage Service.
For Best Practice recommendations and troubleshooting information, see Backup and Restore Best Practices (Azure Blob Storage Service).
Backup and Restore in other versions of SQL Server supported in an Azure Virtual Machine
For SQL Server Backup and Restore in SQL Server 2008 R2, see Backing up and Restoring Databases in SQL Server (SQL Server 2008 R2).
For SQL Server Backup and Restore in SQL Server 2008, see Backing up and Restoring Databases in SQL Server (SQL Server 2008).