Move all Repos from self hosted gitlab to github or bitbucket or gitlab cloud

I have a self-hosted Gitlab server, which I used to use to manage projects of my team for years. But I want to stop paying for a server and move all our projects to one of the cloud services which offers free private repos.

I want to move the repos from the whole server not the users to keep it as a private archive for future. Could someone help me out or point me in the right direction.

Hi,

depends on what you want to migrate. If it is just the Git repository on its own, ensure that you have cloned it fresh and then change the origin in the .git/config file to the new repository remote destination.

If you need more migration data, e.g. releases, issues, etc. you might want to look for existing GitLab-to-GitLab migration docs, or use REST APIs with self-written scripts.

https://docs.gitlab.com/ee/user/project/settings/import_export.html

Cheers,
Michael

1 Like

Thanks for jumping in to help, @dnsmichi!

@lonecoder, Welcome to our forum! Please let us know if @dnsmichiā€™s reply gets you closer to what you need. :blush:

1 Like

@dnsmichi yes, the aim is to just copy the repository (with all its branches), is there anyway to do all of them together. We got like 235 Repos, hard to do them all one by one.

Iā€™d write a small script which fetches the projects list from the REST API, clones them, creates them via API on the new server, and pushes them.

1 Like