Commit b898372154fcb1de8b1b2a7e3486a5113ecae19b

Authored by andrewwutw
1 parent 251945e2

Fix PostgreSQL database restoration problem (#4217)

Use psql instead of pg_restore to restore SQL dump file.
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/backup/database.rb
@@ -26,7 +26,7 @@ module Backup @@ -26,7 +26,7 @@ module Backup
26 system("mysql #{mysql_args} #{config['database']} < #{db_file_name}") 26 system("mysql #{mysql_args} #{config['database']} < #{db_file_name}")
27 when "postgresql" then 27 when "postgresql" then
28 pg_env 28 pg_env
29 - system("pg_restore #{config['database']} #{db_file_name}") 29 + system("psql #{config['database']} -f #{db_file_name}")
30 end 30 end
31 end 31 end
32 32