Quick tips for backing up and restoring Azure SQL databases:
-
Improve the speed of imports and exports by temporally increasing the DTU size of your Azure SQL database.
-
Here are some comparisons from importing a 4.3 GB database (BacPac size 400MB)
- 100 DTU - 1 hour 18 mins
- 200 DTU - 43 mins
- 400 DTU - 25 mins
- 800 DTU - 24 mins
-
-
You can monitor the DTU percentage the import is using by looking at the Overview blade of the SQL database in the portal. If it is taking too long and the DTU usage is hitting 100% you may want to consider temporally increasing the database DTU allocation.
-
Export a database in Azure in my experience is quicker than importing (restoring) a database.
-
You can view the progress of the export or import by going to the SQL server (not the actual SQL database) and then clicking on the Import/Export history blade.
-
When you export a database from Azure it creates a BacPac file to your storage account, which you can use to import the database. If you need to move this file to another subscription, I recommend using the Microsoft Azure Storage Explorer which allows you to copy files between subscriptions. It took less than 10 seconds to copy a 400 MB from a UK to a US based data centre.
-
The last five percent or so of the import always seems to take the longest. Or maybe that’s just me.