How to do a complete backup of gitlab.com to a 'local' filesystem?

Problem to solve

We are moving from a legacy CE gitlab server to gitlab-com and want a complete backup of all data in gitlab-com to a ‘local’ (target for the backups maybe buckets as well) storage, because gitlab-com is doing a restore only for old longterm customers or for their own emergency cases.

So, if we need to restore some of our stuff to a previous state, we fall short, if we don’t have our own backups.

We don’t want to use a CE instance any more, because of the necessary work to keep it up to date. So, setting up a mirror or some kind of ‘warm standby’ would be counterintuitive.

I have currently no clue, what would be the best way, because the online documentation points mostly to CE-backups and not clearly states: “This is the way you should do your backups of gitlab-com projects!” - The CE-backups will not work for us as a customer, so we can’t use those.

Doing an export of all the projects we have, would be a very tedious task, if we would need to do it by hand in the WebGUI. - So, it would be nice, to have some kind of tool, that generates a list of all our projects on gitlab.com and do an automatic export to an external (cloud) filesystem, like an s3 bucket or ing Google cloud. - My assumption is, that an export to Google could be faster, because gitlab.com seems to use that, too.

But even then, as I understand it currently, not all information would be included in the export files. We would like to have everything from our projects for a proper restore.

Would it make more sense, to clone each project and subproject to some filesystem, somewhere? - Automatic cloning also assumed.

Does someone have already such kind of tool? - Can it be done with the rake tools? I have to admit, that I didn’t had a closer look into that, yet. If I understand those tools corrrectly, I can’t run the rake-tools on the gitlab-com servers. - So, the won’t work for me, too.

Have I overlooked something?
Any recommendation is very much appreciated!

Steps to reproduce

Search the gitlab-com FAQs for doing an automated backup of your own data on gitlab.com, preferrably to some kind of filesystem or object storage, like s3 buckets.

You’ll end up with backup solutions for the CE installations and claims about what gitlab-com is doing to backup the files on their systems.
And the hint to export projects, in case you need them. But only manually.

And then check the support statement, what restore possibilties you have as a customer, in case you accidentally lost/garbled your own data. → No chance. No way. Nada. Nothing. Njet. - If you haven’t done your own backup, you loose.

Configuration

Current gitlab-com. That’s all.

Versions

Please add an x whether options apply, and add the version information.

  • [ x ] GitLab-com SaaS, current version, as of Oct.,24th, 2024

Versions

  • GitLab: current gitlab-com

Helpful resources

Tried everything, but it took me a long time and maybe I missed something.

Remarks

The text I wanted to send originally, was permanently bounced, because it includes too many (more than 10) URLs. - To be honest, I think I didn’t use any one URL in this text. I only used gitlab dot com quite often. I assume, that this mention leads your tool to believe that I used URLs, but that is not the case. It’s just a a domain name, without anything attached to it.
So I ended up replacing all dots in gitlab dot com with dashes. Hope this works.

1 Like

Hey Burt62.
Have you found any solution?

Hi Boris,
Unfortunately not really. - It looks like one has to invent some individual backup solution. - Which may of course depend on your own needs.
Based on many “clone” of repos or exports.
I personally would prefer cloning.

BR,
Burt62

i have tested open souce backup tool gickup. ofc no metadata and users but for source code works well. supports local or gitea or s3 and others

1 Like

Thank you very much for pointing me into the direction!
I’ll check this out. At last, it is better than nothing.