From b898372154fcb1de8b1b2a7e3486a5113ecae19b Mon Sep 17 00:00:00 2001 From: andrewwutw Date: Mon, 10 Jun 2013 19:06:12 +0800 Subject: Fix PostgreSQL database restoration problem (#4217) Use psql instead of pg_restore to restore SQL dump file. --- lib/backup/database.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/backup') diff --git a/lib/backup/database.rb b/lib/backup/database.rb index 2c43ed4f6e0..c4fb2e2e159 100644 --- a/lib/backup/database.rb +++ b/lib/backup/database.rb @@ -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 -- cgit v1.2.1