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.
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"
}
]
}
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.