We are excited to announce that Dolt now supports Azure blob storage as a remote repository! This means you can now push, pull, and clone your Dolt repositories directly to and from Azure. In this blog post, we’ll walk you through how to set up an Azure backed remote repository and how to use it with Dolt.
Setting Up an Azure Remote Repository#
To get started, you’ll need to have an Azure account setup and the Azure CLI installed.
Creating an Azure Blob Storage Container#
Once you have your account setup, and the cli installed, you can create a blob storage container to hold your Dolt repositories. We’ll do this by first creating a resource group, storage account, and finally the storage container.
Create a resource group:
az group create --name myResourceGroup --location eastus
Create a storage account:
az storage account create --name mystorageaccount --resource-group myResourceGroup --location eastus
Create a blob storage container:
az storage container create --name mycontainer --account-name mystorageaccount
Creating a Dolt Remote Using our Azure Blob Storage Container#
Adding a Dolt remote is as simple as running dolt remote add <name> <url>. In the case of a remote backed by Azure blob
storage, the url will be in the format az://<storage-account-name>.blob.core.windows.net/<container-name>/<path>. So for
our example, if we had a Dolt database containing employee data and we wanted to push it to our
newly created blob storage container, we could add a remote like so:
dolt remote add azure-remote az://mystorageaccount.blob.core.windows.net/mycontainer/employee-data
Once we’ve added the remote, we can push to it like any other remote:
dolt push azure-remote main
And then, if someone else with permission to access the blob storage container wanted to clone the repository, they could run:
dolt clone az://mystorageaccount.blob.core.windows.net/mycontainer/employee-data
One Container, Unlimited Databases#
An Azure blob storage container can hold an unlimited number of Dolt databases, so you can use the same container for all of your remotes if you choose. Make sure to use a unique path for each remote you add that points to the same container to avoid conflicts between your databases.
Conclusion#
We are thrilled to bring Azure blob storage support to Dolt and look forward to expanding our Azure support in the future. If you have any questions or feedback, please don’t hesitate to reach out to us on Discord.