Migrating everything from gitlab.com to self-managed instance

I’m trying to migrate our whole organisation, so everything we have currently on gitlab.com to a self-managed instance, because of the upcoming 5-user limit for free accounts. The instance is already running and configured in Azure according to the installation guide.

I would like to copy everything that is on gitlab.com to the new instance, and am following this guide: Migrating groups | GitLab - I did make sure to enable the bulk_import_projects feature flag.

The import runs fine on our root group and sets up the groups and projects. What it apparently doesn’t copy and what would be very important for me are 1. issues and 2. the actual git repositories themselves. Issues lists are empty and “Repository” just gives me the message “The repository for this project does not exist.”

Is this the expected behaviour? The guide says that issues and repositories are among the “Migrated project resources”. How can I debug this process?

I’m also trying to migrate from gitlab.com to a selfmanaged gitlab instance for the same reasons.
I don’t think this is expected. On the first run some repositories were created fine. Did you also repeat the import?

I think one could debug this with these commands:

docker exec -it <containerId> bash # get id via `docker ps`
gitlab-rails console
group = Group.find_by_full_path('path/to/group')
entity = BulkImports::Entity.find_by_namespace_id(group.id)
puts entity.failures
pp entity.bulk_import.entities.map(&:failures).flatten

(for me gitlab-rails console takes forever to load …)

If you find something interesting, please let me know

Yup, I repeated it a few times. I found out now that the project import does apparently work with the repos and issues, so this is probably what I will use. The downside is that on the project import mask I need to select a parent group for each project, which for ~100 projects is tedious but doable.

I ran into the same issue as well. I setup the access token in my account at gitlab.com as well as the enabling the bulk_import_projects feature flag as their instructions state.

I also created the users that we have in our top level namespace on gitlab.com in the self hosted gitlab instance with the same usernames/email addresses. I was hoping that this would satisfy the member migration requirements:

Members (Introduced in 13.9) Group members are associated with the imported group if:

  • The user already exists in the target GitLab instance and
  • The user has a public email in the source GitLab instance that matches a confirmed email in the target GitLab instance

I experienced the same issue as you where the top level namespace group, subgroups, and projects were created but they failed to import anything from the gitlab.com projects and I see errors relating to the failure to import. The BulkImports::NetworkError was the error i saw in all of the failed migrations. In the gitlab issue referenced above, it looks like the cause of this is temporary server unavailability. When i tried to migrate the top level group, this included over 70 projects.

I’m going to create a test group with a project on gitlab.com and i’ll attempt to import that to my self hosted instance to see if it works. I’m wondering if the large number of projects in the migrated group are causing the failure.