Skip to content

Fixes error when creating a backup and public/uploads doesn't exist.

Matthias Käppler requested to merge github/fork/axilleas/backup-fix into master

Created by: axilleas

If there is not a public/uploads directory, backup fails with:

Dumping uploads ...
rake aborted!
No such file or directory - /home/git/gitlab/public/uploads

Reported in the forum.

This PR checks if there is a public/uploads directory during backup.

Note: The uploads dir is created during backup even if there is nothing into it. We could get the dir creation inside the if loop, but then we should add another if loop in backup.rake and change the tar command to exclude the uploads dir. Since the dir is empty there is no harm creating it in the first place.

Merge request reports