Skip to content

Fix backup restore

Stan Hu requested to merge fix-backup-restore into master

What does this MR do?

This MR fixes the backup restore task.

Are there points in the code the reviewer needs to double check?

Whether the mode 0277 makes sense. (Group SUID + group/user read/write permissions)

Why was this MR needed?

86359ec8 broke this, and it was not caught by any specs. Users would see:

Restoring repositories ...
rake aborted!
NameError: undefined local variable or method `repos_path' for #<Backup::Repository:0x00000007cea1d8>
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/repository.rb:59:in `restore'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:79:in `block (4 levels) in <top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:54:in `block (3 levels) in <top (required)>'
Tasks: TOP => gitlab:backup:repo:restore
(See full trace by running task with --trace)

What are the relevant issue numbers?

#20188 (closed)

Does this MR meet the acceptance criteria?

Merge request reports