Gitlab Update from version 12.4.2 to last Docker Version 12.10.0-pre with Source Code Migration

Hello i want to migrate all source code from my normal giltab version 12.4.2 to the docker version 12.10.0-pre.

I have done all installation and the version 12.10.0 is running on docker with this instructions https://docs.gitlab.com/omnibus/docker/README.html.

But how is it possible to get the source code from the old server with 12.4.2 and migrate to docker. I know that must have the samer version also for the docker for source code migration. But the steps are not clear to migrate the code.

Is there also a tutorial for this steps?

BR Christian

Hi rocky123456703948398, welcome to the GitLab Community Forum! :tada:

The best way to migrate from one GitLab instance to another is to back up the normal gitlab instance and then restore it on the new one (using docker).

https://docs.gitlab.com/ee/user/project/import/#migrating-between-two-self-managed-gitlab-instances

Create backup of current instance

Install GitLab version 12.4.3 using docker on the new system:

https://docs.gitlab.com/omnibus/docker/

sudo docker run --detach \
  --hostname gitlab.example.com \
  --publish 443:443 --publish 80:80 --publish 22:22 \
  --name gitlab \
  --restart always \
  --volume $GITLAB_HOME/gitlab/config:/etc/gitlab \
  --volume $GITLAB_HOME/gitlab/logs:/var/log/gitlab \
  --volume $GITLAB_HOME/gitlab/data:/var/opt/gitlab \
  gitlab/gitlab-ee:12.4.2-ee.0

Copy backup, config, and secrets file to GitLab docker container.

Exec into docker container

https://docs.gitlab.com/omnibus/docker/#configure-gitlab

restore from backup https://docs.gitlab.com/ee/raketasks/backup_restore.html#restore

Once you’ve successfully restored from backup in the docker container, you can safely upgrade the new dockerized GitLab to the latest version:

https://docs.gitlab.com/omnibus/docker/#upgrade-gitlab-to-newer-version

I would suggest not running GitLab versions with the -pre suffix as these are pre-release images that do not get tested as thoroughly as our our official releases.

Having said all of that: We strongly recommend using the Omnibus package installation (instead of docker) since it is quicker to install, easier to upgrade and configure, and it contains features to enhance reliability not found in other methods.

Let us know how it goes , or if you have any additional questions!

2 Likes