Hi
I have a bitbucket data-center server deployed on a Debian server.
I've been asked to deploy bitbucket data-center on our cluster. I did it using the helm chart provided by Atlassian.
Now I want to migrate my projects and repositories from my old instance to the new one (same data-center version 8.16.2 with a postgres base behind it).
To do this, I'd like to use the API described in the documentation
No problem with export api it works well.
curl --location 'https://git.xxx.xxx.xx/bitbucket/rest/api/1.0/migration/exports' --header 'Content-Type: application/json' --header 'Authorization: Basic XXXXXXXXXXXXXXXXX' --data '{"repositoriesRequest":{"includes":[{"projectKey":"MDCONF","slug":"*"}]}}'
The file is generated. I copied it to my volume using "kubectl cp". The file size is 100 MB
My problem is to import the file in bitbucket.
Looking at documentation, I use the rest api/1.0/migration/imports but with failure 400 Bad Request
curl --location 'https://git.xxx.xxx.xx/bitbucket/rest/api/1.0/migration/imports' --header 'Content-Type: application/json' --header 'Authorization: Basic XXXXXXXXXXXXXXXXX' --data '{"archivePath":"Bitbucket_export_2.tar"}'
{"errors": [{"context": null,"message": "Invalid import request, the archive 'Bitbucket_export_2.tar' could not be found","exceptionName": "com.atlassian.bitbucket.validation.ArgumentValidationException"}]}
curl --location 'https://git.xxx.xxx.xx/bitbucket/rest/api/1.0/migration/imports' --header 'Content-Type: application/json' --header 'Authorization: Basic XXXXXXXXXXXXXXXXX' --data '{"archivePath":"/var/atlassian/application-data/bitbucket/shared/data/migration/import/Bitbucket_export_2.tar"}'
{"errors": [{"context": null,"message": "Import archive location is invalid.","exceptionName": "com.atlassian.bitbucket.validation.ArgumentValidationException"}]}
BITBUCKET_HOME=/var/atlassian/application-data/bitbucket
When you export a project/repo, the export tar file is created in <Bitbucket-home>/shared/data/migration/export folder, this tar file needs to be copied to <Bitbucket-home>/shared/data/migration/import folder and after that you would have to run the Import API call
Kb: https://confluence.atlassian.com/bitbucketserver/importing-957497836.html
Hi Neeraj, can you please give us a hint what might be the reason if the export works, but the import from the location you mentioned results in a "You are not permitted to access this resource" response? The credentials used are the same. We're using the Docker container 8.19.1 with an internal database.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.