Azure SQL Database Automated Backup Strategy

access_time 10 months ago visibility673 comment 0

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 10 months ago copyright This page is subject to Site terms.
Like this article?
Share on

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

Follow Kontext

Get our latest updates on LinkedIn or Twitter.

Want to publish your article on Kontext?

Learn more

More from Kontext

visibility 4453
thumb_up 0
access_time 6 years ago

For Teradata developers, if you have no SQL Server installed, please go to the following link to download the SQL Server 2014 Expression Edition. http://www.microsoft.com/en-us/server-cloud/Products/sql-server-editions/sql-server-express.aspx It is easy to get started and free to use.

Run .NET 5 on Azure App Services
visibility 145
thumb_up 0
access_time 3 months ago

.NET 5 RC2 was released on 2020-10-13. On Azure, you can only select .NET Core 3.1 or 2.1 LTS versions as runtime stack when creating web app as the following screenshot shows.   This will stay as is till .NET 5 official release. However, you can use extensions to run your .NET 5 ...

visibility 26606
thumb_up 4
access_time 2 years ago

Spark is an analytics engine for big data processing. There are various ways to connect to a database in Spark. This page summarizes some of common approaches to connect to SQL Server using Python as programming language. For each method, both Windows Authentication and SQL Server ...