Commit 635982a87b6c0d39278d4e080b5209ab4ecda859

Authored by Dmitriy Zaporozhets
2 parents af5d0e9e 13dcc390

Merge pull request #3871 from axilleas/backup-fix

Fix errors during backup task. Fix #3785
doc/install/installation.md
@@ -169,6 +169,10 @@ do so with caution! @@ -169,6 +169,10 @@ do so with caution!
169 sudo chmod -R u+rwX tmp/pids/ 169 sudo chmod -R u+rwX tmp/pids/
170 sudo chmod -R u+rwX tmp/sockets/ 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 # Copy the example Puma config 176 # Copy the example Puma config
173 sudo -u git -H cp config/puma.rb.example config/puma.rb 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,7 +45,7 @@ module Backup
45 'encoding' => '--default-character-set', 45 'encoding' => '--default-character-set',
46 'password' => '--password' 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 end 49 end
50 50
51 def pg_env 51 def pg_env