多语言展示
当前在线:355今日阅读:23今日分享:25

gitlab 迁移之版本升级

由于某些原因,公司gitlab要迁移到云服务器,因此需要进行数据迁移。但是由于当前版本太低,因此只能升级后再进行迁移
工具/原料

gitlab

方法/步骤
1

备份:cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production

2

停止服务sudo service gitlab stop

3

cd /home/git/gitlab sudo -u git -H ruby -Ilib -e 'require "gitlab/upgrader"' -e 'class Gitlab::Upgrader' -e 'def latest_version_raw' -e '"vX.X.X"' -e 'end' -e 'end' -e 'Gitlab::Upgrader.new.execute' # to perform a non-interactive install (no user input required) you can add -y # sudo -u git -H ruby -Ilib -e 'require "gitlab/upgrader"' -e 'class Gitlab::Upgrader' -e 'def latest_version_raw' -e '"vX.X.X"' -e 'end' -e 'end' -e 'Gitlab::Upgrader.new.execute' -- -y

4

sudo service gitlab start sudo service nginx restart

5

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

6

cd /home/git/gitlab-shell sudo -u git -H git fetch sudo -u git -H git checkout v`cat /home/git/gitlab/GITLAB_SHELL_VERSION`

注意事项
1

升级时间有点久,慢慢等吧

2

记得备份

推荐信息