Describe my question in as much detail as possible:
What are you seeing, and how does that differ from what you expect to see?
I currently use GitLab.com for my source code management (SCM) and CI/CD pipelines. However, I’d like to have a comprehensive backup strategy to migrate to a self-hosted GitLab instance in the future. Ideally, this backup would require minimal manual effort and include:
Users and their access control levels (ACLs)
Groups and their configurations
Git repositories
Group and repository settings
CI/CD configurations
All other relevant data for a complete migration
Desired Outcome:
I aim to achieve a near-clone of my GitLab.com instance on my self-hosted server, minimizing the need for manual configuration after migration.
Steps to reproduce
Which troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?
I’ve reviewed the GitLab documentation on backups (Back up GitLab | GitLab) and understand the limitations of GitLab.com’s built-in export functionalities.
Configuration
Add the CI/CD configuration from .gitlab-ci.yml and other configuration if relevant (e.g. docker-compose.yml). Alternatively, create a public GitLab.com example project that provides all necessary files to reproduce the question.
N/A (Not applicable in this case)
Versions
Please select whether options apply, and add the version information.
Self-managed
GitLab.com SaaS
Dedicated
Self-hosted Runners
Version
Latest
Questions:
Is there a method to achieve a comprehensive backup of my GitLab.com data that includes user ACLs, group/repo settings, and CI/CD configurations, suitable for migration to a self-hosted instance?
If a full backup isn’t possible, what alternative strategies could I employ to minimize manual configuration during migration (e.g., partial backups, scripting)?
Additional Information:
I understand the security concerns associated with transferring potentially sensitive data (user ACLs) from GitLab.com. I’m open to exploring secure solutions that balance data completeness with security best practices.
This question has been asked before on the forums, someone suggested a tool to do part of it:
You can maybe also use the Gitlab API and see what options from that would help you out:
So you are probably going to have to script it to get as much of what you want as possible. Otherwise, you probably would be easier just migrating away from gitlab.com SaaS product and running your own server since you can then use the gitlab-backup command to backup your server and then you would have everything. That cannot be done on gitlab.com.
Unfortunately, we are currently going the opposite way.
We move from our own gitlab server (because we don’t want to take care for the many updates) to gitlab SaaS. And now the question about the backup strategy arose.
Yep understand the move from your own server, I wish you luck with that. It’s unlikely you are going to be able to backup everything like you want to. Especially since you will have no way of restoring it back easily. It will be a lot of scripting using the API.
Far easier is updating your own server regularly. Updates only become a problem when you don’t do it on a regular basis. Been running multiple Gitlab servers since 2017/2018 updating it regularly by checking once a week.