Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to migrate Repo's from one BB cloud to another BB cloud



I'm investigating the possiblity to combine two Bitbucket Cloud sites. If my information is correct I can't use the BCMA to migrate BB Cloud to Cloud, what other options do I have? I was not able to clearly find the answer in the community or support pages.



2 answers

0 votes

Hi Tom,

When you say two Bitbucket Cloud sites, do you mean workspaces? If so, it is possible to transfer a repository from one workspace to a different one. All commits and metadata (including PRs) get transferred, except for Deployment variables. In case you are using Pipelines and have Deployment variables in any of these repos, please make a note of them so you can recreate them after transfer.

You can read more details on how to transfer a repository here:

If you transfer a repository, its URL is going to change after the transfer request gets accepted. Users who have a clone of repos you are going to transfer on their machine will need to update the remote URL in each clone. Details are provided in the last section of the page I shared.

Please note that repositories with Git LFS cannot be transferred. In case you want to transfer a repo with Git LFS, please check the workaround provided on the following page:

I'm afraid that metadata for these repos cannot be transferred.

If you have any questions, please feel free to let me know.

Kind regards,

Hi Theodora,


Many thanks for you extensive answer!


Here is my full migration use case, and I hope you can give me some advice:

For my client I'm investigating BB migration options. 

  • 1 department has an operational BB-server, which we would like to migrate to BB-Cloud (using BCMA).
  • Another department has already an operational BB-Cloud.



Ideally I like to combine both to have 1 operational BB-Cloud environment.

My first plan is/was to migrate the BB-server to a clean/empty BB-cloud instance (to not interrupt the existing operational BB-cloud environment). Followed by migrating these repo's in cloud to the existing BB-cloud instance. 

Would this be a smart approach, or do you suggest immediatly to migrate the repo's in server to the existing BB-cloud instance?


Thanks a lot!


Kind Regards,


Hi Tom,

I would recommend migrating the Bitbucket Server instance to the existing Bitbucket Cloud workspace for the following reasons:

  • this will save you the trouble of transferring the Cloud repos from the existing Cloud workspace to a new one
  • in case there are any apps installed in the existing workspace (these can be found at<workspace-id>/workspace/settings/addon-management), you won't have to reconfigure these in a new workspace if you keep the existing one
  • if the existing Cloud workspace has integrations with third-party tools, and you transfer the Cloud repos to a new workspace, you would need to make changes to these integrations as well (so instead of workspace-a-existing they connect to workspace-b-new)


A few more things to note:


1. If you decide to migrate the Bitbucket Server instance to the existing Bitbucket Cloud workspace with the BCMA, and there are conflicts with repo or project names, the BCMA will let you know. It will not allow you to proceed with the migration until these conflicts are resolved.


2. The BCMA can migrate users from Bitbucket Server to the Bitbucket Cloud workspace, but the permissions won't be migrated (this is the case if you migrate both to a new Cloud workspace or to the existing one). You will need to set up the permissions after migration.


3. I assume that the existing Bitbucket Cloud workspace already has some User groups. Each User group in a Cloud workspace has the setting

Automatically assign permissions for new repositories
Repositories added to the system will automatically be assigned this permission.

which can be set to None, Read, Write, or Admin.

This can be found if you open the workspace on Bitbucket website, go to its Settings > select User groups > select a certain user group > select Edit.

If certain user groups (from the existing ones) have this setting set to Read, Write, or Admin, then these user groups will automatically gain the respective access to the newly migrated Server repos (once you migrate with the BCMA). If this is not desirable, you can change this setting to None for all user groups (except perhaps for Admins?)


You can then create new User groups for the users of department 1 and assign them manually to each migrated repo from Repository settings > User and group access.

Be mindful of the setting Automatically assign permissions for new repositories when creating a new User group, if you don't want this user group to automatically gain access to any newly created repos in that workspace.

We also have the following documentations which can help with preparing for the migration:

And also this one, which can be useful for the admins of the Bitbucket Server instance after the migration:

If you have any questions, please feel free to reach out!

Kind regards,

Like Tom Braat likes this

If you don't care about the pull request history, you can use the git "--mirror" switch to copy all content from the source repo and push to the destination.  Check Atlassian's Git doc.

Thanks, and what if I do care about the pull request history, what are my options then?

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events