Backups in Azure deployments

Question

 How often are my Azure resources backed-up?  Including Azure SQL Database and Azure Virtual Machine

  

Answer

Backups are managed internally by Azure for Azure SQL database and Azure SQL managed instances.  Azure SQL database supports 3 types of backups, like SQL Server, to achieve a point in time recovery.

  • Full Backup

  • Differential Backup

  • Transaction Log backup

The full backup is a complete dump of your database including everything present in the database and transaction log file. Differential backup captures only those changes which were done since the last full backup and Transaction log backup captures the log records from the transaction log file. It is also used for point-in-time recovery. Transaction log backup captures log details in the incremental format so if you have missed any previous log backup then you cannot recover your database beyond that log backup.

Automatic backups for these databases run one full backup weekly, differential backup on every 12 to 24 hours interval, and transaction log backup on every 5 to 10 minutes. The first full backup will be taken by Azure as soon as you deploy your Azure SQL database. You don’t need to configure anything for that. Azure does it on your behalf whenever you deploy any SQL database. The remaining differential and transaction log backup will start running after this full backup in the background. The system will decide when to run which backup and their schedules based on the workload on your database. These backups can be used for point-in-time recovery, or to restore databases to another Azure location or region, or you need to restore this database from a very old backup that is kept under a long-term retention policy.

Short-term retention of your data is set to 7 days for point-in-time recovery by default, and differential backup is configured every 12 hours. Long-term retention (LTR) is not set by default so you need to do it manually as per your business' retention policy.

In the case of your Azure Virtual Machine, we are less concerned with backing this up as there is nothing that can't be quickly re-deployed anyway, such as the Jiwa application (just down-load it again).  Your Active Directory for users is managed online through Azure Active Directory.



To check your backup Point In Time Recovery (PITR), login to your Azure portal.

  • Click on SQL Servers

  • Select your SQL Server, then click on Backups (under Data Management section).

  • There you can see your Earliest PITR point.  This is how far back you can go to restore the database.





  • Click on Retention Policies to see and change the retention period and frequency for your backups.  Remember, the longer your retention and the more frequent, the more you will pay.  It's a risk management decision.