Can git-data/repositories/+gitaly safely be removed after restore?


I created a backup of an 11.2.3 CE Omnibus installation and did a restore on a new machine.

The restore went fine, everything works. But I now have an additional directory named


on the new server. Inside that directory there are more directories:


In there are folders with the same names as my repositories.

Looking at the actual repository configs at


I can see that all these config files now have 2 lines added that aren’t in the repos config files on the server I took the backup from:

[remote "origin"]
        url = /var/opt/gitlab/git-data/repositories/+gitaly/tmp/repo621855380/repo.bundle

The mentioned directory or file repo621855380/repo.bundle doesn’t exist under /var/opt/gitlab/git-data/repositories/+gitaly/tmp/.

The gitlab:cleanup:dirs task says:

Looking for directories to remove... 
Can be removed: /var/opt/gitlab/git-data/repositories/+gitaly
To cleanup this directories run this command with REMOVE=true

My questions are:

  • Is it safe to remove the +gitaly directory?
  • Why is the directory still there after a restore if it’s safe to remove it?
  • Why has each repo config a “remote origin” added that points to a (nonexisting) path under /var/opt/gitlab/git-data/repositories/+gitaly/?

Thanks a lot.

First, disable gitaly, add to the config /etc/gitlab/gitlab.rb :
gitaly[‘enable’] = false

Then reconfigure :
gitlab-ctl reconfigure

Then run:
gitlab-rake gitlab:cleanup:dirs REMOVE=true