Repository source backups and recovery on gitlab.com SaaS premium

Problem to solve

Accidental deletion of branches or repositories from a Gitlab, and (accidental) force pushes deleting part of the history, or pushing an entirely different repository, is always a risk (I have already seen instances of all of these in my own professional context), even when rights have been properly distributed.

I’ve been looking to see if there is a backup and recovery strategy for repository source content in the SaaS service itself for a while. There seems to be some backing up going on, but as far as I can see, only for disaster management when there is an error on the Gitlab side.

Currently we are making bare repository mirrors, and I I know there are tools such as gitbackup and gickup, to set this up a little bit easier, especially with cron jobs.

However, (not to be bitter, but just to understand) I can’t imagine every sensible Gitlab user is home-brewing this solution, and this is not offered by Gitlab themselves, especially for the payed options.
Is there any such backup and recovery option that I’m greatly overlooking, or is there otherwise a sound reasoning why this service is not being provided by Gitlab?
And lastly, does anyone know if such a SaaS backup and recovery feature request already exists? I couldn’t find it on the Gitlab issue board.

Granted, there is a (one month) delayed deletion of repositories, with owners being notified by e-mail, which is probably enough to protect from accidental deletions. As far as I know this has however not been implemented for branches, and also won’t guard from force pushes.

Thanks a lot for shedding light on any of the questions!

Versions

  • Self-managed
  • GitLab.com SaaS premium
  • Dedicated

Helpful resources

I know it is basically the same question as the post 9548 repository-backup-in-saas-offerings, that topic is however very old, less complete, and was never answered.

If you have a premium subscription as you hint at in your topic title, it may be worthwhile opening a support ticket to get an official response from the Gitlab team themselves.

Whilst Gitlab employees do visit the forum, albeit not very frequently, at this point the majority of replies are going to be from community users of Gitlab. Hence the support ticket for paid users of Gitlab is probably going to be your best bet.

That said, I’m sure Gitlab do backup their instance and all the repositories on it, regardless of them being paid users or not. However, being able to restore individual repositories is probably not something that is going to be an option. How that differs for paid or free users, again impossible for us to answer - support ticket. As to how you can find out what type of backups, how frequent, etc, etc, then only Gitlab can explain that to you. The amount of influence you have over this is very little if anything.

Being able to restore it, again is only likely to be possible by opening a support ticket and making a request as a paid user, if Gitlab can restore your specific repository from a specific date. As a free user, there won’t be any assistance, effectively you are on your own. I’m sure Gitlab for paid users would help restore repositories.

If you ask this question by opening a support ticket, quoting your premium subscription then I expect you’ll get a better response.

Also, irrespective of whether Gitlab is making backups and being able to restore them, it would make sense to make your own backups in the event you wish to recover that data elsewhere in the future - for example on your own private Gitlab server or whatever. Relying solely on Gitlab for this would be a bit of a risk and you are effectively at their mercy.

For various cloud services I utilise, I use the backup features that they offer, but I make my own as well just in case. I’d recommend everyone does this, because you simply do not know what may or may not be possible.

1 Like