Gitlab external url change from old prod to new prod

Hello team,

Currently we are migrating our production gitlab to new server, it was already configured with load balancer. So we have a central gitlab url.
Url: https://gitlab/company.com

So my doubt is when we migrate to new server. How can we use that old central GitHub url. We don’t want use new test server host name as external url. Because lot of projects have git url as old url.

Is there any way to achieve this smoothly without any issue.

Thanks

Hi,

Easiest way is as per the Gitlab Backup/Restore documentation.

Make sure you have /etc/gitlab/gitlab.rb from the old server
Make sure you have /etc/gitlab/gitlab-secrets.json from the old server
Install same version of Gitlab as your old server on the new server.
Place the two files above in /etc/gitlab and then run gitlab-ctl reconfigure
Place backup file in /var/opt/gitlab/backups on new server.
Run Gitlab restore process.

Once the new server is restored, configure the load balancer to point to the new server instead of the old one. Since you use gitlab.rb from old server, it will use correct url that you want to use.

More detail on all of the above here: Back up and restore GitLab | GitLab

1 Like