1. 13
  1. 3

    The system administrator of the self-managed Gitlab instance said this would simply entail a git pull && git push and that the migration will be done quickly. Depending on your usage of Gitlab, this is either a naïve oversimplification or straight forward dangerous. The truth is more nuanced and entails quite a bit more work. Since the migration took us a couple of full working days and we wrote some reusable checklists and code in the process, I’m quickly jotting these down. Maybe somebody else can also make use of it.

    I feel like this could be said for many “simple” operations. It never simply entails anything.

    1. 2

      Impressive. Would the same procedure work to move in the opposite direction as well?

      1. 2

        Technically speaking, it would. We’ve used the specific ‘directional wording’, because some considerations would be different or even reverse:

        • When moving to a self-managed instance, you can only use one admin API token to create all groups and projects. That will make moving a bit easier on the one hand.
        • The threat model is different. If there’s multiple teams and maybe even organisations consolidating, the threat model is different. For example, any user with Admin rights will have access to all projects.
        • There’s different pros and cons to self-managing and going with gitlab.com - for example, one important consideration would be backup and restore procedures. And making sure that there’s a sysadmin on the team who knows what she’s doing, because hosting Gitlab isn’t as simple as it sounds. It doesn’t simply host git repositories, there’s a whole lot more going on(;
      2. 1

        Nice write-up.

        I have to say I’m a little surprised gitlab doesn’t provide some gadget to automate this. I’d think this would be their “happy path” for users of the free self-managed version.

        1. 1

          Thank you for the kind words🙏

          I’d say that GitLab already is working hard on this topic - the project import/export feature has been there since a long time; I happen to know, because we used it to migrate off gitlab.com to the self-managed instance some years ago(;

          It’s a hard problem to migrate completely - some isues are even just operational that won’t have technical solutions.

          Actually, I’m quite impressed how well their API documentation mapped and how easy it was to get the move done nicely. And today, I just saw a new Beta feature popping up in the GitLab web interface: “Import Group” which would have been quite helpful as well.

          Maybe at some point, they will provide a wrapper around all APIs to migrate complete instances, that would probably make sense. Initially, we’ve moved off gitlab.com, because it was quite slow which hampered the daily tasks. But GitLab came a long way in the meantime - in feature set, speed, monetization. As a user and customer, I’m quite stoked about all of that(;