fix: Couldn't restore postgres from backup

This commit is contained in:
Inex Code 2024-12-23 22:15:24 +03:00
parent 914b392b1d
commit f7c3441314
No known key found for this signature in database

View file

@ -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)