Again some trouble to restore back (7.10 Source to 7.10 Omnibus)

Hello again. I have some more trouble to restore backup. This time from 7.10 Source installation to 7.10 Omnibus installation. My background is that I am moving to a newer machine. So what I did is install GitLab 6.5 on a new machine from source (as on old machine), import code (using backup and restore) and upgrade to 7.10 Source. This works fine. On another machine I Installed GitLab 7.10 Omnibus.

What I wanted to do next is do a backup from GitLab 7.10 Source and then restore this backup on GitLab 7.10 Omnibus. I placed the backup file to /var/opt/gitlab/backups/ and ran the following command:

sudo -u git -H gitlab-rake gitlab:backup:restore

However when I run this command on GitLab 7.10 Omnibus (from /var/opt/gitlab) I get errors like this:

psql:/var/opt/gitlab/backups/db/database.sql:108: ERROR:  syntax error at or near "UNLOCK"
LINE 1: UNLOCK TABLES;
...
PG::Error: ERROR:  relation "projects" does not exist
LINE 1: SELECT  "projects".* FROM "projects"   ORDER BY "projects"."...

(there are many errors, I just copied some).

I noticed postgresql in the errors. The GitLab 6.5 installed from source made use of MySql. I do not know what database GitLab installed from Omnibus is using.

Does anyone know what I might be doing wrong?

Ok I think I found my answer here:

It seems the problem is what I assumed; from source database is mysql, omnibus database is postgres.
It is for GitlLab 6.8 however I will try it out and report how it goes.

No, don’t use sudo -u git -H, just gitlab-rake gitlab:backup:restore. All environment variables and users are automatically used by gitlab-rake. The docs have you covered Files · master · GitLab.org / omnibus-gitlab · GitLab

Thanks Axil. I’ll send an update as soon as I’m back home :smile:

It worked :slight_smile: