Change automated backup settings for Azure SQL Database
Applies to: Azure SQL Database
This article provides examples to modify automated backup settings for Azure SQL Database, such as the short-term retention policy and the backup storage redundancy option that's used for backups. For Azure SQL Managed Instance, see Change automated backup settings for Azure SQL Managed Instance.
This article provides steps about how to delete personal data from the device or service and can be used to support your obligations under the GDPR. For general information about GDPR, see the GDPR section of the Microsoft Trust Center and the GDPR section of the Service Trust portal.
Change short-term retention policy
You can change the default point-in-time recovery (PITR) backup retention period and the differential backup frequency by using the Azure portal, the Azure CLI, PowerShell, or the REST API. The following examples illustrate how to change the PITR retention to 28 days and the differential backups to a 24-hour interval.
If you reduce the current retention period, you lose the ability to restore to points in time older than the new retention period. Backups that are no longer needed to provide PITR within the new retention period are deleted.
If you increase the current retention period, you don't immediately gain the ability to restore to older points in time within the new retention period. You gain that ability over time, as the system starts to retain backups for longer periods.
- These APIs will affect only the PITR retention period. If you configured long-term retention (LTR) for your database, it won't be affected. For information about how to change long-term retention periods, see Long-term retention.
- Hyperscale databases don't support configuring the differential backup frequency because differential backups don't apply to Hyperscale databases.
To change the PITR backup retention period or the differential backup frequency for active databases by using the Azure portal:
- Go to the logical server in Azure with the databases whose retention period you want to change.
- Select Backups on the left pane, and then select the Retention policies tab.
- Select the databases for which you want to change the PITR backup retention.
- Select Configure policies from the action bar.
- To change the retention period for point-in-time restore backups, use the slider under Point-in-time restore.
- To change differential backup frequency, select 12 Hours or 24 hours from the drop-down menu under Differential backup frequency .
Configure backup storage redundancy
You can configure backup storage redundancy for databases in Azure SQL Database when you create your database. You can also change the storage redundancy after the database is already created.
Backup storage redundancy changes made to existing databases apply to future backups only. The default value is geo-redundant storage. For differences in pricing between locally redundant, zone-redundant, and geo-redundant backup storage, see the SQL Database pricing page.
Storage redundancy for Hyperscale databases is unique. To learn more, review Hyperscale backup storage redundancy.
In the Azure portal, you can choose a backup storage redundancy option when you create your database. You can later update the backup storage redundancy from the Compute & storage page of your database settings.
When you're creating your database, choose the backup storage redundancy option on the Basics tab.
For existing databases, go to your database in the Azure portal. Select Compute & storage under Settings, and then choose your desired option for backup storage redundancy.
- Database backups are an essential part of any business continuity and disaster recovery strategy because they help protect your data from accidental corruption or deletion. To learn about the other business continuity solutions for SQL Database, see Business continuity overview.
- For information about how to configure, manage, and restore from long-term retention of automated backups in Azure Blob Storage by using the Azure portal, see Manage long-term backup retention by using the Azure portal.
- For information about how to configure, manage, and restore from long-term retention of automated backups in Azure Blob Storage by using PowerShell, see Manage long-term backup retention by using PowerShell.
- Get more information about how to restore a database to a point in time by using the Azure portal.
- Get more information about how to restore a database to a point in time by using PowerShell.