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:
- 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)