Commit 13dcc390cb1f930b42d62ad273d6c157fd90cc72
1 parent
53413f12
Exists in
master
and in
4 other branches
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>
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
doc/install/installation.md
... | ... | @@ -169,6 +169,10 @@ do so with caution! |
169 | 169 | sudo chmod -R u+rwX tmp/pids/ |
170 | 170 | sudo chmod -R u+rwX tmp/sockets/ |
171 | 171 | |
172 | + # Create 'uploads' directory otherwise backup will fail | |
173 | + sudo -u git -H mkdir public/uploads | |
174 | + sudo chmod -R u+rwX public/uploads | |
175 | + | |
172 | 176 | # Copy the example Puma config |
173 | 177 | sudo -u git -H cp config/puma.rb.example config/puma.rb |
174 | 178 | ... | ... |
lib/backup/database.rb
... | ... | @@ -45,7 +45,7 @@ module Backup |
45 | 45 | 'encoding' => '--default-character-set', |
46 | 46 | 'password' => '--password' |
47 | 47 | } |
48 | - args.map { |opt, arg| "#{arg}=#{config[opt]}" if config[opt] }.compact.join(' ') | |
48 | + args.map { |opt, arg| "#{arg}='#{config[opt]}'" if config[opt] }.compact.join(' ') | |
49 | 49 | end |
50 | 50 | |
51 | 51 | def pg_env | ... | ... |