Skip to content

Commit

Permalink
make pgpassword work with host
Browse files Browse the repository at this point in the history
  • Loading branch information
frankyue committed Sep 7, 2015
1 parent bf70b82 commit 735f9d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/backup/storage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def backup_postgresql
postgresql_set_password = "PGPASSWORD=\"#{postgresql.password}\"" if postgresql.password

tmpfile = Tempfile.new('postgresql.sql')
run_with_changes("ssh #{@ssh_host} '#{postgresql_set_password}; pg_dump -F c #{postgresql_config} > #{tmpfile.path}'", postgresql_set_password) &&
run_with_changes("ssh #{@ssh_host} '#{postgresql_set_password} pg_dump -F c #{postgresql_config} > #{tmpfile.path}'", postgresql_set_password) &&
run_with_changes("scp #{@scp_host}:#{tmpfile.path} '#{backup_file}'") &&
run_with_changes("ssh #{@ssh_host} 'rm #{tmpfile.path}'")

Expand Down

0 comments on commit 735f9d8

Please sign in to comment.