1、查看gitlab版本
gitlab-rake gitlab: env :info System information ... GitLab information Version: 12.2.8 ... GitLab Shell Version: 9.3.0 ... |
2、备份gitlab
gitlab-rake gitlab:backup:create #会在这个路径生成新的备份文件 /var/opt/gitlab/backups/XXX_gitlab_backup . tar |
3、准备新服务器
在新服务器上安装相同版本的gitlab,并将备份文件拷贝到新服务器相同路径
4、还原
gitlab-ctl stop unicorn gitlab-ctl stop sidekiq gitlab-rake gitlab:backup:restore BACKUP=XXX gitlab-ctl start |
5、验证
gitlab-rake gitlab:check SANITIZE= true |