gitlab迁移
2020-12-16 本文已影响0人
舒尔诚
在老服务器上将备份文件发送至新服务器的相应目录下
[root@gitlab ~]# scp /var/opt/gitlab/backups/1530156812_2018_06_28_10.8.4_gitlab_backup.tar root@10.0.0.6:/var/opt/gitlab/backups/
3、gitlab恢复
[root@gitlab ~]# gitlab-ctl stop unicorn #停止相关数据连接服务
[root@gitlab ~]# gitlab-ctl stop sidekiq
[root@gitlab-new ~]# chmod 777 /var/opt/gitlab/backups/1530156812_2018_06_28_10.8.4_gitlab_backup.tar
修改权限,如果是从本服务器恢复可以不修改
[root@gitlab ~]# gitlab-rake gitlab:backup:restore BACKUP=1530156812_2018_06_28_10.8.4
从1530156812_2018_06_28_10.8.4编号备份中恢复
按照提示输入两次yes并回车

[root@gitlab ~]# gitlab-ctl start #启动gitlab
浏览器访问新服务器的地址进行查看,迁移成功