Migrate GitLab from old to new machine


I am migrating GitLab and the projects I have on this from an old machine to a new machine. On the new machine I have installed the same GitLab version as I have on the old machine, i.e. - GitLab version 6.5.

I have searched over the Internet on how I can do this migrate from old machine to new machine. I found the following page: [2] https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md

So I confirmed that GitLab on the new machine is working fine. I created a test project, commit code changes, etc. On the old machine I ran the following command:

sudo su
bundle exec rake gitlab:backup:create RAILS_ENV=production

I copied the generated file to /home/git/gitlab/tmp/backups (only one file) and ran the following command on the new machine:

sudo su
bundle exec rake gitlab:backup:restore RAILS_ENV=production

When I log in to GitLab on the new machine I can see the same history as on the old machine. However when I click on a project, in the project details page it is as if the project does not have any files!

Can anyone tell me if the steps I have taken are correct and if not what I might do to make this work?

Hmm it should work, but given that you use an old version, the backup script might be broken somehow. There have been many changes since then.

Can you post the output of the backup run, omitting any sensitive information??

Thanks axil, I tried it again and it worked. What I did wrong is I did not the backup import with the git user but root user. So the correct syntax is the following:

sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production