Long-term backup retention - Azure SQL Database & Azure SQL Managed Instance (2024)

  • Article

Applies to: Long-term backup retention - Azure SQL Database & Azure SQL Managed Instance (1) Azure SQL Database Long-term backup retention - Azure SQL Database & Azure SQL Managed Instance (2) Azure SQL Managed Instance

This article provides a conceptual overview of long-term retention of backups for Azure SQL Database and Azure SQL Managed Instance. Long-term retention can be configured for up to 10 years on backups for Azure SQL Database (including in the Hyperscale service tier), and Azure SQL Managed Instance.

To get started, see configure long-term backup retention for Azure SQL Database and Azure SQL Managed Instance.

How long-term retention works

Many applications have regulatory, compliance, or other business reasons that require you to retain database backups beyond the 1-35 days provided by the short-term retention period of automatic backups. Long-term backup retention (LTR) relies on the full database backups that are automatically created by the Azure SQL service. For more information, see automated backups in Azure SQL Database or Azure SQL Managed Instance.

By using the LTR feature, you can store specified full SQL Database and SQL Managed Instance backups in redundant Azure Blob storage with a configurable retention policy of up to 10 years. LTR backups can then be restored as a new database. If an LTR policy is configured, automated backups are copied to different blobs for long-term storage which you can then use to restore your database to a specific point in time. The copy is a background job that has no performance impact on the database workload. The LTR policy for each database in SQL Database can also specify how frequently the LTR backups are created.

Note

  • It's not currently possible to configure backups of Azure SQL Database and Azure SQL Managed Instance as immutable. LTR backups are non-modifiable, but you can be delete them through Azure portal, Azure CLI, PowerShell or REST API. For more information, see Configure LTR backups.
  • In Azure SQL Managed Instance, use SQL Agent jobs to schedule copy-only database backups and keep them on your own storage account. This could be an alternative to LTR functionality that can keep your backups up to 10 years.

To enable LTR, you can define a policy using a combination of four parameters: weekly backup retention (W), monthly backup retention (M), yearly backup retention (Y), and week of the year (WeekOfYear). If you specify W, one backup every week is copied to long-term storage. If you specify M, the first backup of each month is copied to the long-term storage. If you specify Y, one backup during the week specified by WeekOfYear is copied to the long-term storage. If the specified WeekOfYear is in the past when the policy is configured, the first LTR backup is created the following year. Each backup is kept in long-term storage according to the policy parameters that are configured when the LTR backup is created.

Any change to the LTR policy applies only to future backups. For example, if weekly backup retention (W), monthly backup retention (M), or yearly backup retention (Y) is modified, the new retention setting will only apply to new backups. The retention of existing backups will not be modified. If your intention is to delete old LTR backups before their retention period expires, you will need to manually delete the backups.

Examples of the LTR policy:

  • W=0, M=0, Y=5, WeekOfYear=3

    The third full backup of each year is kept for five years.

  • W=0, M=3, Y=0

    The first full backup of each month is kept for three months.

  • W=12, M=0, Y=0

    Each weekly full backup is kept for 12 weeks.

  • W=6, M=12, Y=10, WeekOfYear=20

    Each weekly full backup is kept for six weeks. Except the first full backup of each month, which is kept for 12 months. Except the full backup taken on the 20th week of the year, which is kept for 10 years.

The following table illustrates the cadence and expiration of the long-term backups for the following policy:

W=12 weeks (84 days), M=12 months (365 days), Y=10 years (3650 days), WeekOfYear=20 (the week after May 13)

The following dates are in ISO 8601 (YYYY-MM-DD).

PITR backup to LTRExpiration WExpiration MExpiration Y
2018-03-072019-03-02
2018-03-142018-06-06
2018-03-212018-06-13
2018-03-282018-06-20
2018-04-042019-03-30
2018-04-112018-07-04
2018-04-182018-07-11
2018-04-252018-07-18
2018-05-022019-04-27
2018-05-092018-08-01
2018-05-162028-05-13
2018-05-232018-08-15
2018-05-302018-08-22
2018-06-062019-06-01
2018-06-132018-09-05
2018-06-202018-09-12
2018-06-272018-09-19
2018-07-042019-06-29
2018-07-112018-10-03
2018-07-182018-10-10
2018-07-252018-10-17
2018-08-012019-07-27
2018-08-082018-10-31
2018-08-152018-11-07
2018-08-222018-11-14
2018-08-292018-11-21

If you modify the above policy and set W=0 (no weekly backups), the service only retains the monthly and yearly backups. No weekly backups are stored under the LTR policy. The storage amount needed to keep these backups reduces accordingly.

Important

The timing of individual LTR backups is controlled by Azure SQL Database. You cannot manually create an LTR backup or control the timing of the backup creation. After configuring an LTR policy, it might take up to 7 days before the first LTR backup will show up on the list of available backups.

If you delete a logical server or a managed instance, all databases on that server or managed instance are also deleted and can't be recovered. You can't restore a deleted server or managed instance. However, if you had configured LTR for a database or managed instance, LTR backups are not deleted, and they can be used to restore databases on a different server or managed instance in the same subscription, to a point in time when an LTR backup was taken.

Similarly, if you delete a database, LTR backups are not deleted and are retained for the configured retention period. These backups can be restored to the same server or a different server in the same subscription.

Geo-replication and long-term backup retention

If you're using active geo-replication or failover groups as your business continuity solution, you should prepare for eventual failovers and configure the same LTR policy on the secondary database or instance. Your LTR storage cost doesn't increase, as backups aren't generated from the secondaries. The backups are only created when the secondary becomes primary. It ensures noninterrupted generation of the LTR backups when the failover is triggered and the primary moves to the secondary region.

Note

When the original primary database recovers from an outage that caused the failover, it becomes a new secondary. Therefore, the backup creation will not resume, and the existing LTR policy doesn't take effect until it becomes the primary again.

Configure long-term backup retention

You can configure long-term backup retention using the Azure portal and PowerShell for Azure SQL Database and Azure SQL Managed Instance. To restore a database from the LTR storage, you can select a specific backup based on its timestamp. The database can be restored to any existing server or managed instance under the same subscription as the original database.

To learn how to configure long-term retention or restore a database from backup for SQL Database using the Azure portal or PowerShell, see Manage Azure SQL Database long-term backup retention.

To learn how to configure long-term retention or restore a database from backup for SQL Managed Instance using the Azure portal or PowerShell, see Manage Azure SQL Managed Instance long-term backup retention.

When a restore request is initiated in the final 7 days of the LTR retention period, Azure will automatically extend the expiration date of all backups +7 days, to prevent an LTR backup from expiring during the restore.

Note

If you are using LTR backups to meet compliance or other mission-critical requirements, consider conducting periodic recovery drills to verify that LTR backups can be restored, and that the restore results in the expected database state.

Related content

Because database backups protect data from accidental corruption or deletion, they're an essential part of any business continuity and disaster recovery strategy.

  • Business continuity overview for Azure SQL Database
  • Business continuity overview for Azure SQL Managed Instance
  • Automated backups in Azure SQL Database
  • Automated backups in Azure SQL Managed Instance

For a tutorial on configuring and managing LTR backups, visit:

  • Manage Azure SQL Database long-term backup retention
  • Manage Azure SQL Managed Instance long-term backup retention
Long-term backup retention - Azure SQL Database & Azure SQL Managed Instance (2024)
Top Articles
How to Analyze Corporate Profit Margins
Net Profit Margin Ratio, What Is It? How To Calculate It? Net Profit Margin Ratio Example
Srtc Tifton Ga
Cintas Pay Bill
EY – все про компанію - Happy Monday
Klustron 9
Nation Hearing Near Me
Lenscrafters Westchester Mall
Wmlink/Sspr
Seth Juszkiewicz Obituary
Hallelu-JaH - Psalm 119 - inleiding
Guardians Of The Galaxy Vol 3 Full Movie 123Movies
Charmeck Arrest Inquiry
3472542504
Https E24 Ultipro Com
Nonne's Italian Restaurant And Sports Bar Port Orange Photos
Bahsid Mclean Uncensored Photo
Edicts Of The Prime Designate
Metro Pcs.near Me
Our History
[Cheryll Glotfelty, Harold Fromm] The Ecocriticism(z-lib.org)
Regal Amc Near Me
4 Times Rihanna Showed Solidarity for Social Movements Around the World
Regina Perrow
Sensual Massage Grand Rapids
Royalfh Obituaries Home
Free T33N Leaks
Scott Surratt Salary
*!Good Night (2024) 𝙵ull𝙼ovie Downl𝚘ad Fr𝚎e 1080𝚙, 720𝚙, 480𝚙 H𝙳 HI𝙽DI Dub𝚋ed Fil𝙼yz𝚒lla Isaidub
Uno Fall 2023 Calendar
Delta Rastrear Vuelo
Human Unitec International Inc (HMNU) Stock Price History Chart & Technical Analysis Graph - TipRanks.com
Forager How-to Get Archaeology Items - Dino Egg, Anchor, Fossil, Frozen Relic, Frozen Squid, Kapala, Lava Eel, and More!
JD Power's top airlines in 2024, ranked - The Points Guy
Gold Nugget at the Golden Nugget
Msnl Seeds
Dr Adj Redist Cadv Prin Amex Charge
9781644854013
Mckinley rugzak - Mode accessoires kopen? Ruime keuze
Saybyebugs At Walmart
Encompass.myisolved
Riverton Wyoming Craigslist
Atom Tickets – Buy Movie Tickets, Invite Friends, Skip Lines
Mcalister's Deli Warrington Reviews
St Vrain Schoology
Bank Of America Appointments Near Me
Ewwwww Gif
Electric Toothbrush Feature Crossword
Wwba Baseball
Uno Grade Scale
Tommy Gold Lpsg
Heisenberg Breaking Bad Wiki
Latest Posts
Article information

Author: Patricia Veum II

Last Updated:

Views: 5945

Rating: 4.3 / 5 (64 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Patricia Veum II

Birthday: 1994-12-16

Address: 2064 Little Summit, Goldieton, MS 97651-0862

Phone: +6873952696715

Job: Principal Officer

Hobby: Rafting, Cabaret, Candle making, Jigsaw puzzles, Inline skating, Magic, Graffiti

Introduction: My name is Patricia Veum II, I am a vast, combative, smiling, famous, inexpensive, zealous, sparkling person who loves writing and wants to share my knowledge and understanding with you.