From c67fc024521a8d822733b3de64f6f934d5afed98 Mon Sep 17 00:00:00 2001 From: "Chinmay D. Pai" Date: Thu, 9 Jul 2020 22:57:12 +0530 Subject: [PATCH] fix: make changes to psql restore Signed-off-by: Chinmay D. Pai --- build/common/commands/restore_backup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/common/commands/restore_backup.py b/build/common/commands/restore_backup.py index dc7333e0..79d4ea0a 100644 --- a/build/common/commands/restore_backup.py +++ b/build/common/commands/restore_backup.py @@ -209,7 +209,7 @@ def restore_postgres(config, site_config, database_file): run_command(psql_command + ["-c ", f"\"CREATE DATABASE \"{db_name}\"\""]) run_command(psql_command + ["-c", f"\"CREATE user {db_name} password '{db_password}'\""]) run_command(psql_command + ["-c", f"\"GRANT ALL PRIVILEGES ON DATABASE \"{db_name}\" TO {db_name}\""]) - run_command([f"{psql_command}/{db_name}", "<", database_file.replace('.gz', '')]) + run_command(["psql", f"{psql_command[-1]}/{db_name}", "<", database_file.replace('.gz', '')]) def restore_mariadb(config, site_config, database_file):