change the data directory gitlab to store repos elsewhere

前端 未结 6 2017
南笙
南笙 2020-12-04 06:13

my basic disk is full for my gitlab installation, is it possible to move the repositories and their data to some other folder and make sure that the upcoming push\'s data is

6条回答
  •  自闭症患者
    2020-12-04 07:04

    In my case, I needed to move a repository from the default storage to storage1
    If you load the project's general setting, it show the project number, for example 37:

    sudo gitlab-rails console
    irb(main):012:0> p37 = Project.find(37)
    irb(main):009:0> p37.repository_storage
    => "default"
    irb(main):010:0> p37.repository_storage = 'storage1'
    irb(main):011:0> p37.save
    => true
    irb(main):012:0>  # +d to send EOF and exit
    

    clearing the cache is probably a good idea too

    gitlab-rake cache:clear RAILS_ENV=production

提交回复
热议问题