problem with restore (undefined method `path_to_repo' for nil:NilClass)
Created by: YenZi
I have a running version 4.1 on one server. Now I set up gitlab version 4.1 on another server and wanted to restore a backup done on the 1st server. However, it fails with this error :
projects ... done
schema_migrations ... done
users_projects ... done
merge_requests ... done
Restoring repositories ...
project/project1 ... [DONE]
project/project2 ... rake aborted!
undefined method `path_to_repo' for nil:NilClass
/home/gitlab/gitlab/lib/tasks/gitlab/backup.rake:161:in `block (5 levels) in <top (required)>'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/batches.rb:21:in `block (2 levels) in find_each'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/batches.rb:21:in `each'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/batches.rb:21:in `block in find_each'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/batches.rb:72:in `find_in_batches'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/relation/batches.rb:20:in `find_each'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.11/lib/active_record/querying.rb:8:in `find_each'
/home/gitlab/gitlab/lib/tasks/gitlab/backup.rake:151:in `block (4 levels) in <top (required)>'
/home/gitlab/gitlab/lib/tasks/gitlab/backup.rake:101:in `block (3 levels) in <top (required)>'
Tasks: TOP => gitlab:backup:repo:restore
(See full trace by running task with --trace)
What's interesting is this: As you can see above, it did restore project/project1. But only because I manually created that directory with following user/group and access rights :
drwsrws--- 7 git git 4096 2013-02-23 13:08 /home/git/repositories/project/project1.git
Before that manual mkdir it the restore already failed on project1. So, I would expect from a restore that it will actually restore a repository if not found in the filesystem, right ?