GitLab全体移行
移行の説明
1、古いgitlabをバックアップする(192.168.15.240)
[root@localhost ~]# gitlab-rake gitlab:backup:create
2、古いgitlabバックアップファイルを新しいgitlabにコピーする(192.168.15.240)
[root@localhost ~]# scp /var/opt/gitlab/backups/1552914145_2019_03_18_11.4.5_gitlab_backup.tar [email protected]:/var/opt/gitlab/backups/
3、新しいgitlabを還元する(192.168.15.241)
[root@localhost ~]# gitlab-ctl stop unicorn
[root@localhost ~]# gitlab-ctl stop sidekiq
[root@localhost ~]# chmod -R 777 /var/opt/gitlab/backups
[root@localhost ~]# chmod -R 777 /opt/gitlab/embedded
[root@localhost ~]# cd /var/opt/gitlab/backups/
[root@localhost ~]# gitlab-rake gitlab:backup:restore BACKUP=1552914145_2019_03_18_11.4.5
ヒントがあれば、処理ファイル:restore handy:
[root@localhost ~]# cd /var/opt/gitlab/backups
[root@localhost backups]# tar xf uploads.tar.gz -C /var/opt/gitlab/gitlab-rails/uploads
[root@localhost backups]# tar xf builds.tar.gz -C /var/opt/gitlab/gitlab-ci/builds
[root@localhost backups]# tar xf pages.tar.gz -C /var/opt/gitlab/gitlab-rails/shared/pages
[root@localhost backups]# tar xf artifacts.tar.gz -C /var/opt/gitlab/gitlab-rails/shared/artifacts
以下のコマンドによるリストアデータの信頼性検出
[root@localhost backups]# gitlab-ctl reconfigure
[root@localhost backups]# gitlab-ctl restart
[root@localhost backups]# gitlab-rake gitlab:check SANITIZE=true
4、付録-注意事項
以下のファイルは、/var/opt/gitlab/.ssh/authorized_keys/etc/gitlab/gitlab-secrets.json/etc/gitlab/gitlab.rb
/var/opt/gitlab/gitlab-rails/etc/secrets.yml/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/premailer-rails-1.9.7/example/config/secrets.yml/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/graphiql-rails-1.4.10/test/dummy/config/secrets.yml/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/generators/rails/app/templates/config/secrets./opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/graphql-1.8.1/spec/dummy/config/secrets.yml/opt/gitlab/embedded/lib/ruby/gems/2.4.0/gems/hashie-forbidden_attributes-0.1.1/test/dummy/config/secrets.yml/opt/gitlab/embedded/service/gitlab-rails/config/secrets.yml