Commit b8983721 authored by andrewwutw's avatar andrewwutw

Fix PostgreSQL database restoration problem (#4217)

Use psql instead of pg_restore to restore SQL dump file.
parent 251945e2
...@@ -26,7 +26,7 @@ module Backup ...@@ -26,7 +26,7 @@ module Backup
system("mysql #{mysql_args} #{config['database']} < #{db_file_name}") system("mysql #{mysql_args} #{config['database']} < #{db_file_name}")
when "postgresql" then when "postgresql" then
pg_env pg_env
system("pg_restore #{config['database']} #{db_file_name}") system("psql #{config['database']} -f #{db_file_name}")
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment