gitlabhq/gitlabhq — pull request #3870 by sdawans (2013-05-07 11:22:59+00:00)
Title: Create public/uploads directory if missing when backup is executed

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.