The current Windows Azure SQL Database (formerly “SQL Azure”) service level agreement specifically has an exception for factors outside Microsoft’s reasonable control, i.e. Force Majeure. Force Majeure is an extraordinary event or circumstance beyond the control of the parties, such as a war, strike, riot, crime, or a natural event (e.g., flooding, earthquake, volcanic eruption). The consequence is that the data center is damaged in such a way that databases can’t be recovered from the replicas or the on-site backups. Currently, Windows Azure SQL Database doesn’t keep any off site backups; this is the customer’s responsibility. The SQL Database team has published an excellent guide for Maintaining Business Continuity on SQL Database, and I encourage customers to read this guide.
This blog post will show you how to easily create an offsite backup of your Windows Azure SQL database that is hosted in a Windows Azure data center in another region. This type of back up is easily done using Windows Azure Portal to export a Data-Tier Application logical backup file (BACPAC) to a Windows Azure Storage location in another data center.
A BACPAC is a logical backup and does not guarantee transactional consistency. That means if users are writing to your database while the export is taking place, the resulting BACPAC will contain inconsistent data--for example broken foreign key references. Therefore, you need to first create a copy of your database then run the export from the copy.
Here is how to create a copy of your database:
CREATE DATABASE <destination_database_name> AS COPY OF <source_database_name>
SELECT * FROM sys.dm_database_copies;
SELECT state_desc, * FROM sys.databases;
For more information see Copying Databases in Windows Azure SQL Database
It might have been sometime since the creation of Windows Azure SQL database or someone else created the database and you might not know where it is located. In order to keep your backup in a separate data center from your database, you need to know where the database is located.
Now that you know where your database is located you can make sure to back up to a different region (i.e. a different data center).
The Windows Azure Portal allows you to create a BACPAC. It will not output the package to your local hard drive, instead it writes to a Windows Azure Blob Storage.
These are the steps for creating a BACPAC from the Windows Azure Portal:
I am going to save that for a later blog post.
With the Window Azure Portal, you can easily create a Data-Tier Application logical backup package (BACPAC) and store it in an offsite Windows Azure Blog Storage account. This will help mitigate data loss from Force Majeure.