Database backups are one of the most important things a database administrator has to perform. A good database backup strategy can help recover from system outages, unwanted deletes or updates, database corruption issues, and other related issues.
This chapter teaches you how to back up an Azure SQL Database. You'll learn about automated and manual backups, explore automated backup features, and perform the manual backup of an Azure SQL Database.
By the end of this chapter, you will be able to:
Microsoft provides automated backups for Azure SQL Databases.
Automatic backup consists of full, differential, and log backups. The first automatic full backup is performed immediately after the database is provisioned. The differential is scheduled to occur every hour, and transaction log backups are scheduled for every 5-10 minutes. The full backup is scheduled for once a week:
Microsoft gives you free backup storage which is double the size of your maximum provisioned database storage. For example, if you have a standard Azure SQL Database of size 100 GB, you get 200 GB of free backup storage. You can control the free backup storage size by limiting the retention period of the backups.
The backup retention period varies as per the different service tiers. The retention period for the basic service tier is seven days, and for the Standard and Premium tiers it's 35 days. You can extend the retention period through the Long Term Retention feature, which stores the backup in the Azure Backup Service Vault for as long as 10 years.
A Recovery Service vault is a storage service used to store backups of various Azure services such as VMs, Azure SQL databases, and even on-premises database backups.
Consider the
toystore
SQL Database created in
Chapter 2
Database to an Azure SQL Database. Mike has now been tasked with securing and backing up the data at ToyStore Ltd. In this section, we’ll learn how to create a Recovery Service Vault and then configure long-term backup retention for the Azure SQL Database using this Recovery Service Vault.
recovery
in the search box. From the search results, select Recovery Service vaults:toyfactory sql
server. The toystore
database is hosted in the toyfactory sql
server. You can also select the toyfactory
server from the portal dashboard.From the toyfactory SQL server pane, under the Settings section, select Long-term backup retentions, as shown in the following screenshot:
toystore
database under the Select databases section and select Configure from the top menu:toystorebackupvault
recovery service vault created in the preceding steps.oneyearretentionpolicy
. You can give a policy name of your choice.toystore
database backups.18.223.239.226