当/
目录下磁盘空间不足的时候,gitlab会启动失败也会备份失败,故需要更改gitlab的备份路径:
这里选择剩余空间最大的/home
目录:
mkdir -p /home/gitlab/backups
vim /etc/gitlab/gitlab.rb
修改内容:
gitlab_rails['backup_path'] = "/home/gitlab/backups"
注意:原先此项参数是被注解的,这里需要删除
#
并修改后面的路径
gitlab-ctl stop
gitlab-ctl reconfigure
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备份路径