Table of Contents
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.
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.
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.
In Azure SQL Database, the long-term backup retention feature provides automatic backups for up to 35 years.
Answer: False
Which Azure SQL deployment option supports long-term backup retention?
Answer: b) Azure SQL Managed Instance
Long-term backup retention in Azure SQL Database is enabled by default for all databases.
Answer: False
The long-term backup retention feature in Azure SQL Database is available only in specific regions.
Answer: True
Which of the following retention periods can be configured for long-term backup retention in Azure SQL Database? (Select all that apply)
Answer: b) 3 months, c) 1 year, d) 10 years
What is the maximum retention period that can be configured for long-term backup retention in Azure SQL Database?
Answer: d) 25 years
Long-term backup retention in Azure SQL Database is priced separately and incurs additional costs.
Answer: True
Which service is used to manage long-term backup retention in Azure SQL Database?
Answer: c) Azure Blob Storage
Which databases are eligible for long-term backup retention in Azure SQL Database? (Select all that apply)
Answer: a) General Purpose, b) Hyperscale, c) Business Critical
How many long-term backup retention policies can be applied to an Azure SQL Database?
Answer: a) Only one
If this material is helpful, please leave a comment and support us to continue.