[SQL Server] Backup databases to Azure

BLOG

7/1/20241 min lire

SQL Server supports the following tools and features :

  • Backup to URL

  • Backup to Microsoft Azure tool

  • Managed backup to Microsoft Azure

SQL Server 2012 SP1 CU2 introducted the capability to back up directly to (and restore from) Microsoft Azure Blob Storage.

Backing up databases to Microsoft Azure Blob Storage is great if your databases are hosted in Microsoft Azure.

Introduced in SQL Server 2014, the SQL Server Managed Backup to Microsoft Azure feature automatically manages your backups to Microsoft Azure.

This feature can be enabled at the instance or database level, through the [smart_admin].[sp_set_instance_backup] or [smart_admin].[sp_set_db_backup] system stored procedures. The database engine then automatically performs full and log backups. Backups are retained for up to 30 days.

Full backups are performed whenever any of the following are true :

  • The last full backup is over a week old

  • The log has grown more than 1 GB since the last full backup

  • Log chain is broken

Log backups are performed whenever any of the following are true :

  • More than 2 hours gave expired since the last log backup

  • The log has grown in 5 MB

  • The log backup is behind the full backup

Activate SQL Server Managed Backup to Microsoft Azure at the instance level :

Activate SQL Server Managed Backup to Microsoft Azure at the database level :

The Microsoft SQL Server Backup to Microsoft Azure Tool is an externally available tool that enables backup to Azure Blob Storage and encrypts and compresses SQL Server backups stored locally or in the cloud. It works with all versions and editions of SQL Server, even if they do not support compression and encryption.