change the data directory gitlab to store repos elsewhere

前端 未结 6 2030
南笙
南笙 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条回答
  •  旧时难觅i
    2020-12-04 07:08

    I just moved my gitlab repositories folder from one directory to another, might be useful for someone (do this quickly at a quiet time or stop gitlab beforehand!)

    Assuming you have a standard install the steps are

    • Create a new folder for repos as root and change the owner to the git user
    • Copy (with archive, recursive options) the old repo folder contents to its new home cp -ar SOURCE DESTINATION
    • Edit the gitlab config file and the gitlab-shell config files with the new repo path
    • Restart gitlab sudo /etc/init.d/gitlab restart

提交回复
热议问题