Leif160519的blog Leif160519的blog

——————

目录
更换Gitlab备份路径
/  

更换Gitlab备份路径


/目录下磁盘空间不足的时候,gitlab会启动失败也会备份失败,故需要更改gitlab的备份路径:

1.创建gitlab备份文件目录

这里选择剩余空间最大的/home目录:

mkdir -p /home/gitlab/backups

2.修改gitlab配置文件

vim /etc/gitlab/gitlab.rb

修改内容:

gitlab_rails['backup_path'] = "/home/gitlab/backups"

注意:原先此项参数是被注解的,这里需要删除#并修改后面的路径

3.停止当前gitlab,重新加载配置

gitlab-ctl stop
gitlab-ctl reconfigure

4.最后启动gitlab

gitlab-ctl start

当gitlab页面加载出来后,尝试使用/opt/gitlab/bin/gitlab-rake gitlab:backup:create CRON=1看看新备份文件夹下会不会生成新的备份文件,如果有,则表示备份成工。


“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill

标  题更换Gitlab备份路径
作  者Leif160519
出  处https://github.icu/articles/2020/01/15/1579051692944.html
关于博主:坐标南京,运维工程师,如有问题探讨可以直接下方留言。
声援博主:如果您觉得文章对您有帮助,可以评论、订阅、收藏。您的鼓励是博主的最大动力!