I need to move our self-hosted Gitlab Server to a new hardware. The old server is version 14.0.7-ce.0 on Ubuntu 20.04.6, the new server would be the lastest version on Debian 12 Bookworm.
When I do a backup on the old server and a restore on the new server as described in Back up and restore GitLab | GitLab, must the Gitlab versions match? Or do I need to upgrade the old server first (which I’d like to avoid). The oldest Gitlab release for Debian 12 is 16.1.
According to the Restore GitLab | GitLab (link from the above page you linked):
You can only restore a backup to exactly the same version and type (CE or EE) of GitLab on which it was created. For example, CE 15.1.4.
If your backup is a different version than the current installation, you must downgrade or upgrade your GitLab installation before restoring the backup.
As @paula.kokic said this won’t be possible. On your old server Ubuntu 20.04.6 you will need to upgrade this to at least Gitlab 16.1 before you can think about taking a backup and restoring it on the new server with Debian 12 since there is no older version of Gitlab for Debian 12.
In theory you could use the Debian 11 repositories on your Debian 12 server to get an older version that would match your Ubuntu 20.04 install (eg 14.0.7). However, you will still then need to upgrade to the latest Gitlab on your new server. But at least it won’t require upgrading the old server to a certain level first.