1.Gitlab的 rpm 包下載(下載到/usr/local/src)python
wget https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-10.5.2-ce.0.el6.x86_64.rpm
2.Gitlab數據備份linux
gitlab-ctl stop unicorn gitlab-ctl stop sidekiq gitlab-ctl stop nginx gitlab-rake gitlab:backup:create ls /var/opt/gitlab/backup #備份位置
3.Gitlab升級過程nginx
注意:gitlab 升級前必須進行數據備份操做 rpm -Uvh gitlab-ce-10.5.2-ce.0.el6.x86_64.rpm gitlab-ctl reconfigure gitlab-ctl restart [nginx]
4.Gitlab 版本信息git
# head -1 /opt/gitlab/version-manifest.txt
5.Gitlab 恢復json
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加載問題ssh
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