Gitlab迁移

@liubb  March 17, 2020

gitlab备份和迁移

/opt/gitlab/bin/gitlab-rake gitlab:backup:create

在/var/opt/gitlab/backups目录下创建一个名称类似为1530156812_2018_06_28_10.8.4_gitlab_backup.tar的压缩包

查看gitlab版本

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

清华大学镜像 https://mirrors.tuna.tsinghua.edu.cn 找到对应版本的gitlab
在新服务器安装同样版本的gitlab,把生成的压缩包传送至新服务器的/var/opt/gitlab/backups目录

新服务器安装后执行 踩坑1: _gitlab_backup.tar去掉,只要数字

gitlab-rake gitlab:backup:restore BACKUP=1530156812_2018_06_28_10.8.4
gitlab-ctl reconfigure

重启gitlab


添加新评论