Manage Azure SQL Managed Instance long-term backup retention
Applies to: Azure SQL Managed Instance
In Azure SQL Managed Instance, you can configure a long-term backup retention policy (LTR). This allows you to automatically retain database backups in separate Azure Blob storage containers for up to 10 years. You can then recover a database using these backups with the Azure portal and PowerShell.
The following sections show you how to use the Azure portal, PowerShell, and Azure CLI to configure the long-term backup retention, view backups in Azure SQL storage, and restore from a backup in Azure SQL storage.
Create long-term retention policies
You can configure SQL Managed Instance to retain automated backups for a period longer than the retention period for your service tier.
In the Azure portal, select your managed instance and then click Backups. On the Retention policies tab, select the database(s) on which you want to set or modify long-term backup retention policies. Changes will not apply to any databases left unselected.
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.
When complete, click Apply.
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 cadence, 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, select your managed instance and then click Backups. On the Available backups tab, select the database for which you want to see available backups. Click Manage.
In the Manage backups pane, review the available backups.
Select the backup from which you want to restore, click Restore, then on the restore page specify the new database name. The backup and source will be pre-populated on this page.
Click Review + Create to review your Restore details. Then click Create to restore your database from the chosen backup.
On the toolbar, click the notification icon to view the status of the restore job.
When the restore job is completed, open the Managed Instance Overview page to view the newly restored database.
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.