cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to move a metastore to a new Storage Account in unity catalog?

Arnold_Souza
New Contributor III

Hello, 

I would like to change the Metastore location in Databricks Account Console. I have one metastore created that is in an undesired container/storage account. I could see that it's not possible to edit a metastore that is already created. I could also see that it's not possible to create a second metastore in the same Azure region. Well, does anyone know how to move this metastore to another storage account? I was wondering, if I simply move the container to a new Account via Az Copy and then delete and recreate the metatore in the new location, will it work? 

1.JPG

6 REPLIES 6

Kaniz_Fatma
Community Manager
Community Manager

Hi @Arnold_Souza , 

 

To move a metastore to a new Storage Account in Unity Catalog, you need to follow the below steps:
 
1. Create a new storage account for Unity Catalog. This must be a Premium performance ADLS Gen2 account in the same region as your Databricks workspaces.
2. Create a container in the new storage account and note the ADLSv2 URI.
3. Create a service principal and generate a client secret for the service principal.
4. Grant the new service principal the Storage blob data contributor role in the storage account.
5. Log in to the account console and click Data.
6. Click the metastore name and then click Edit.
7. Update the ADLS Gen 2 path with the new storage container URI.
8. Click Save to update the metastore with the new storage account.
 
 
Additional Resources
 

Arnold_Souza
New Contributor III

Hello @Kaniz_Fatma ,

Thank you for the reply. 

As you can see in the image below, there is no step 6. I mean, there is no button to edit the storage path and include a new one. 

Because of that, I was wondering: what if I copy the current container to the new Storage account I have, then I delete the current Metastore and recreated it with the new Storage Account address already populated with the contents of the old metastore. Will it work? I would bet the data will be there (tables) but I do not know about the governance side (Table access controls)

Capture.JPG

mohnishbhagde
New Contributor II

Did you get a solution for this? 

Joaquim
New Contributor II

I would like to bump this thread as I am in a similar predicament. New to Databricks here and I have a dev and prod environment in one Databricks account. I created the dev metastore (with "dev" in its name) in the same region where my production metastore would also reside. Dev & prod live in the same region. So my understanding here (because I can't have the metastores in the same region) is that I would have to have dev and prod in separate regions. So I'm assuming that I'm in the same boat where I would need to move my current dev metastore bucket to a different region and am wondering if this would be possible.

ac0
New Contributor III

Bumping this thread as well.

Bakkie
New Contributor

Facing the same challenge. Any update on this?

The ADLS Gen 2 path seems rather definitive when setting up a metastore:Screenshot 2024-07-17 140546.png

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!