gitlab完整迁移
来源:互联网 发布:python线程间传递数据 编辑:程序博客网 时间:2024/06/08 01:15
环境介绍:
CentOS 6.7
gitlab:6.3.1
需求:gitlab从A服务器迁移至B服务器
第一、在B服务器上部署gitlab环境
参考《GitLab完整搭建(版本6.3.1)》
第二、备份A服务器上的数据
1).打包仓库文件
#su- git$cd/home/git/$tarzcvf repositories.tar.gz ./repositories
2).备份sql文件
$mysqldump-uroot -pxxxx gitlabhq_production > /tmp/gitlabhq_production.sql
3).备份keys
$cp/home/git/.ssh/authorized_keys /tmp/authorized_keys
4).复制1-3步的文件到B服务器
$scprepositories.tar.gz gitlabhq_production.sql authorized_keys root@B:/tmp/
第三、在B服务器上导入数据
1). 导入仓库,检查权限
$cd/home/git$tarzxvf repositories.tar.gz
如果权限有异常,直接重新赋权
$chown-R git.git /home/git/repositories/
2).导入数据库
$mysql-uroot -pxxx gitlabhq_production < gitlabhq_production.sql
3).导入keys
$catauthorized_keys >> /home/git/.ssh/authorized_keys
4.将文件导入ruby
$cd/home/git/gitlab/$bundleexec rake gitlab:import:repos RAILS_ENV=production$bundleexec rake gitlab:satellites:create RAILS_ENV=production
5).检测
$bundleexec rake gitlab:check RAILS_ENV=production
如果检测没有异常,可以重启gitlab服务
#/etc/init.d/gitlab restart
第四、验证git pull/push与异常解决
1). git pull
2). git push
如果报错:
git.exe push --progress "origin"master:master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 350 bytes | 0bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: An unexpected erroroccurred (redis-cli returned 1).
remote: error: hook declined to updaterefs/heads/master
To http://192.168.4.251/caoyang/test1121.git
! [remote rejected] master -> master(hook declined)
error: failed to push some refs to'http://192.168.4.251/caoyang/test1121.git'
屏蔽 /home/git/gitlab-shell/config.yml 28行redis配置
本文出自 “小陌成长之路” 博客,请务必保留此出处http://309173854.blog.51cto.com/7370240/1754872
- gitlab完整迁移
- GitLab迁移
- gitlab 迁移
- gitlab迁移
- gitlab备份迁移
- gitlab迁移小记
- gitlab迁移升级
- 迁移和升级gitlab
- Gitlab迁移小记
- svn 迁移到 gitlab
- Gitlab服务器迁移详解
- gitlab数据迁移
- Linux上gitlab迁移
- Gitlab服务器迁移
- gitlab仓库迁移
- gitlab project项目迁移
- gitlab服务器迁移
- Gitlab 迁移、备份、恢复
- redis3.0.2 编译安装 (启动服务方式启动)
- mybatis&spring整合
- CentOS 救援模式 (rescue installed system)修复损坏系统
- TortoiseGit升级操作说明
- gitlab邮件服务器配置
- gitlab完整迁移
- ubuntu环境搭建 (1)
- MySQL参数优化及基础操作
- Android Drawable 详解
- 搭建CentOS在线yum源镜像服务器
- RServe安装教程
- Fresnel Reflect
- zabbix开启web界面中文支持(中文乱码问题)
- VMware ESXI 5.5 系统安装(6.0)