mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
BUGFIX: restore wasn't working when not using multisite in production
This commit is contained in:
@ -203,15 +203,16 @@ module Import
|
||||
db_conf = BackupRestore.database_configuration
|
||||
|
||||
password_argument = "PGPASSWORD=#{db_conf.password}" if db_conf.password.present?
|
||||
host_argument = "--host=#{db_conf.host}" if db_conf.host.present?
|
||||
host_argument = "--host=#{db_conf.host}" if db_conf.host.present?
|
||||
username_argument = "--username=#{db_conf.username}" if db_conf.username.present?
|
||||
|
||||
[ password_argument, # pass the password to psql
|
||||
[ password_argument, # pass the password to psql (if any)
|
||||
"psql", # the psql command
|
||||
"--dbname='#{db_conf.database}'", # connect to database *dbname*
|
||||
"--file='#{@dump_filename}'", # read the dump
|
||||
"--single-transaction", # all or nothing (also runs COPY commands faster)
|
||||
host_argument, # the hostname to connect to
|
||||
"--username=#{db_conf.username}" # the username to connect as
|
||||
host_argument, # the hostname to connect to (if any)
|
||||
username_argument # the username to connect as (if any)
|
||||
].join(" ")
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user