gitlab 升级过程记录

gitlab 有一组应用程序构成,升级过程中,除了涉及数据库结构变化,这些软件升级,配置变更【新版本中有些配置项作废】,所以升级gitlab时候一定要严格遵照官方升级的版本顺序: 1,查看当前本...

gitlab 有一组应用程序构成,升级过程中,除了涉及数据库结构变化,这些软件升级,配置变更【新版本中有些配置项作废】,所以升级gitlab时候一定要严格遵照官方升级的版本顺序:

1,查看当前本地gitlab 版本

cat  /opt/gitlab/embedded/service/gitlab-rails/VERSION

13.1.2

2,gitlat版本升级顺序整理

更具 https://docs.gitlab.com/ee/update/index.html#1420 建议

https://docs.gitlab.com/ee/update/index.html#upgrade-paths

参考gitlab给工具给出的升级路径

https://gitlab-com.gitlab.io/support/toolbox/upgrade-path/

我这里整理出版本升级顺序为:

13.1.2 ->13.1.11->13.8.8->13.12.15->14.0.12->14.1.8->14.6.2->14.9.5 -> 14.10.5 -> 15.0.2 -> 15.1.0

3,升级前做一个版本备份

gitlab-rake gitlab:backup:create

如果是12.10后可以使用:gitlab-backup create

4,开始按第二步版本升级顺序升级版本,每升级一个版本都要验证是否正常

gitlab-ctl stop puma;gitlab-ctl stop sidekiq [升级不能停止postgresql数据库,这两个服务器一个是代理,一个是队列,升级前只需要停止这两个就可以了]

yum install gitlab-ce-13.1.11

yum install gitlab-ce-13.8.8

yum install gitlab-ce-13.12.15

yum install gitlab-ce-14.0.12

yum install gitlab-ce-14.1.8

yum install gitlab-ce-14.6.2

 

5,升级后可以查看数据迁移状态

gitlab-rake db:migrate:status

若发现有down的状态

使用

gitlab-rake db:migrate 手工批量跑下迁移

状态正常后,确认gitlab都正常工作


6,如果大版本升级出现问题,也可以降级

降级步骤为:These steps consist of:


Stopping GitLab

Removing the current package

Installing the old package

Reconfiguring GitLab

Restoring the backup

Starting GitLab

以我这次从14.6.2 升级到14.10.0 可能是跨度太大,执行数据迁移的时候报错,手工执行gitlab-rake db:migrate 还是不行

只能降级到14.6.2 ,方法为:

A,做一次全备,B 删除 gitlab 包  yum remove gitlab-ce,yum install gitlab-ce-14.6.2 ;gitlab-ctl reconfigure



源替换:https://mirrors.tuna.tsinghua.edu.cn/help/gitlab-ce/


  • 发表于 2022-04-24 19:41
  • 阅读 ( 68 )

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
shitian
shitian

662 篇文章

作家榜 »

  1. shitian 662 文章
  2. 石天 437 文章
  3. 每天惠23 33 文章
  4. 小A 29 文章