Backup task should continue on corrupt repositories
Problem
Currently the GitLab backup rake task will abort
the backup in the following situations:
- Corrupt repository
- We fail to call
empty_repo?
on the project as it is corruptRugged::OdbError
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/backup/repository.rb#L17 - requiresrescue
- Executing
git bundle
fails - we callabort
- We fail to call
- Tar'ing the directory fails (unlikely) - https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/backup/repository.rb#L22
Solution
Make the backup task more flexible. In the situations above we should simply mark the backup for that repostiory as "failed" and continue. Administrators would rather have 99 out of 100 repositories backed up if one fails, instead of none.