1、gitlab的配置
vim gitlab.rb
# 备份目录
gitlab_rails['backup_path'] = "/gitlab-back"
# 备份时间
gitlab_rails['backup_keep_time'] = 604800
# 载入配置
gitlab-ctl reconfigure
2、gitlab的备份
gitlab-rake gitlab:backup:create
# 手动备份
/etc/gitlab/gitlab-secrets.json
/etc/gitlab/gitlab.rb
3、恢复备份
# 停掉unicorn和sidekiq
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
# 执行恢复
gitlab-backup restore force=yes
# 如果/gitlab-back下有多个备份文件,可以执行下面命令指定恢复的目标
gitlab-backup restore force=yes BACKUP=1649991916_2022_04_15_14.6.2
重置、重启、自检
gitlab-ctl reconfigure
gitlab-ctl restart
# 等待启动完成后,否则会报错
gitlab-rake gitlab:check SANITIZE=true
升级路线