【问题解决】GitLab version mismatch

问题描述:gitlab数据备份恢复的时候需要两台机器上的gitlab的版本一致,否则就会报这个错误。

报错信息:

img

问题解决:

(1)确认两个服务器的的版本信息。

# 查看A服务器gitlab版本信息
root@4df3d06b9448:/# gitlab-rake gitlab:env:info
System information
System:		
Current User:	git
...
GitLab information
Version:	12.2.1
...
GitLab Shell
...
#查看B服务器gitlab版本信息
root@gitlab-gitlab-ce1:/var/opt/gitlab/backups# gitlab-rake gitlab:env:info
System information 
System:
Current User:   git
...
GitLab information 
Version:        12.1.4 
...
GitLab Shell 
...

(2)使两个服务器gitlab版本统一

这个网站可以查看docker库中gitlab的各种tag ,找到要恢复到的版本进行重装gitlab镜像。

[root@yuslave1 ~]# docker pull gitlab/gitlab-ce:12.1.4-ce.0
Trying to pull repository docker.io/gitlab/gitlab-ce ... 
12.1.4-ce.0: Pulling from docker.io/gitlab/gitlab-ce
f7277927d38a: Pull complete 
...
Digest: sha256:6abb1e9816665b65f17bdf3a508b20962d6efd20eda786111cd6a6909a0e694d
Status: Downloaded newer image for docker.io/gitlab/gitlab-ce:12.1.4-ce.0
# 查看确认镜像版本
[root@yuslave1 ~]# docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
docker.io/gitlab/gitlab-ce   12.1.4-ce.0         d36f0b03824b        3 weeks ago         1.84 GB
# 运行镜像
[root@yuslave1 gitlab]# docker run -d  -p 10443:443 -p 10080:80   -p 2222:22   --name gitlab --restart always -v /mnt/gitlab/config/:/etc/gitlab -v /mnt/gitlab/logs/:/var/log/gitlab -v /mnt/gitlab/data/:/var/opt/gitlab gitlab/gitlab-ce:12.1.4-ce.0

运行完成后重新配置gitlab基本信息,gitlab的搭建过程非此文重点内容,在这省略。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小猿备忘录

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值