Migrating to gitlab-ce docker (repository is empty)

I have been trying to migrate our manualy installed Gitlab 9.4.2 into a docker gitlab-ce omnibus image 9.4.2. It should be noted, that our manually installed gitlab is running against MariaDB. I am hoping make the upgrades easier in the future.

I have been following this manual from Gitlab. Our old installation is backing up regularly the “default gitlab way”.

If I take the backup to the new server and use the regular ‘gitlab-rake gitlab:backup:restore’, I get asked if it can drop all the tables from the db. If I confirm, I end up with never ending

Restoring PostgreSQL database gitlabhq_production … ERROR: syntax error at or near “" LINE 1: DROP TABLE IF EXISTS abuse_reports; ^ ERROR: syntax error at or near "
LINE 1: CREATE TABLE abuse_reports (
ERROR: syntax error at or near “" LINE 1: LOCK TABLES abuse_reports WRITE; ^ ERROR: syntax error at or near "UNLOCK" LINE 1: UNLOCK TABLES; ^ ERROR: syntax error at or near "
ERROR: syntax error at or near "" LINE 1: CREATE TABLE appearances` (

If i don’t allow the tables to be droped, I just end up with a message saying that the restore has been user aborted and nothing happens.

If I open the 5432 port and use it to transfer the data from the old MariaDB to the new Postgresql using the “pgloader”, despite some errors during the transfer I am able to log into the docker version of gitlab with my regular username and password. That is encouraging.

But I can’t figure out how to move repositories into the new location. If I simply copy them to the appropriate dir, the “docker gitlab” sill claims that “The repository for this project does not exist”. If I run gitlab-rake gitlab:check it always fails on the task “hooks directories in repos are links” followed by a list of repositories, each line ending with ... repository is empty.

Is there a method how to transfer only repositories (this looks great, but I fear it is only available in a higher version of gitlab-ce)

Is it even possible to migrate from manually instaled gitlab with MariaDB to docker controled gitlab-ce omnibus? Can it be, that since we once started to use the manually installed version, we are condemned to use it forever?

Also, Isn’t there a verson of this document (the backup/restore), that would actually state what part of the backed-up .tar file belongs where?

gitlab-rake gitlab:shell:create_hooks doesn’t help either :frowning:


could have figured out this one myself. What I have needed to do was to decompress the backup tar file, convert the db/database.sql.gz from sql to postgresql, repack the backup archive and it works out of the box !

More details here: http://theterminallife.com/migrating-gitlab-to-gitlab-omnibus/