diff options
author | Axilleas Pipinellis <axilleas@archlinux.gr> | 2013-05-07 09:14:03 +0300 |
---|---|---|
committer | Axilleas Pipinellis <axilleas@archlinux.gr> | 2013-05-07 14:44:49 +0300 |
commit | 13dcc390cb1f930b42d62ad273d6c157fd90cc72 (patch) | |
tree | 925e334b29864e496ca8b44649f9d65f08945479 | |
parent | 53413f128d049a7f45e4b3daf3dd0c3408a777e9 (diff) | |
download | gitlab-ce-13dcc390cb1f930b42d62ad273d6c157fd90cc72.tar.gz |
Fix errors during backup task. Fix #3785
By default there is no public/uploads directory when no attachments
are uploaded. Prompt users to create the uploads directory during
install otherwise the backup task will fail.
Place mysqldump args in single quotes to avoid error if password
contains special characters.
Signed-off-by: Axilleas Pipinellis <axilleas@archlinux.gr>
-rw-r--r-- | doc/install/installation.md | 4 | ||||
-rw-r--r-- | lib/backup/database.rb | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/doc/install/installation.md b/doc/install/installation.md index 9734034bf84..19c613e5bba 100644 --- a/doc/install/installation.md +++ b/doc/install/installation.md @@ -169,6 +169,10 @@ do so with caution! sudo chmod -R u+rwX tmp/pids/ sudo chmod -R u+rwX tmp/sockets/ + # Create 'uploads' directory otherwise backup will fail + sudo -u git -H mkdir public/uploads + sudo chmod -R u+rwX public/uploads + # Copy the example Puma config sudo -u git -H cp config/puma.rb.example config/puma.rb diff --git a/lib/backup/database.rb b/lib/backup/database.rb index cfa9971670c..2c43ed4f6e0 100644 --- a/lib/backup/database.rb +++ b/lib/backup/database.rb @@ -45,7 +45,7 @@ module Backup 'encoding' => '--default-character-set', 'password' => '--password' } - args.map { |opt, arg| "#{arg}=#{config[opt]}" if config[opt] }.compact.join(' ') + args.map { |opt, arg| "#{arg}='#{config[opt]}'" if config[opt] }.compact.join(' ') end def pg_env |