Gitlab:check says repository is empty but git-data/repositories contains repositories

I want to migrate an old GitLab instance v.7.0.0 on one server over to another GitLab instance using v.8.7.2 on another server.

I managed to convert the old mysql database to postgres and then migrate the postgres DB over, and am able to see projects and users on my site.

Now I want to migrate the repositories directory on the old GitLab server onto the new GitLab server.

On the 8.7.2 GitLab instance, inside the /var/opt/gitlab/git-data/repositories I see only one folder called root.
On my old 7.0.0 GitLab instance, inside the repositories directory there are many folders corresponding to the git projects in my GitLab.

I copied all the folders inside my old repositories directory into the new repositories directory, I did not remove the root directory which was already there (not sure what it is for)

After doing sudo gitlab-ctl reconfigure,
I did sudo gitlab-rake gitlab:check but it still says that the repositories are empty, am I missing a step or doing something wrong?:

Checking GitLab Shell …

GitLab Shell version >= 2.7.2 ? … OK (2.7.2)
Repo base directory exists? … yes
Repo base directory is a symlink? … no
Repo base owned by git:git? … yes
Repo base access is drwxrws—? … yes
hooks directories in repos are links: …
C-PlusPlus Dev Group / NMM … repository is empty
Python / HamWeb … repository is empty
Android Dev Group / HamDroid … repository is empty
C-Sharp / ContinuumElevatorService … repository is empty
Perl Dev Group / campunt … repository is empty
C-Sharp / Reporting Tool … repository is empty
Perl Dev Group / combox … repository is empty
C-Sharp / HAP Server … repository is empty
C-Sharp / GenetecEventsFromMacro … repository is empty
C-Sharp / HidNumberToUserName … repository is empty
Python / django-nmm … repository is empty
Perl Dev Group / autovapix … repository is empty
Scott Palmer / irisys-counter … repository is empty
C-Sharp / Double Swipe In Out Board … repository is empty
Scott Palmer / IrisysPeopleCounter … repository is empty
C-Sharp / Win-Pak-Db-Upgrade … repository is empty
Python / NMM … repository is empty
Python / SPM Serial Paging Appliance … repository is empty
Miscellaneous Scripts / Django Web Server … repository is empty
Python / Dukane-TAP-EZcall … repository is empty
Axis Dev Group / streamlight … repository is empty
Python / autoconfig … repository is empty
Python / Infinias eIDC32 User Enrollment … repository is empty
Python / dukane-ezcall … repository is empty
Python / netconfig-website … repository is empty
Python / fcwnx-acm … repository is empty
Sql / continuum … repository is empty
Sql / digital-sentry … repository is empty
Sql / facility_commander … repository is empty
Python / Serial pingtest … repository is empty
Plain English / Serial pongtest … repository is empty
Python / ezcall-redir … repository is empty
Miscellaneous Scripts / Icinga Setup … repository is empty
Plain English / program-collection … repository is empty
Ruby / Dashing Contractor Widget … repository is empty
Python / sonitor-api … repository is empty
Python / database … repository is empty
Ruby / Contractor … repository is empty
Miscellaneous Scripts / Sony PTZ via HTML … repository is empty
Python / aewatch … repository is empty
Python / NFC-Document-Parser … repository is empty
Python / brickstream-config … repository is empty
Python / tap-annunciator … repository is empty
Miscellaneous Scripts / Houle Standard PC … repository is empty
Python / TTS Web Config … repository is empty
Miscellaneous Scripts / openlayers-tileserver … repository is empty
C-Sharp / PCCv2 … repository is empty
Python / schedule … repository is empty
Python / Telligence Gateway Emulator … repository is empty
Python / hindsite … repository is empty
ADAM Module GCL / Falling Edge Trigger … repository is empty
Python / mobotix-thermal-server … repository is empty
Python / continuum-alarm-watcher … repository is empty
Python / django-bootstrap3-forms … repository is empty
Python / savVi-GSC-Cameleon … repository is empty
Python / macwatch … repository is empty
Sql / genetec … repository is empty
Python / combox2 … repository is empty
Hardware / Algo Volume Control … repository is empty
How To / postgres … repository is empty
How To / typescript … repository is empty
How To / python logging … repository is empty
Sql / rbh … repository is empty
C Dev Group / tagtester … repository is empty
Network Config / NIHP … repository is empty
C-Sharp / GSC Replicon … repository is empty
Miscellaneous Scripts / nihp-sip … repository is empty
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/var/opt/gitlab/git-data/repositories: OK
/var/opt/gitlab/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.8.24
Send ping to redis server: PONG
gitlab-shell self-check successful

Checking GitLab Shell … Finished

Checking Sidekiq …

Running? … yes
Number of Sidekiq processes … 1

Checking Sidekiq … Finished

Checking Reply by email …

Reply by email is disabled in config/gitlab.yml

Checking Reply by email … Finished

Checking LDAP …

LDAP is disabled in config/gitlab.yml

Checking LDAP … Finished

Checking GitLab …

Git configured with autocrlf=input? … yes
Database config exists? … yes
All migrations up? … yes
Database contains orphaned GroupMembers? … no
GitLab config exists? … yes
GitLab config outdated? … no
Log directory writable? … yes
Tmp directory writable? … yes
Uploads directory setup correctly? … skipped (no tmp uploads folder yet)
Init script exists? … skipped (omnibus-gitlab has no init script)
Init script up-to-date? … skipped (omnibus-gitlab has no init script)
projects have namespace: …
C-PlusPlus Dev Group / NMM … yes
Python / HamWeb … yes
Android Dev Group / HamDroid … yes
C-Sharp / ContinuumElevatorService … yes
Perl Dev Group / campunt … yes
C-Sharp / Reporting Tool … yes
Perl Dev Group / combox … yes
C-Sharp / HAP Server … yes
C-Sharp / GenetecEventsFromMacro … yes
C-Sharp / HidNumberToUserName … yes
Python / django-nmm … yes
Perl Dev Group / autovapix … yes
Scott Palmer / irisys-counter … yes
C-Sharp / Double Swipe In Out Board … yes
Scott Palmer / IrisysPeopleCounter … yes
C-Sharp / Win-Pak-Db-Upgrade … yes
Python / NMM … yes
Python / SPM Serial Paging Appliance … yes
Miscellaneous Scripts / Django Web Server … yes
Python / Dukane-TAP-EZcall … yes
Axis Dev Group / streamlight … yes
Python / autoconfig … yes
Python / Infinias eIDC32 User Enrollment … yes
Python / dukane-ezcall … yes
Python / netconfig-website … yes
Python / fcwnx-acm … yes
Sql / continuum … yes
Sql / digital-sentry … yes
Sql / facility_commander … yes
Python / Serial pingtest … yes
Plain English / Serial pongtest … yes
Python / ezcall-redir … yes
Miscellaneous Scripts / Icinga Setup … yes
Plain English / program-collection … yes
Ruby / Dashing Contractor Widget … yes
Python / sonitor-api … yes
Python / database … yes
Ruby / Contractor … yes
Miscellaneous Scripts / Sony PTZ via HTML … yes
Python / aewatch … yes
Python / NFC-Document-Parser … yes
Python / brickstream-config … yes
Python / tap-annunciator … yes
Miscellaneous Scripts / Houle Standard PC … yes
Python / TTS Web Config … yes
Miscellaneous Scripts / openlayers-tileserver … yes
C-Sharp / PCCv2 … yes
Python / schedule … yes
Python / Telligence Gateway Emulator … yes
Python / hindsite … yes
ADAM Module GCL / Falling Edge Trigger … yes
Python / mobotix-thermal-server … yes
Python / continuum-alarm-watcher … yes
Python / django-bootstrap3-forms … yes
Python / savVi-GSC-Cameleon … yes
Python / macwatch … yes
Sql / genetec … yes
Python / combox2 … yes
Hardware / Algo Volume Control … yes
How To / postgres … yes
How To / typescript … yes
How To / python logging … yes
Sql / rbh … yes
C Dev Group / tagtester … yes
Network Config / NIHP … yes
C-Sharp / GSC Replicon … yes
Miscellaneous Scripts / nihp-sip … yes
Redis version >= 2.8.0? … yes
Ruby version >= 2.1.0 ? … yes (2.1.8)
Your git bin path is “/opt/gitlab/embedded/bin/git”
Git version >= 2.7.3 ? … yes (2.7.4)
Active users: 13

Checking GitLab … Finished

Fixed this issue, seems after you copy over the new repositories into the new git-data/repositories folder, you also need to tell gitlab to import those repos:

sudo gitlab-rake gitlab:import:repos

Then, after I did sudo gitlab-rake gitlab:check I see that there are “wrong or missing hooks” errors.
To fix these I simply ran
sudo -u git -H /opt/gitlab/embedded/service/gitlab-shell/bin/create-hooks

Now after reconfigure (sudo gitlab-ctl reconfigure )
and restart (sudo gitlab-ctl restart)
I see that my repositories show up on my site :slight_smile:

1 Like