In my mind there are a couple of ways to move a database across resource groups. They vary from scripting to just using the Azure portal. I am going to use the Azure portal and do the following.
- Export a database in resource group X to a storage account Z.
- Import the file from the storage account Z into a database that is in resource group Y.
It’s just like a “backup and restore” strategy, all with the assumption that you are working within the same subscription ID.
On the source server go the database that you want to move and click export.
So I will be moving twitterdb that is within the AKS_Prod resource group. Once you click export save the file to a storage container. This will be the well known BACPAC file.
I will be importing the file into my target server called cloudmarsh which is located in West US 2 data center within a resource group called bigdata.
Look for the import database option.
Navigate to the container we created earlier on and select it and pick up the BACPAC file.
The import database options will auto-fill as shown below.
Check the import/export history logs for more information which is found under the sql server > settings section.
Looks completed to me.
Let’s connect and check.