Actions
Bug #17974
openPostgreSQL restore task is executed twice
Status:
New
Priority:
Normal
Assignee:
-
Category:
Rake tasks
Target version:
-
Description
In the postgres_import method, we run the pg_restore twice. Second run will likely fail.
def postgres_import(file, config) cmd = "pg_restore -d #{config['database']} -U #{config['username']} --clean" cmd += " -h #{config['host']} " if config['host'].present? cmd += " -p #{config['port']} " if config['port'].present? cmd += " #{file}" system({'PGPASSWORD' => config['password']}, cmd) system(cmd) end
Also it's not clear if users should migrate database first (then we are missing --data-only option) or users should make sure database is created prior restore (then they need to call something like db:drop).
No data to display
Actions