We would like to migrate source code and data from Bitbucket cloud to our own Bitbucket Server version. How can we do? Please advise

We would like to migrate source code and data from Bitbucket cloud to our own Bitbucket Server version. How can we do? Please advise

3 answers

1 vote
Jeff Thomas Atlassian Team Sep 16, 2016

Bitbucket Server 4.9 introduced a feature to import repositories from Bitbucket Cloud and other sources. Please see Import code using the web interface for documentation surrounding that feature. There are also instructions on that page which can help guide you to import the Git repositories on versions before 4.9. 

Pull requests are not currently imported with either process.

Hi Jeff,

Thanks for your answer. Let me try.

 

 

 

 

Hi Jeff,

I have more question. Can we also import Project from Bitbucket cloud to Bitbucket server? Actually we would like to migrate all data in cloud to Bitbucket server. Please advise.

Thank you.

Jeff Thomas Atlassian Team Sep 20, 2016

The importer allows you to select individual repositories, so it's possible to import all repositories from a project if you'd like. The only data that can be migrated is the repository data. Any issues, comments, or pull request data are not currently able to be migrated.

Hi Jeff,

Now we have 1 team on Bitbucket cloud we need to migrate All project and Source code to Bitbucket server. Can we do that? Because now we need to create project by manual and import repository. We have a lot project and repository. Can we do like we import all these thing from Github to Bitbucket Cloud? It is just login and Bitbucket can download all these thing from Github. Can we do like that?

 

Anyway importer doesn't work for me I got ERROR.

https://jira.atlassian.com/browse/BSERV-9175?utm_source=STP&utm_medium=logScan

Importing a repository fails due to process timed out

2016-09-23 17:58:56,468 ERROR [pool-8-thread-7] Rongchai @Y5KGMXx1018x4310x0 1k873lo 192.168.40.41 "POST /rest/importer/latest/projects/TEST/import/repos HTTP/1.1" c.a.b.i.i.repository.RefSyncTask Failed to import repository: TEST/tum[8]
com.atlassian.bitbucket.ServerException: An error occurred while executing an external process: process timed out
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.evaluateThrowable(GitCommandExitHandler.java:113) ~[na:na]
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:201) ~[na:na]
at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:31) ~[bitbucket-spi-4.9.1.jar:na]
at com.atlassian.stash.internal.scm.git.command.fetch.FetchExitHandler.onExit(FetchExitHandler.java:39) ~[na:na]
at com.atlassian.bitbucket.scm.BaseCommand.callExitHandler(BaseCommand.java:146) ~[bitbucket-spi-4.9.1.jar:na]
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:272) ~[bitbucket-spi-4.9.1.jar:na]
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:241) ~[bitbucket-spi-4.9.1.jar:na]
at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:83) ~[bitbucket-spi-4.9.1.jar:na]
at com.atlassian.stash.internal.scm.git.command.SimpleGitCommand.configureAndCall(SimpleGitCommand.java:84) ~[na:na]
at com.atlassian.stash.internal.scm.git.command.fetch.MirrorSynchronizeCommand.call(MirrorSynchronizeCommand.java:88) ~[na:na]
at com.atlassian.stash.internal.scm.git.command.fetch.MirrorSynchronizeCommand.call(MirrorSynchronizeCommand.java:27) ~[na:na]
at com.atlassian.bitbucket.internal.importer.repository.RefSyncTask.syncRefs(RefSyncTask.java:114) [bitbucket-importer-4.9.1.jar:na]
at com.atlassian.bitbucket.internal.importer.repository.RefSyncTask.lambda$call$0(RefSyncTask.java:74) [bitbucket-importer-4.9.1.jar:na]
at com.atlassian.stash.internal.user.DefaultEscalatedSecurityContext.call(DefaultEscalatedSecurityContext.java:51) ~[bitbucket-service-impl-4.9.1.jar:na]
at com.atlassian.bitbucket.internal.importer.repository.RefSyncTask.call(RefSyncTask.java:73) [bitbucket-importer-4.9.1.jar:na]
at com.atlassian.bitbucket.internal.importer.repository.RefSyncTask.call(RefSyncTask.java:33) [bitbucket-importer-4.9.1.jar:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
... 1 frame trimmed
Caused by: com.atlassian.utils.process.ProcessTimeoutException: process timed out
at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:677) ~[atlassian-processutils-1.7.6.jar:na]
at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:161) ~[atlassian-processutils-1.7.6.jar:na]
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:239) ~[bitbucket-spi-4.9.1.jar:na]
... 13 common frames omitted
2016-09-23 17:58:56,562 DEBUG [pool-8-thread-7] Rongchai @Y5KGMXx1018x4310x0 1k873lo 192.168.40.41 "POST /rest/importer/latest/projects/TEST/import/repos HTTP/1.1" c.a.s.i.p.DefaultPullRequestService Deleted 0 pull request(s) TO repository 8

 

Do you have any suggestion about this? We installed Bitbucket server version 4.9.1 on Windows Server 2012 R2 and MS SQL 2012 DB.

 

Thanks for you help

Hi Jeff,

I have more question. Can we also import Project from Bitbucket cloud to Bitbucket server? Actually we would like to migrate all data in cloud to Bitbucket server. Please advise.

Thank you.

Hi Jeff,

Now we have 1 team on Bitbucket cloud we need to migrate All project and Source code to Bitbucket server. Can we do that? Because now we need to create project by manual and import repository. We have a lot project and repository. Can we do like we import all these thing from Github to Bitbucket Cloud? It is just login and Bitbucket can download all these thing from Github. Can we do like that?

 

Anyway importer doesn't work for me I got ERROR.

https://jira.atlassian.com/browse/BSERV-9175?utm_source=STP&utm_medium=logScan

Importing a repository fails due to process timed out

2016-09-23 17:58:56,468 ERROR [pool-8-thread-7] Rongchai @Y5KGMXx1018x4310x0 1k873lo 192.168.40.41 "POST /rest/importer/latest/projects/TEST/import/repos HTTP/1.1" c.a.b.i.i.repository.RefSyncTask Failed to import repository: TEST/tum[8]
com.atlassian.bitbucket.ServerException: An error occurred while executing an external process: process timed out
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.evaluateThrowable(GitCommandExitHandler.java:113) ~[na:na]
at com.atlassian.bitbucket.scm.git.command.GitCommandExitHandler.onError(GitCommandExitHandler.java:201) ~[na:na]
at com.atlassian.bitbucket.scm.DefaultCommandExitHandler.onExit(DefaultCommandExitHandler.java:31) ~[bitbucket-spi-4.9.1.jar:na]
at com.atlassian.stash.internal.scm.git.command.fetch.FetchExitHandler.onExit(FetchExitHandler.java:39) ~[na:na]
at com.atlassian.bitbucket.scm.BaseCommand.callExitHandler(BaseCommand.java:146) ~[bitbucket-spi-4.9.1.jar:na]
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.internalGet(BaseCommand.java:272) ~[bitbucket-spi-4.9.1.jar:na]
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:241) ~[bitbucket-spi-4.9.1.jar:na]
at com.atlassian.bitbucket.scm.BaseCommand.call(BaseCommand.java:83) ~[bitbucket-spi-4.9.1.jar:na]
at com.atlassian.stash.internal.scm.git.command.SimpleGitCommand.configureAndCall(SimpleGitCommand.java:84) ~[na:na]
at com.atlassian.stash.internal.scm.git.command.fetch.MirrorSynchronizeCommand.call(MirrorSynchronizeCommand.java:88) ~[na:na]
at com.atlassian.stash.internal.scm.git.command.fetch.MirrorSynchronizeCommand.call(MirrorSynchronizeCommand.java:27) ~[na:na]
at com.atlassian.bitbucket.internal.importer.repository.RefSyncTask.syncRefs(RefSyncTask.java:114) [bitbucket-importer-4.9.1.jar:na]
at com.atlassian.bitbucket.internal.importer.repository.RefSyncTask.lambda$call$0(RefSyncTask.java:74) [bitbucket-importer-4.9.1.jar:na]
at com.atlassian.stash.internal.user.DefaultEscalatedSecurityContext.call(DefaultEscalatedSecurityContext.java:51) ~[bitbucket-service-impl-4.9.1.jar:na]
at com.atlassian.bitbucket.internal.importer.repository.RefSyncTask.call(RefSyncTask.java:73) [bitbucket-importer-4.9.1.jar:na]
at com.atlassian.bitbucket.internal.importer.repository.RefSyncTask.call(RefSyncTask.java:33) [bitbucket-importer-4.9.1.jar:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_102]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_102]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
... 1 frame trimmed
Caused by: com.atlassian.utils.process.ProcessTimeoutException: process timed out
at com.atlassian.utils.process.ExternalProcessImpl.wrapUpProcess(ExternalProcessImpl.java:677) ~[atlassian-processutils-1.7.6.jar:na]
at com.atlassian.utils.process.ExternalProcessImpl.finish(ExternalProcessImpl.java:161) ~[atlassian-processutils-1.7.6.jar:na]
at com.atlassian.bitbucket.scm.BaseCommand$CommandFuture.get(BaseCommand.java:239) ~[bitbucket-spi-4.9.1.jar:na]
... 13 common frames omitted
2016-09-23 17:58:56,562 DEBUG [pool-8-thread-7] Rongchai @Y5KGMXx1018x4310x0 1k873lo 192.168.40.41 "POST /rest/importer/latest/projects/TEST/import/repos HTTP/1.1" c.a.s.i.p.DefaultPullRequestService Deleted 0 pull request(s) TO repository 8

 

Do you have any suggestion about this? We installed Bitbucket server version 4.9.1 on Windows Server 2012 R2 and MS SQL 2012 DB.

 

Thanks for you help

 

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

709 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot