diff --git a/lib/export/exporter.rb b/lib/export/exporter.rb index eb72b4edbda..b444951ae72 100644 --- a/lib/export/exporter.rb +++ b/lib/export/exporter.rb @@ -154,8 +154,8 @@ module Export def build_pg_dump_command db_conf = BackupRestore.database_configuration - password_argument = "PGPASSWORD=#{password}" if db_conf.password.present? - host_argument = "--host=#{host}" if db_conf.host.present? + password_argument = "PGPASSWORD=#{db_conf.password}" if db_conf.password.present? + host_argument = "--host=#{db_conf.host}" if db_conf.host.present? [ password_argument, # pass the password to pg_dump "pg_dump", # the pg_dump command diff --git a/lib/import/importer.rb b/lib/import/importer.rb index 186cdead0a1..ccc3d147a57 100644 --- a/lib/import/importer.rb +++ b/lib/import/importer.rb @@ -202,8 +202,8 @@ module Import def build_psql_command db_conf = BackupRestore.database_configuration - password_argument = "PGPASSWORD=#{password}" if db_conf.password.present? - host_argument = "--host=#{host}" if db_conf.host.present? + password_argument = "PGPASSWORD=#{db_conf.password}" if db_conf.password.present? + host_argument = "--host=#{db_conf.host}" if db_conf.host.present? [ password_argument, # pass the password to psql "psql", # the psql command