Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

What is the best way of moving projects & repositories from multiple server instances to data center

Matt July 17, 2023

I'm trying to figure out how to migrate multiple servers running bitbucket server with projects and repositories onto a new bitbucket data center environment.  Cloud is not an option for me and as most solutions seem to show cloud migration procedures I am a little stuck.

I thought the best way was to use the REST API method

curl -u <adminusername> -s -n -X POST -H 'Content-type: application/json' -d '{"repositoriesRequest":{"includes":[{"projectKey":"*","slug":"*"}]}}' http://localhost:7990/rest/api/1.0/migration/exports | jq .

but I cannot seem to get it to do anything.  I get no job started and it doesn't return a job id, just goes back to the prompt with no errors.

1 answer

0 votes
Matt July 17, 2023

As a follow up, I'm running bitbucket in a docker container to test it.

The command I am running is

curl -u myusername:mypassword -s -n -X POST -H 'Content-type: application/json' -d '{"repositoriesRequest":{"includes":[{"projectKey":"*","slug":"*"}]}}' http://dockercontainerhostname:7990/rest/api/1.0/migration/exports | jq .

It returns

"errors": [
"context": null,
"message": "You are not permitted to access this resource",
"exceptionName": "com.atlassian.bitbucket.AuthorisationException"

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events