gitlab upgrade jump
According to Gitlab Upgrade recomendations, you can’t skip a major version. So to go from 10.6.4-ee.0 to 12.10.3-ce.0, a few intermediate steps are neccesary.
At the age-old source version:
sudo gitlab-rake gitlab:backup:create
# copy backup from /var/opt/gitlab/backups to somewhere
First, import the backup in a dockerized 10.6.4-ee.0, to make sure everything works:
#!/bin/bash
GITLAB_HOME=$(pwd)
docker run --detach \
--hostname t430 \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://t430/'; gitlab_rails['lfs_enabled'] = true;" \
--publish 12443:443 --publish 12380:80 --publish 12322:22 \
--name gitlab \
--rm \
--volume $GITLAB_HOME/gitlab/config:/etc/gitlab \
--volume $GITLAB_HOME/gitlab/logs:/var/log/gitlab \
--volume $GITLAB_HOME/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ee:10.6.4-ee.0
now, you should create a root password on http://t430:12380.
To import the backup, follow the steps here:
# the prefix of the backup tar file
SOME_BACKUP=1588792402_2020_05_06_10.6.4-ee
docker exec gitlab gitlab-ctl reconfigure
# lets check everything is working after first up
docker exec gitlab gitlab-rake gitlab:check SANITIZE=true
# restore backup now
docker cp ${SOME_BACKUP}_gitlab_backup.tar gitlab:/var/opt/gitlab/backups
docker exec gitlab gitlab-ctl stop unicorn
docker exec gitlab gitlab-ctl stop sidekiq
docker exec gitlab chmod -R 775 /var/opt/gitlab/backups
# note -it flag so you can respond to questions that restore script asks!
docker exec -it gitlab gitlab-rake gitlab:backup:restore BACKUP=${SOME_BACKUP}
docker exec gitlab gitlab-ctl start
# now lets check again
docker exec gitlab gitlab-rake gitlab:check SANITIZE=true
Now, the Downgrade to CE can be done:
docker exec -it gitlab gitlab-rails runner "Service.where(type: ['JenkinsService', 'JenkinsDeprecatedService', 'GithubService']).delete_all"
Then, the chain of restarting the instance with newer and newer gitlab versions can begin…
Update 2020-10-16:
Going from EE to CE did not go well. I re-did the complete upgrade chain with EE versions.
Now looking into migrating to gitea.
Comments