-
az-bacpac-blob-mssql-importer
This Docker container is designed to automatically download the latest database backup in a `bacpac` format from an Azure Blob Storage container and import it into the included local, dockerized MSSQL Server instance.
-
Scout Monitoring
Free Django app performance insights with Scout Monitoring. Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.
This article assumes that you have already set up an automation to back up your production database to Azure Blob Storage. If you have not done this, you can follow the instructions in this article: Automating Nightly Database Backups to Azure Blob Storage. The script in the article is reaching end of life, and an updated version can be found here.
The code for this solution is available on GitHub. This docker container is also available on Docker Hub.
The Azure CLI lets us write queries to filter the results of the az storage blob list command. The queries are written in JMESPath, which is a query language for JSON. In this case, we are filtering the results to only include blobs that end with the .bacpac extension and then selecting the first one as ordered by the lastModified property. If there are no blobs found, the script exits with a failure code. If we find a blob, we download it to the local path specified by the localPath variable.
Related posts
-
Shellgpt: Chat with LLM in your terminal, be it shell generator, story teller
-
Omost: A project to convert LLM's coding capability to image generation
-
Take control! Run ChatGPT and Github Copilot yourself!
-
The DevRel Digest May 2024: Documentation and the Developer Journey
-
Why your Linux kernel bug report might be fruitless