Azure SQL Database Automated Backup Strategy

When designing the architecture of Kontext platform, Azure SQL Database is chosen as the storage for relational data. TDE and other advanced security features are always enabled to protect the database. Backup plans are also employed to ensure I can always restore the database for as point of time for disaster recovery.

Manual backup strategy

At the moment, I'm using Export function on Azure Portal to manually export the database into Azure Blob Storage. It involves the following steps:

  • Log into Azure Portal.
  • Navigate to Azure SQL Database.
  • Click Export button in the resource main page:
  • Input all the required details in Export database wizard and click OK button to submit the request. 

Once the request is completed successfully, database backup file will be created in Azure Blog Storage container you specified. 

Till now, I've manually backed more than 10 times:

These backup files can be used to restore my database or create new SQL databases on Azure.

warning These backup files cannot be used to restore to a on-premise instance. 

Automated point-in-time and long term retention backups

All Azure SQL Database resources support automated long term backups except for Azure SQL database managed instance.

Thus there is no need to backup manually.

To enable this, follow these steps:

  • Navigate to SQL server resource page of your Azure SQL Database.
  • Click Manage backups link under Settings:
  • Select the database you'd like to configure backups and then click Configure retention link:

  • Configure backup policies based on your need:

  • Click Apply button to apply the changes. 

Now, I don't need to do manual backups anymore and I can always restore my database through these automated backups. All the available backups can be viewed on the same 'Configure retention' page.


To restore the database, you can navigate to SQL Database resource page and then click Restore link to restore from point int time or LTR backups.


Custom backup strategy

If you prefer to backup Azure SQL Database using your own strategies, you can do this use Azure CLI and Azure Functions to schedule your backup scripts.

There is one good example created by Stefano Demiliani: Creating an Azure SQL Database backup via Powershell.

All the actions I mentioned in the previous sections can also be automated using APIs provided by Azure SDK.

Official references

Refer to these official documentations for more information:

info Last modified by Raymond at 4 months ago copyright This page is subject to Site terms.

More from Kontext

Entity Framework Core Code-First - Generate Covering Index with Columns Included

local_offer entity-framework local_offer asp.net core local_offer Azure local_offer C#

visibility 40
thumb_up 0
access_time 2 months ago

In SQL Server or some other relational databases, it is a very common requirement to create covering index with columns included in index pages beside the index key columns. With Entity Framework Core, you can also easily generate covering indexes using purely C# code. Scenario For ...

open_in_new ASP.NET Core

local_offer Azure local_offer kontext

visibility 9
thumb_up 0
access_time 4 months ago

In the past few months, Kontext's DNS server was not very stable as it went offline several times accidentally. When the DNS server is down, our domain (kontext.tech) cannot be parsed successfully to the IP address of Azure App Service (the service that hosts this website); thus it became unreach...

open_in_new Kontext Information

Modern Web Application - Azure Blob Storage for Uploaded Files

local_offer Azure local_offer asp.net core local_offer dotnetcore

visibility 504
thumb_up 0
access_time 4 months ago

With cloud platforms like Azure, we can totally separate user content storage from web application storage to decouple components from each other and to make the application easy to scale and deploy. This article provides detailed information with code snippets about how to use Azure server-less product Blob Storage and App Service to enable horizontally scalable web application for users to upload files (BLOBs).

open_in_new Azure

local_offer Java local_offer python local_offer SQL Server

visibility 1634
thumb_up 0
access_time 4 months ago

In my previous article  Connect to SQL Server via JayDeBeApi in Python , I showed examples of u...

open_in_new Python Programming

comment Comments (0)

comment Add comment

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

No comments yet.

Kontext Column

Created for everyone to publish data, programming and cloud related articles. Follow three steps to create your columns.


Learn more arrow_forward