红联Linux门户
Linux帮助

GitLab迁移

发布时间:2014-06-23 15:27:48来源:红联作者:velcbo
今天尝试了一下迁移GitLab的方法。非常简单:

假设原来的GitLab 位于A服务器,现在在B服务上已经装好了Gitlab。

1. 通过scp命令将A的/home/git/repositories/目录下的所有内容复制到B上对应位置

这个时间比较长

2. 到B服务器上,进入/home/git/gitlab目录后,运行下面的命令:

sudo -u git -H bundle exec rake gitlab:import:repos RAILS_ENV=production

完成后,打开B服务器上的gitlab网站,代码有了,wiki有了。issue和用户没有。还要手动建。

别忘了用下面的命令检测:

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

作者:csfreebird
文章评论

共有 0 条评论