We have two instances of Bitbucket Server. I have few projects with hundreds of repos in one instance and need to move them all to the other instance of Bitbucket Server. Is there a plugin or a way to do this that isn't manual.
Thanks!
Hi Ryan,
At the moment, it is not possible to migrate all details of an existing repository across instances. This is the existing feature request for that:
- https://jira.atlassian.com/browse/BSERV-4586
In your case, you could still move the full history of the Git repositories by creating the projects and repositories on the target instance and then importing the repositories.
The creation of projects and repositories can be automated using the REST API endpoints (https://docs.atlassian.com/bitbucket-server/rest/5.8.0/bitbucket-rest.html).
The Git history can then be pushed to the newly created repository by following the instructions on the user interface for an empty repository. These can also be automated by using the details of the new repositories and having a full set of the repositories available locally. A backup could also be used for this purpose, the Restore a deleted repository for Bitbucket Server page also covers how to identify the repository details from a backup.
Cheers,
Caterina - Atlassian Support
Hi Ryan,
Does the second instance already contains any repositories?
If not, we could restore a backup to the second instance. However, this will remove all the existing all existing repositories so it is only an option if the target instance is empty.
Cheers,
Caterina - Atlassian Support
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.