Manage Azure SQL Database long-term backup retention
APPLIES TO:
Azure SQL Database
Azure SQL Managed Instance
With Azure SQL Database, you can set a long-term backup retention policy (LTR) to automatically retain backups in separate Azure Blob storage containers for up to 10 years. You can then recover a database using these backups using the Azure portal, Azure CLI, or PowerShell. Long-term retention policies are also supported for Azure SQL Managed Instance.
Prerequisites
An active Azure subscription.
Create long-term retention policies
You can configure SQL Database to retain automated backups for a period longer than the retention period for your service tier.
In the Azure portal, navigate to your server and then select Backups. Select the Retention policies tab to modify your backup retention settings.
On the Retention policies tab, select the database(s) on which you want to set or modify long-term backup retention policies. Unselected databases will not be affected.
In the Configure policies pane, specify your desired retention period for weekly, monthly, or yearly backups. Choose a retention period of '0' to indicate that no long-term backup retention should be set.
Select Apply to apply the chosen retention settings to all selected databases.
Important
When you enable a long-term backup retention policy, it may take up to 7 days for the first backup to become visible and available to restore. For details of the LTR backup cadance, see long-term backup retention.
View backups and restore from a backup
View the backups that are retained for a specific database with an LTR policy, and restore from those backups.
In the Azure portal, navigate to your server and then select Backups. To view the available LTR backups for a specific database, select Manage under the Available LTR backups column. A pane will appear with a list of the available LTR backups for the selected database.
In the Available LTR backups pane that appears, review the available backups. You may select a backup to restore from or to delete.
To restore from an available LTR backup, select the backup from which you want to restore, and then select Restore.
Choose a name for your new database, then select Review + Create to review the details of your Restore. Select Create to restore your database from the chosen backup.
On the toolbar, select the notification icon to view the status of the restore job.
When the restore job is completed, open the SQL databases page to view the newly restored database.
Note
From here, you can connect to the restored database using SQL Server Management Studio to perform needed tasks, such as to extract a bit of data from the restored database to copy into the existing database or to delete the existing database and rename the restored database to the existing database name.
Limitations
- When restoring from an LTR backup, the read scale property is disabled. To enable, read scale on the restored database, update the database after it has been created.
- You need to specify the target service level objective, when restoring from an LTR backup, which was created when the database was in an elastic pool.
Next steps
- To learn about service-generated automatic backups, see automatic backups
- To learn about long-term backup retention, see long-term backup retention
Feedback
Submit and view feedback for