i’m runnig a CE Omnibus instance on a Debian 9 VM. I’d like to migrate to a fresh Debian 11 VM. I know how to backup an restore Gitlab, and i know i have to restore to the very same GitLab version. I’ve read the backup and restore docs. However, taking a look at this part of the docs:
First it all starts with what version of Gitlab CE you are running on Debian 9. Your best bet is to upgrade the version on Debian 9 until you can go no further with the Gitlab CE version.
Then upgrade Debian 9 to Debian 10.
Then upgrade Gitlab up until the latest version possible on Debian 10.
Then upgrade Debian 10 to Debian 11.
And repeat upgrading Gitlab to the latest version.
You will need to make sure to follow the upgrade path listed in the Gitlab upgrade documentation. There is no need to create a new VM. My initial Gitlab install was on Debian 9, and I’m currently on Debian 10. That said, I have been upgrading everything regularly when new updates were released. So it is possible.
If you are not comfortable with upgrading Debian, then the procedure would be to get to the latest version of Gitlab CE on Debian 9, then take a backup which should be stored in /var/opt/gitlab/backups by default. Make sure to copy /etc/gitlab/gitlab.rb and /etc/gitlab/gitlab-secrets.json as these are separate from your backup. Then install a new VM with Debian 10 and install the exact same version of Gitlab that you have on Debian 9. Follow the Gitlab restore docs for how to restore by placing the config files in /etc/gitlab and reconfiguring to get a basic Gitlab instance running, put the backup in /var/opt/gitlab/backups and run the restore procedure.
After the restore, you can then upgrade to the latest possible Gitlab on Debian 10, and follow backup/restore to move from Debian 10 to a new Debian 11 VM.
Obviously after all Gitlab upgrades you need to make sure background migrations have finished before starting the next upgrade on the upgrade path list.
Just remember you can only restore to the same version of gitlab. So if your backup is from 12.9.3 then it has to be restored to 12.9.3 on the new server.