Upgrading Gitlab 13 to 14

Confirming Update Steps⌗
For major version updates of Gitlab, direct upgrades might cause issues, so it’s recommended to follow the official documentation and upgrade to the target version step by step. Otherwise, taking too big a step might lead to problems.
According to the official website, you generally need to go through three upgrades to reach version 14.
Preparation⌗
Backing Up Data and Projects⌗
docker exec -t <container name> gitlab-backup create
Dumping database tables:
- Dumping table events... [DONE]
- Dumping table issues... [DONE]
- Dumping table keys... [DONE]
- Dumping table merge_requests... [DONE]
- Dumping table milestones... [DONE]
- Dumping table namespaces... [DONE]
- Dumping table notes... [DONE]
- Dumping table projects... [DONE]
- Dumping table protected_branches... [DONE]
- Dumping table schema_migrations... [DONE]
- Dumping table services... [DONE]
- Dumping table snippets... [DONE]
- Dumping table taggings... [DONE]
- Dumping table tags... [DONE]
- Dumping table users... [DONE]
- Dumping table users_projects... [DONE]
- Dumping table web_hooks... [DONE]
- Dumping table wikis... [DONE]
Dumping repositories:
- Dumping repository abcd... [DONE]
Creating backup archive: $TIMESTAMP_gitlab_backup.tar [DONE]
Deleting tmp directories...[DONE]
Deleting old backups... [SKIPPING]
Just to be safe, remember to back up these two configuration files:
/etc/gitlab/gitlab-secrets.json
/etc/gitlab/gitlab.rb
For more information, check the official documentation.
Pulling the Target Version Image⌗
git pull gitlab/gitlab-ce:13.12.15-ce.0
After backing up Gitlab, you can stop the current version container, then modify the image tag in docker-compose.yml, changing the tag to the latest pulled tag.
Then execute:
docker-compose up -d
Running Batch Migration⌗
During the upgrade process, some versions have significant changes, such as data structure modifications. Therefore, Gitlab has added a migration progress viewing page in the admin backend.
Summary⌗
This article only briefly introduces the general upgrade process. Since I strictly followed the official documentation during the upgrade, there were no issues. If you encounter problems, you can refer to the official documentation for rollback procedures.
I hope this is helpful, Happy hacking…