mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-30 04:36:39 +00:00
fix: Couldn't restore postgres from backup
This commit is contained in:
parent
914b392b1d
commit
f7c3441314
|
@ -25,11 +25,10 @@ class PostgresDumper:
|
|||
def restore_database(self, backup_file: str):
|
||||
restore_command = [
|
||||
"pg_restore",
|
||||
"--dbname=postgresql://{}@{}/{}".format(
|
||||
self.user, self.socket_dir, self.db_name
|
||||
),
|
||||
f"--dbname=postgresql://{self.user}@{self.socket_dir}",
|
||||
"--clean",
|
||||
"--create",
|
||||
"--exit-on-error",
|
||||
backup_file,
|
||||
]
|
||||
subprocess.run(restore_command, check=True)
|
||||
|
|
Loading…
Reference in a new issue