Gitlab 升级、备份与恢复
1.Gitlab的 rpm 包下载(下载到/usr/local/src)
wget https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-10.5.2-ce.0.el6.x86_64.rpm
2.Gitlab数据备份
gitlab-ctl stop unicorn gitlab-ctl stop sidekiq gitlab-ctl stop nginx gitlab-rake gitlab:backup:create ls /var/opt/gitlab/backup #备份位置
3.Gitlab升级过程
注意:gitlab 升级前必须进行数据备份操作 rpm -Uvh gitlab-ce-10.5.2-ce.0.el6.x86_64.rpm gitlab-ctl reconfigure gitlab-ctl restart [nginx]
4.Gitlab 版本信息
# head -1 /opt/gitlab/version-manifest.txt
5.Gitlab 恢复
required: linux系统版本一致,gitlab 版本一致 (1) Prepare: yum install -y curl policycoreutils-python openssh-server cronie yum install postfix && service postfix start && chkconfig postfix on (2) Install: rpm -ivh gitlab-ce-10.5.2-ce.0.el6.x86_64.rpm (3) Postpare: gitlab-ctl reconfigure # 重置或生成新的数据目录/var/opt/gitlab gitlab-ctl restart (4) 数据还原 Next, restore /etc/gitlab/gitlab-secrets.json and /etc/gitlab/gitlab.rb if necessary as mentioned above. Next, restore /var/opt/gitlab/.ssh to new machine’s direct 将备份的数据copy至新机器 scp 1493107454_2017_04_25_9.1.0_gitlab_backup.tar 192.168.99.116:`pwd` chown git.git /var/opt/gitlab/backups/*.tar gitlab-ctl stop unicorn gitlab-ctl stop sidekiq gitlab-rake gitlab:backup:restore BACKUP=1493107454_2017_04_25_9.1.0 gitlab-ctl restart gitlab-rake gitlab:check SANITIZE=true
6.Gitlab 邮件发送访问路径及部分logo加载问题
scp /etc/gitlab/gitlab.rb 192.168.99.116: /etc/gitlab/gitlab.rb gitlab-ctl stop unicorn gitlab-ctl stop sidekiq gitlab-ctl stop nginx gitlab-ctl reconfigure gitlab-ctl restart
相关推荐
cxin 2020-11-06
synshitou 2020-10-21
Topbeyond 2020-08-21
happyfreeangel 2020-07-27
白开水 2020-07-19
无风的雨 2020-07-08
贤时间 2020-07-06
wishli 2020-06-28
小信 2020-06-21
leehbhs 2020-06-20
happyfreeangel 2020-06-18
83284950 2020-06-17
冯冯领队 2020-06-16
就是那个胖子 2020-06-14
83284950 2020-06-14
LiHansiyuan 2020-06-14
fcds00 2020-06-11
就是那个胖子 2020-06-11