It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I migrate team repositories from Bitbucket to Bitbucket Server?

We just purchased Bitbucket Server and we've been using Bitbucket.org for over a year now. Is there an easy way to take all of our repositories (88 of them) from Bitbucket.org and add them into Bitbucket Server in one shot? I realize the devs will have to add a new remote to their git repos.

5 answers

1 accepted

You could try our paid Add-on ScriptRunner for Bitbucket Server which offers mirroring functionality from Bitbucket Cloud to Server. It could help you with your migration.

 

Hi Alan,

I'm afraid there isn't an easy one shot way of doing this, but I'd like to link you to some instructions about the process, which you may be able to automatize somehow, if you can iterate over your list of repositories.

First document I'd like to refer you to is https://confluence.atlassian.com/display/BitbucketServer/Importing+code+from+an+existing+project, specifically the section Import an existing Git project into Bitbucket Server. This explains the steps, with sample commands, to be run to import individually your repositories from Bitbucket Cloud to Bitbucket Server.

Steps 2 and 3 are the ones in which you have to go through the manual process of creating a repository in Bitbucket Server, but you may use the POST method of the REST API function /rest/api/1.0/projects/{projectKey}/repos https://developer.atlassian.com/static/rest/bitbucket-server/4.0.1/bitbucket-rest.html#idp1862320 to create a repository.

Regards,

Gustavo Refosco

@Alan Juden how much time did it take you to complete the migration, could you share your thoughts.

@DNFCS Sales - we changed the way that our repositories were setup. Instead of having 88 different repositories, we made a single repository that had all of the projects in there. So we pretty much just started over on it. We still have Bitbucket in case we need to look at revision history of a particular file...but that way seemed the easiest for our move. Sorry that I didn't respond until now, I just got back from vacation.

Alan

Hi @Alan Juden

This migration functionality is not native to Bitbucket Server. 

If you have a handful of repositories in Bitbucket Cloud, then you can follow the git commands in Importing code from an existing project - Import an existing Git Project into Stash to import your code one repository at a time.

If you have lots of repositories, or need to restructure as part of the migration then I would recommend using a plugin for the migration – the need to restructure is like since Bitbucket Cloud does not have the concept of a Project and in git one generally has lots of repos.  You will require additional planning and possibly several trys before you get the structure you want.

Migrating large enterprises to Bitbucket Server (previously Stash) is something that Black Diamond Software can assist you with.  We have both a plugin that automates this process and can guide you on the planning and transition.  If you'd like assistance please contact us sales@bds.com. 

Note, just noticed the new Bitbucket Server links from @Gustavo Refosco ... the content is the same in the old Stash (which is what I listed) but with new Bitbucket Server product you should those links instead... Or, as suggested, pursue an automation option.

Hi there @Alan Juden!

Solano Services offers migration of customer repositories from hosted Atlassian Cloud (bitbucket.org) to or from Atlassian Bitbucket Server running in customer’s choice of environment. This also includes: 

  • Migration of git repositories with branches and tags.
  • Migration of repository metadata to include: SSH public keys, pull requests (PRs), and PR metadata.

Some of the platforms we support include AWS, Google Cloud Platform, Azure, Rackspace, OpenStack, VMware and more. We are an AWS Advanced Technology Partner with the DevOps Competency designation, as well as members of the Google Cloud Platform Partner Program. Our expertise derives from successfully operating our flagship product, Solano CI, across major cloud providers. 

Check out this link for more information: https://www.solanolabs.com/products/services

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Atlassian supported Jenkins integration for Bitbucket Server

We’ve been building a plugin to integrate Bitbucket Server and Jenkins CI, and I’m excited to announce that our alpha is ready to download and install. It lets you seamlessly configure a Jenkins job ...

1,087 views 3 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you