Concepts

To configure long-term backup retention for your Azure SQL Solutions, you can use the Azure Portal, PowerShell, or Azure CLI. This article will guide you through the process using all three methods.

Using Azure Portal:

  1. Sign in to the Azure Portal and navigate to your Azure SQL Solution resource.
  2. In the left-hand menu, select “Backup and restore.”
  3. Under “Long-term backup retention,” click on the “Configure” button.
  4. In the “Retention period” section, specify the number of days you want to retain backups. You can choose a value between 7 and 10,080 days.
  5. In the “Weekly retention” section, choose the day of the week that you want the system to take a full backup. You can enable up to four weekly backups.
  6. In the “Monthly retention” section, choose the week of the month and the day of the week when you want the system to take a full backup. You can enable up to 12 monthly backups.
  7. Click “Apply” to save your changes.

Using PowerShell:

Make sure you have the Azure PowerShell module installed and imported.

Connect-AzAccount

Select the Azure subscription containing your Azure SQL Solution:

Select-AzSubscription -SubscriptionName "YourSubscriptionName"

Set the context to your Azure SQL Solution:

Set-AzSqlDatabaseLongTermRetentionBackup -ResourceGroupName "YourResourceGroup" -ServerName "YourServerName" -DatabaseName "YourDatabaseName" -WeeklyRetention P7W -MonthlyRetention P12M -YearlyRetention P10Y

Note: Adjust the resource group, server name, database name, weekly retention (P7W), monthly retention (P12M), and yearly retention (P10Y) according to your requirements.

Using Azure CLI:

Ensure you have the Azure CLI installed and configured.

az login

Set the active subscription containing your Azure SQL Solution:

az account set --subscription "YourSubscriptionName"

Configure the long-term backup retention for your Azure SQL Solution using the following command:

az sql db ltr-policy set --name "YourDatabaseName" --server "YourServerName" --resource-group "YourResourceGroup" --weekly-retention P7W --monthly-retention P12M --yearly-retention P10Y

Note: Replace “YourDatabaseName,” “YourServerName,” “YourResourceGroup,” weekly retention (P7W), monthly retention (P12M), and yearly retention (P10Y) with your own values based on your specific configuration.

By following the steps using the Azure Portal, PowerShell, or Azure CLI, you can easily configure long-term backup retention for your Azure SQL Solution. This will ensure that you have reliable and secure backups of your data for extended periods, meeting your specific retention requirements.

Answer the Questions in Comment Section

True/False:

In Azure SQL Database, the long-term backup retention feature provides automatic backups for up to 35 years.
Answer: False

Single Select:

Which Azure SQL deployment option supports long-term backup retention?

  • a) Azure SQL Database Single Database
  • b) Azure SQL Managed Instance
  • c) Azure SQL Database Hyperscale
  • d) Azure SQL Database for PostgreSQL

Answer: b) Azure SQL Managed Instance

True/False:

Long-term backup retention in Azure SQL Database is enabled by default for all databases.
Answer: False

True/False:

The long-term backup retention feature in Azure SQL Database is available only in specific regions.
Answer: True

Multiple Select:

Which of the following retention periods can be configured for long-term backup retention in Azure SQL Database? (Select all that apply)

  • a) 1 week
  • b) 3 months
  • c) 1 year
  • d) 10 years

Answer: b) 3 months, c) 1 year, d) 10 years

Single Select:

What is the maximum retention period that can be configured for long-term backup retention in Azure SQL Database?

  • a) 1 month
  • b) 5 years
  • c) 10 years
  • d) 25 years

Answer: d) 25 years

True/False:

Long-term backup retention in Azure SQL Database is priced separately and incurs additional costs.
Answer: True

Single Select:

Which service is used to manage long-term backup retention in Azure SQL Database?

  • a) Azure Backup
  • b) Azure Site Recovery
  • c) Azure Blob Storage
  • d) Azure Recovery Services Vault

Answer: c) Azure Blob Storage

Multiple Select:

Which databases are eligible for long-term backup retention in Azure SQL Database? (Select all that apply)

  • a) General Purpose
  • b) Hyperscale
  • c) Business Critical
  • d) Serverless

Answer: a) General Purpose, b) Hyperscale, c) Business Critical

Single Select:

How many long-term backup retention policies can be applied to an Azure SQL Database?

  • a) Only one
  • b) Up to five
  • c) Unlimited
  • d) Depends on the database pricing tier

Answer: a) Only one

0 0 votes
Article Rating
Subscribe
Notify of
guest
21 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Lida Fogaça
10 months ago

This blog on configuring long-term backup retention for Azure SQL was very helpful. Thanks!

Venla Aro
11 months ago

Can someone explain the difference between long-term retention (LTR) and Point-in-Time Restore (PITR)?

Vincenzo Zimmermann
1 year ago

Great guide! Just configured my LTR for 10 years. Azure makes it so easy.

Halit Cuijpers
1 year ago

Can LTR backups be copied to another region for disaster recovery?

Murat Akar
11 months ago

The step-by-step screenshots in your blog were incredibly accurate. Thanks!

Arron Fletcher
1 year ago

Is there an additional cost associated with LTR backups compared to regular backups?

Sanni Suomi
8 months ago

I followed the instructions, but my backups are not showing in the LTR section. Any ideas?

Quinn Wang
10 months ago

This was very informative. Appreciate the clear instructions.

21
0
Would love your thoughts, please comment.x
()
x