ported gitlab to another machine
Gitlab 13.12.3-ee was installed on Ubuntu 18.04 and everything worked fine.
The move was to another distribution, where gitlab was built from source code and the gitlab itself worked well until I restored it from a backup.
System info:
- CPU: Intel Xeon E-2288G
- 14Gb RAM
- Intel SSD DC 4610 480Gb
- Virtual Machine (KVM, no docker and etc…)
- 16 CPU thread for vm
- OS: Linux Gentoo
- 1 User
- And no resource limits
bundle exec rake gitlab:env:info RAILS_ENV=production
System information
System:
Proxy: no
Current User: git
Using RVM: no
Ruby Version: 2.7.3p183
Gem Version: 3.1.6
Bundler Version:2.2.19
Rake Version: 13.0.3
Redis Version: 6.0.14
Git Version: 2.31.1
Sidekiq Version:5.2.9
Go Version: go1.16.5 linux/amd64
GitLab information
Version: 13.12.3-ee
Revision: 9d9769ba2ad
Directory: /opt/gitlab/gitlab
DB Adapter: PostgreSQL
DB Version: 12.6
URL: http://192.168.1.5
HTTP Clone URL: http://192.168.1.5/some-group/some-project.git
SSH Clone URL: git@192.168.1.5/some-group/some-project.git
Elasticsearch: no
Geo: no
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 13.18.0
Repository storage paths:
- default: /var/lib/gitlab/repositories
GitLab Shell path: /opt/gitlab/gitlab-shell
Git: /usr/bin/git
bundle exec rake gitlab:check RAILS_ENV=production
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.18.0 ? ... OK (13.18.0)
Running /opt/gitlab/gitlab-shell/bin/check
Internal API available: OK
Redis available via internal API: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes
Number of Sidekiq processes (cluster/worker) ... 1/5
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config up to date? ... yes
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory exists? ... yes
Uploads directory has correct permissions? ... yes
Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet)
Projects have namespace: ...
dev / winplatform ... yes
Redis version >= 5.0.0? ... yes
Ruby version >= 2.7.2 ? ... yes (2.7.3)
Git version >= 2.31.0 ? ... yes (2.31.1)
Git user has default SSH configuration? ... yes
Active users: ... 1661
Is authorized keys file accessible? ... yes
GitLab configured to store new projects in hashed storage? ... yes
All projects are in hashed storage? ... yes
Elasticsearch version 7.x (6.4 - 6.x deprecated to be removed in 13.8)? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
backup and restore:
gitlab-ctl stop puma
gitlab-ctl stop sidekiq
gitlab-ctl status
gitlab-rake gitlab:backup:create STRATEGY=copy
cp /etc/gitlab/gitlab-secrets.json /root/
rc-service gitlab stop
mv *.tar /opt/gitlab/backups/
chown git:git /opt/gitlab/backups/*.tar
cd /opt/gitlab/gitlab
sudo -u git -H GITLAB_ASSUME_YES=1 bundle exec rake gitlab:backup:restore RAILS_ENV=production
I have converted json to yml
cp /root/secrets.yml /opt/gitlab/gitlab/config/
production.log
:
secrets.yml:
su git
sh-5.1$ export RUBYOPT=--disable-did_you_mean
sh-5.1$ RAILS_ENV=production bundle exec rails c
--------------------------------------------------------------------------------
Ruby: ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux]
GitLab: 13.12.3-ee (9d9769ba2ad) EE
GitLab Shell: 13.18.0
PostgreSQL: 12.6
--------------------------------------------------------------------------------
Loading production environment (Rails 6.0.3.6)
irb(main):001:0> ApplicationSetting.current.reset_runners_registration_token!
Traceback (most recent call last):
5: from (irb):1
4: from app/models/concerns/token_authenticatable.rb:53:in `block in add_authentication_token_field'
3: from app/models/concerns/token_authenticatable_strategies/base.rb:44:in `reset_token!'
2: from lib/gitlab/database.rb:370:in `transaction'
1: from lib/gitlab/database.rb:371:in `block in transaction'
OpenSSL::Cipher::CipherError ()
What is the problem?