Score:0

Moving raw GitLab repositories to a new GitLab instance with access to old disk image but no backups

cu flag

I need to move all the data from a NON-BOOTING (so I can't create a GitLab backup normally) GitLab instance on EC2 to a fresh instance. I do NOT have GitLab backups, but have access to full disk of the old instance.

I have:

  • Detached the volume from the old, non-booting instance
  • Launched a new EC2 instance
  • Attached the volume to the new instance (not as the root volume, as an additional volume as /gitlab-volume)
  • SSH'ed into the new instance, mounted the old instance's volume
  • Installed exactly the same version of GitLab (EE 13.10.0) which uses a hashed directory structure
  • Opened port 80 in AWS, launched GitLab services, navigated to http://public-ip-of-my-instance, created a password for root user and logged into the GitLab admin web interface successfully. At this point I have a clean GitLab installation.
  • Ran gitlab-ctl stop
  • Copied /gitlab-volume/var/opt/gitlab/git-data/repositories to /var/opt/gitlab/git-data/repositories
  • Same for /etc/gitlab/gitlab-secrets.json and /etc/gitlab/gitlab.rb
  • Ran gitlab-ctl reconfigure (I just had to change Let's Encrypt settings as I currently won't support SSL and it was failing to validate, obviously)
  • Ran gitlab-ctl start

I went to the dashboard and it still displays as if I've never copied anything:

enter image description here

  • After searching through forums I've found that there is an import script import.rake so I tried that: gitlab-rake "gitlab:import:repos[/gitlab-volume/var/opt/gitlab/git-data/repositories]"
  • Again (after stop/reconfig/start) it still displays as if nothing changed from a clean install (same as screenshot above).

What am I doing wrong? (BTW I'm not a DevOps guy and have no prior GitLab installation experience, yet I'm tasked with this, so any clarification while answering is welcome)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.