gitlabgitlab-omnibusgitlab-8

GitLab 8.15.0 restore backup not working


I am trying to restore a backup from gitlab A into gitlab B. They are on the same version (8.15.0) but when I try to restore using this commands:

sudo gitlab-ctl stop sidekiq
sudo gitlab-ctl stop unicorn
sudo gitlab-rake gitlab:backup:restore BACKUP=1482434794_2016_12_22

I get the following error:

rake aborted!
TypeError: no implicit conversion of nil into String
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:122:in `exist?'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:122:in `unpack'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:32:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
Tasks: TOP => gitlab:backup:restore
(See full trace by running task with --trace)

The server have a clean install just with the root user created. Git lab is running and I already have run once:

sudo gitlab-ctl reconfigure

I am using ubuntu 16.04 LTS and installed Omnibus version. The command I use to make the backup is

sudo gitlab-rake gitlab:backup:create

And the generated file is like this:

1482434794_2016_12_22_gitlab_backup.tar

Any idea of what I'm doing wrong? Thanks for helping


Solution

  • If you put only one backup in /var/opt/gitlab/backups/ you can use command sudo gitlab-rake gitlab: backup: restore without BACKUP = 1482434794_2016_12_22.

    This helped in my case.