Fix PostgreSQL database restoration problem (#4217)

Use psql instead of pg_restore to restore SQL dump file.
This commit is contained in:
andrewwutw 2013-06-10 19:06:12 +08:00
parent 251945e2e5
commit b898372154

View file

@ -26,7 +26,7 @@ module Backup
system("mysql #{mysql_args} #{config['database']} < #{db_file_name}")
when "postgresql" then
pg_env
system("pg_restore #{config['database']} #{db_file_name}")
system("psql #{config['database']} -f #{db_file_name}")
end
end