Azure SQL Database: Manage long-term backup retention - Azure SQL Database (2024)

  • Article

Applies to: Azure SQL Database: Manage long-term backup retention - Azure SQL Database (1) Azure SQL Database

  • Azure SQL Database
  • Azure SQL Managed Instance

With Azure SQL Database, you can set a long-term backup retention (LTR) policy 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.

Prerequisites

  • Portal
  • Azure CLI
  • PowerShell

An active Azure subscription.

Permissions

To view and restore LTR backups, you need:

  • Subscription Owner role or

  • Subscription Contributor role or

  • SQL Server Contributor role or

  • Custom role with the following permissions:

    Microsoft.Sql/locations/longTermRetentionBackups/readMicrosoft.Sql/locations/longTermRetentionServers/longTermRetentionBackups/readMicrosoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups/read

To delete LTR backups, you need to be a member of one of the following roles:

  • Subscription Owner role or

  • Subscription Contributor role or

  • Custom role with the following permission:

    Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups/delete

Note

The SQL Server Contributor role does not have permission to delete LTR backups.

Azure role-based access control (RBAC) permissions could be granted in either subscription or resource group scope. However, to access LTR backups that belong to a dropped server, this permission must be granted in the subscription scope of that server:

Microsoft.Sql/locations/longTermRetentionServers/longTermRetentionDatabases/longTermRetentionBackups/delete

Create long-term retention policies

  • Portal
  • Azure CLI
  • PowerShell

You can configure SQL Database to retain automated backups for a period longer than the retention period for your service tier.

  1. In the Azure portal, navigate to your server and then select Backups. Select the Retention policies tab to modify your backup retention settings.

    Azure SQL Database: Manage long-term backup retention - Azure SQL Database (2)

  2. 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.

    Azure SQL Database: Manage long-term backup retention - Azure SQL Database (3)

  3. 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.

    Azure SQL Database: Manage long-term backup retention - Azure SQL Database (4)

  4. 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 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.

  • Portal
  • Azure CLI
  • PowerShell
  1. 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 appears with a list of the available LTR backups for the selected database.

    Azure SQL Database: Manage long-term backup retention - Azure SQL Database (5)

  2. In the Available LTR backups pane that appears, review the available backups. Select a backup to restore from.

    Azure SQL Database: Manage long-term backup retention - Azure SQL Database (6)

  3. To restore from an available LTR backup, select the backup from which you want to restore, and then select Restore.

    Azure SQL Database: Manage long-term backup retention - Azure SQL Database (7)

  4. 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.

    Azure SQL Database: Manage long-term backup retention - Azure SQL Database (8)

  5. On the toolbar, select the notification icon to view the status of the restore job.

    Azure SQL Database: Manage long-term backup retention - Azure SQL Database (9)

  6. 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.

Delete LTR backups

Delete backups that are retained for a specific database with an LTR policy.

Important

Deleting LTR backup is non-reversible. To delete an LTR backup after the server has been deleted you must have Subscription scope permission. You can set up notifications about each delete in Azure Monitor by filtering for operation 'Deletes a long term retention backup'. The activity log contains information on who and when made the request. See Create activity log alerts for detailed instructions.

  • Portal
  • Azure CLI
  • PowerShell
  1. In the Azure portal, navigate to the logical server of the Azure SQL Database.
  2. Select Backups. To view the available LTR backups for a specific database, select Manage under the Available LTR backups column. A pane appears with a list of the available LTR backups for the selected database.
  3. In the Available LTR backups pane that appears, review the available backups. Select a backup to delete. Select Delete.

Best practices

If you use LTR backups to meet compliance or other mission-critical requirements:

  • Verify the LTR backups are taken as per the configured policy by following steps outlined in view backups section either using Portal, Azure CLI or PowerShell.
  • Consider conducting periodic recovery drills to verify that restore of LTR backups results in expected database state.

Related content

  • To learn about service-generated automatic backups, see automatic backups
  • To learn about long-term backup retention, see long-term backup retention
Azure SQL Database: Manage long-term backup retention - Azure SQL Database (2024)
Top Articles
Old Money Aesthetic: A Comprehensive Guide for Men
4 Successful Crowdfunding Examples to Motivate You - Crowd101
Encore Atlanta Cheer Competition
Archived Obituaries
Beautiful Scrap Wood Paper Towel Holder
Select The Best Reagents For The Reaction Below.
27 Places With The Absolute Best Pizza In NYC
Anki Fsrs
Epaper Pudari
Olivia Ponton On Pride, Her Collection With AE & Accidentally Coming Out On TikTok
Tcu Jaggaer
United Dual Complete Providers
Industry Talk: Im Gespräch mit den Machern von Magicseaweed
4156303136
Sand Castle Parents Guide
What is Cyber Big Game Hunting? - CrowdStrike
Wizard Build Season 28
Mail.zsthost Change Password
Cyndaquil Gen 4 Learnset
Free Online Games on CrazyGames | Play Now!
Fraction Button On Ti-84 Plus Ce
Jayah And Kimora Phone Number
Accident On May River Road Today
Golden Abyss - Chapter 5 - Lunar_Angel
St. Petersburg, FL - Bombay. Meet Malia a Pet for Adoption - AdoptaPet.com
Yosemite Sam Hood Ornament
kvoa.com | News 4 Tucson
Booknet.com Contract Marriage 2
Paris Immobilier - craigslist
Summoners War Update Notes
Grays Anatomy Wiki
Bee And Willow Bar Cart
Reli Stocktwits
Bimmerpost version for Porsche forum?
Austin Automotive Buda
The best Verizon phones for 2024
Gt500 Forums
Jack In The Box Menu 2022
The best bagels in NYC, according to a New Yorker
How to Print Tables in R with Examples Using table()
Traumasoft Butler
Weekly Math Review Q2 7 Answer Key
Unveiling Gali_gool Leaks: Discoveries And Insights
Marcal Paper Products - Nassau Paper Company Ltd. -
Timothy Warren Cobb Obituary
Unit 11 Homework 3 Area Of Composite Figures
Dagelijkse hooikoortsradar: deze pollen zitten nu in de lucht
Market Place Tulsa Ok
FactoryEye | Enabling data-driven smart manufacturing
Plasma Donation Greensburg Pa
Grace Family Church Land O Lakes
Used Auto Parts in Houston 77013 | LKQ Pick Your Part
Latest Posts
Article information

Author: Kimberely Baumbach CPA

Last Updated:

Views: 6205

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Kimberely Baumbach CPA

Birthday: 1996-01-14

Address: 8381 Boyce Course, Imeldachester, ND 74681

Phone: +3571286597580

Job: Product Banking Analyst

Hobby: Cosplaying, Inline skating, Amateur radio, Baton twirling, Mountaineering, Flying, Archery

Introduction: My name is Kimberely Baumbach CPA, I am a gorgeous, bright, charming, encouraging, zealous, lively, good person who loves writing and wants to share my knowledge and understanding with you.