Versions 3.16 and 3.18 support GitLab versions that lag behind the official versions. Upgrading GitLab to the latest official version requires more than 10 upgrades to complete. After upgrading to 4.0, the product does not provide automatic upgrades to 17.8.5. This solution addresses how to upgrade from 14.0.12 to 17.8.5.
Considering the large version gap, we adopt a data migration approach for the upgrade.The time required for the upgrade varies significantly depending on the size of the GitLab data. It may take several days to complete the upgrade, so it's necessary to evaluate the maintenance window in advance.
Test data: Includes 3 projects (one large project of 666MB, 2 empty projects), backup file size of 668MB, upgrade time of 8 hours.
Data migration Path According to the official upgrade path documentation, the data migration path is as follows:
Backup the platform-deployed GitLab and restore it to an all-in-one image deployed GitLab, then upgrade to 17.8.5 using the all-in-one image, and finally restore the data backup to the platform-deployed 17.8.5 instance.
Apply the following yaml to the gitlab deployment namespace, the yaml has already mounted the backup pvc (backup-pvc) to the backup directory (if you need to access the gitlab instance during the upgrade process, you need to replace the IP and nodeport port in the yaml).
There will be database-related errors during the recovery process, and must be owner
and does not exist
are expected behaviors, see (https://gitlab.com/gitlab-org/gitlab/-/issues/266988) for details.
Use the all-in-one mode to upgrade gitlab to 17.8.5. You need to replace the gitlab image in the upgrade path one by one until you upgrade to 17.8.5.
Upgrade path: 14.0.12 → 14.3.6 → 14.9.5 → 14.10.5 → 15.0.5 → 15.4.6 → 15.11.13 → 16.3.9 → 16.7.10 → 16.11.10 → 17.3.6 → 17.5.5 → 17.8.5
In the gitlab 17.8.5, add the following values to enable the gitlab 17.8.5 toolbox:
During the recovery process, database-related errors may occur, where must be owner and does not exist are expected behavior, details can be found at (https://gitlab.com/gitlab-org/gitlab/-/issues/266988)
When executing the backup data, the task-runner container is killed, and the request and limit resources need to be added to the task-runner container (at least 2c4g), then restart the task-runner and perform the backup again.
When restoring the backup to the 17.8.5 deployed by the platform, the toolbox container is killed, and the request and limit resources need to be added to the toolbox container (at least 2c4g).
The upgrade backup does not include external attachment images and avatars, so the page cannot display attachment images and uploaded avatars after the upgrade. You can replace the 17.8.5 PVC with the 14.0.12 image storage PVC.