In place upgrade from RHEL7 to 8 with gitlab-ee omnibus

Doing an inplace upgrade from RHEL7 to 8 which is hosting gitlab-ee via rpm.
My current process outline is based on the idea of performing a clean install on RHEL 8.

#Files below saved offline…
Generate backup (gitlab-backup create)
From /etc/gitalb copy ssl and trusted-certs directories, gitlab.rb, gitlab-secrets.json

#Now remove gitlab with:
gitlab-ctl uninstall
yum remove gitlab-ee
Remove /etc/gitlab, /var/opt/gitlab, /opt/gitlab

#Perform RHEL 8 inplace upgrade

Install the same gitlab version with the RHEL 8 rpm.
Restore files and directoies:
ssl and trusted-certs
gitlab.rb
gitlab-secrets.json

Run gitlab-ctl reconfigure to start the service.
gitlab-ctl stop puma
gitlab-ctl stop sidekiq

Verify operation with gitlab-ctl status

Copy backup file to /var/opt/gitlab/backups
Restore with: gitlab-backup restore BACKUP=

gitlab-ctl restart

***Missing or incorrect steps?

It would be wrong to remove Gitlab. It’s not a part of any of the RHEL7 or RHEL8 repositories, so you should be able to do an in-place upgrade without having to remove Gitlab.

Alternatively, make sure you use the Gitlab Backup/Restore documentation and also ensure you have a backup of ``/etc/gitlab/gitlab.rband/etc/gitlab/gitlab-secrets.jsonand instead of attempting the in-place upgrade, copy the two above files to a safe places, along with the backup you just created that is under/var/opt/gitlab/backups. Then clean install your server with either RHEL8 or RHEL9. Install the same version of Gitlab that you had on your old server, then copy the two files to /etc/gitlab directory, and run gitlab-ctl reconfigure``` to get a basic empty installation of Gitlab running. Place the backup on the new server under /var/opt/gitlab/backups and then run the restore as per the Gitlab docs.

So the updated steps would be simplified to …
Offline migration of gitlab-ee from RHEL 7 to RHEL8 with inplace RHEL upgrade:

  1. Backup gitlab and ensure offline copies: of ssl/trusted-certs directory files ,gitlab.rb, gitlab-secrets.json

  2. Inplace upgrade is executed leaving current RHEL7 gitlab-ee version in place.

  3. Perform normal yum upgrade of gitlab version but using the RHEL8 rpm. Run gitlab-ctl reconfigure/restart.

The RHEL7 gitlab-ee version is never uninstalled other than the during step 3.