1

I have an Omnibus installation of Gitlab and by default it stores all attachments to /var/opt/gitlab/gitlab-rails/uploads.

Unfortunately the drive is pretty small and I would like to store the attachments on a different drive. Is there some configuration magic (or something else) that can make this happen.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Abhishek Dey Das
  • 587
  • 7
  • 23

1 Answers1

0

You should be able to change your omnibus configuration (/etc/gitlab/gitlab.rb) to customize that path, as described in "Change default file locations":

user['home'] = '/gitlab-data/home'
git_data_dir '/gitlab-data/git-data'
gitlab_rails['shared_path'] = '/gitlab-data/shared'
gitlab_rails['uploads_directory'] = "/gitlab-data/uploads"
gitlab_ci['builds_directory'] = '/gitlab-data/builds'

To move the git home directory, all GitLab services must be stopped. Run gitlab-ctl stop && initctl stop gitlab-runsvdir.
Then continue with the reconfigure.

Run sudo gitlab-ctl reconfigure to start using the central location. Please be aware that if you had existing data you will need to manually copy/rsync it to these new locations and then restart GitLab.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250