安装git
wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/scientific/6/gitlab-ce-11.7.5-ce.0.el6.x86_64.rpm/download.rpm
rpm -ivh gitlab-ce-11.7.5-ce.0.el6.x86_64.rpm
1.迁移新gitlab应该与旧版本一致
版本
[root@nexus gitlab]# cat /opt/gitlab/embedded/service/gitlab-rails/VERSION
12.3.5
2.完整备份旧服务器数据
/opt/gitlab/bin/gitlab-rake gitlab:backup:create
完成备份
[root@gtitlab backups]# ll
total 15674184
-rw------- 1 git git 3998894080 Apr 20 18:25 1618914320_2021_04_20_11.7.5_gitlab_backup.tar
-rw------- 1 git git 3999989760 May 6 17:35 1620293695_2021_05_06_11.7.5_gitlab_backup.tar
-rw------- 1 git git 4025702400 May 6 18:14 1620296044_2021_05_06_11.7.5_gitlab_backup.tar
-rw------- 1 git git 4025774080 May 6 18:23 1620296584_2021_05_06_11.7.5_gitlab_backup.tar
[root@gtitlab backups]#
还原备份数据到新主机gitlab
[root@nexus gitlab]# gitlab-rake gitlab:backup:restore BACKUP=1620296584_2021_05_06_11.7.5
[root@nexus gitlab]# pwd
/var/opt/gitlab
[root@nexus gitlab]#
启动 等待启动完成 访问
gitlab-ctl start
gitlab-ctl status
gitlab-ctl stop
ip 和port 在 gitlab里nginx中的配置文件
路径:cat /var/opt/gitlab/nginx/conf/gitlab-http.conf,可以自定义编写。