Self-hosted GitLab instance using significantly larger storage space than all repositories combined

I want to preface this by stating that I’m not using GitLab for it’s intended purpose of working with code and am instead using it as a form of backup.
My issue is that the size of the GitLab folder is drastically larger than the repositories I’ve stored on it, the size of the repositories totals 180GB as listed in GitLab while the actual GitLab folder is at 560GB, this number is up 100GB from just a couple weeks ago while I’ve only pushed files to a smaller repository (~3MB). I have no idea what’s causing this behaviour or how to even start troubleshooting it.

What version are you running?

And are you using the build-in rake tasks to backup GitLab? (might not be needed when you already use GitLab for backup.)
14.10 introduced a bug that should be fixed in 15.0.2 that in some cases caused the size of backups to run away (here it grew by 170GB/day).

1 Like

Currently running 14.7, I would’ve updated but I get an entirely different issue that prevents it from running at all.
I don’t remember enabling any GitLab backup setting so it should be set to whatever the default is, not sure where the setting is to check.

As the recommendation is to run it as a cron job or systemd timer, those are what you should check, but I guess the default is not ton run anything (but that might also depend on how you installed GitLab). You can also just look in /var/opt/gitlab/backups which is where files are generated by default,

More complete documentation is in

But as you’re running a version prior to when that bug was introduced that can’t really be what affects you. I don’t remember anything happening in 14.7, but maybe someone else does, but I also don’t think we have any indication that this is a behaviour that has changed.

Do debug something like this I would log in to the server running GitLab and run du (either with -s or with --max-depth) on /var/opt/gitlab and (possibly) subdirectories of that until I found out what is using the space.

1 Like

No backups at all but I did find where the majority of the space is being used by running du and going down the filesystem, for some reason there’s over 60 “tmp_pack_XXXXXX” in one of the repository directories, each one using multiple gigabytes. Do you know if these are safe to delete? I’d assume so given their names but I’d like to know for sure before I do anything.