Sql-server – Managed backups in Azure SQL Managed Instance

azuresql server

The Managed Instance allows the admin to ENABLE Compress backups at the instance level.

  1. Does that affect the managed backups?
  2. How does the Managed backups work? as i don't see any record in backupset table.

Best Answer

I doubt that the "compress" setting affects the managed backups either way. But there is no way to check as you don't have direct access to it. I have caught the system taking backups before, the commands show using sp_whoisactive, but can't say that I've ever looked at the full command string before. I will try and catch one of mine at it and update my answer if I can.

As for how managed backups work. The management system periodically takes full and log backups according to it's own schedule. There are some events that seem to spark a full backup to be taken that we have observed. Creating/Restoring a database, failing between failover group nodes and when the service restarts (probably Azure balancing it's internal workload).

These backups are stored in a hidden storage account and can only be accessed through powershell. Cross-subscription restores are not possible through powershell using managed backups.

You can additionally take COPY_ONLY backups to URL and then restore from there. But the backups can only be restored onto another managed instance (so no restore to on-prem of any version). However, if you have enabled TDE with Azure managed key rotation, this option is locked out for you. Enabling TDE is the default for databases created through CREATE DATABASE, although databases restored (as in restored from on-prem) carry their TDE setting with them.