Skip to content

Create public/uploads directory if missing when backup is executed

Created by: sdawans

By default there is no gitlab/public/uploads folder when no attachments are uploaded in any project. This breaks the backup, which supposes that the public/uploads directory exists:

sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
...
Dumping uploads ... 
rake aborted!
No such file or directory - /home/git/gitlab/public/uploads

This fix creates the public/uploads folder in Backup::Uploads.dump if non-existant.

Merge request reports

Loading