Gitlab版本升级

一、gitlab官方给出的升级路线:

二、备份原有文件

gitlab-rake gitlab:backup:create STRATEGY=production
gitlab-rake gitlab:backup:restore BACKUP=备份文件数据前缀
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
备份文件的名字(1589317383_2020_05_13_11.5.1-ee_gitlab_backup.tar)

三、执行恢复的命令

gitlab-rake gitlab:backup:restore BACKUP=1589317383_2020_05_13_11.5.1-ee
之后重启gitlab服务就可以了
gitlab-ctl restart
更新权限
gitlab update-permission

四、添加代理

mkdir -p /etc/systemd/system/docker.service.d
nano /etc/systemd/system/docker.service.d/http-proxy.conf
在里面输入
[Service]
Environment="HTTP_PROXY=http://USER:PASSWD@SERVER:PORT/"
Environment="HTTPS_PROXY=http://USER:PASSWD@SERVER:PORT/"
之后执行以下命令就可以了:
systemctl daemon-reload
systemctl restart docker
OpenSSL::Cipher::CipherError ()错误:
gitlab-rails dbconsole --db main 
gitlab-psql -d gitlabhq_production
如果报错为: Warning: Your gitlab.rb and gitlab-secrets.json files contain sensitive data and are not included in this backup. You will need these files to restore a backup. Please back them up manually. 需要清除原始用户Token数据
UPDATE projects SET runners_token = null, runners_token_encrypted = null;

Gitlab版本升级
https://www.lingyepro.com/archives/388
作者
零叶独舞
发布于
2023年01月02日
许可协议