I have trying to import a project in bitbucket(# v5.16.0)
using http://*.*.*.*.*:7990/rest/api/1.0/migration/imports in two cases as mention below and after running, the HTTP response code is 409 conflicts.
CASE 1: Using postman
{
"archivePath": "Bitbucket_export_56.tar"
}
CASE 2: Using curl command
curl -u fayaz:123456789 -s -n -X POST -H 'Content-type: application/json' -d '{"archivePath":"Bitbucket_export_56.tar"}' http://*.*.*.*.*:7990/rest/api/1.0/migration/imports | jq
GOT A SAME ERROR IN BOTH CASES:
{
"errors": [
{
"context": null,
"message": "Data Center Migration (import) requires a Data Center license.",
"exceptionName": "com.atlassian.stash.internal.migration.InstanceMigrationImportUnavailableException"
}
]
}
Hi Christian,
Please go through this link which I followed to export and import in my local machine.And you will understand what am trying to do.
https://docs.atlassian.com/bitbucket-server/rest/5.15.0/bitbucket-rest.html#idm45622371559680
Thanks,
Jeevan
Hi Jeevan,
The imports feature available via the REST API is only available with a Data Center license, which is why you're getting the error you're seeing.
Cheers,
Christian
Premier Support Engineer
Atlassian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
I have Bitbucket server license for trail version and don't know whether i have Data center lincence.
Please help me to find a way.
Thanks,
Jeevan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jeevan,
By default you will have a non-Data Center license - although you can generate a trial license for Data Center as well via https://my.atlassian.com/
If you're only looking to import repositories the easier way is to do this using the instructions in https://confluence.atlassian.com/bitbucketserver/importing-code-from-an-existing-project-776640909.html
Cheers,
Christian
Premier Support Engineer
Atlassian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
Appreciate for quick response.
Now i have license of Data center ,Does any thing happens if i add this license to bitbucket server http://localhost:7990/admin/license by editing?
Does it works for me?
Thanks,
Jeevan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jeevan,
Let's take a step back - what are you actually trying to achieve? The REST API method you're trying to use is used for the Data Center migration process described at https://confluence.atlassian.com/bitbucketserver/data-center-migration-957497834.html, but if you just have a trial license I think you're just trying to import an existing git repository into Bitbucket Server - is that correct?
In that case there's no REST API method for that, instead you can use the GUI or git directly to import the repository as described in https://confluence.atlassian.com/bitbucketserver/importing-code-from-an-existing-project-776640909.html?_ga=2.210310231.313916934.1543234948-662170697.1532608480
Cheers,
Christian
Premier Support Engineer
Atlassian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Actually am trying to export and import per project backup in bitbucket server.when I search, I found this below link..
https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html
which is Bit bucket server Rest API. I have done the export part but when am trying to import got this error
{
"errors": [
{
"context": null,
"message": "Data Center Migration (import) requires a Data Center license.",
"exceptionName": "com.atlassian.stash.internal.migration.InstanceMigrationImportUnavailableException"
}
]
}
Now show me the way to import using rest API in bit bucket server
Thanks,
Jeevan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jeevan,
I must admit I'm puzzled - where and how exactly did you generate what you call the "per project backup" that you're trying to import?
Cheers,
Christian
Premier Support Engineer
Atlassian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christian,
Please go through this link which I followed to export and import in my local machine.And you will understand what am trying to do.
https://docs.atlassian.com/bitbucket-server/rest/5.15.0/bitbucket-rest.html#idm45622371559680
Thanks,
Jeevan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.