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:
confuses me: do i have to do more than
- shut down my old vm (having a backup as well as the secrets file, ssh keys, gitlab.rb in another place)
- power on my new fresh Debian 11 VM, install same version Gitlab CE and restore from the backup and the other files
There are a lot of other things mentioned in that doc, e.g. redis database, background jobs?
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.
thanks for your suggestion. After a brief look into the Debian Upgrade Docs i think setting up a plain new Debian 11 VM is less work for me.
But anyway from your answer is assume it’s really just backup and restore, so i’ll try that.
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.