diff --git a/build/common/commands/restore_backup.py b/build/common/commands/restore_backup.py index ecb2e24d..1fe46ae5 100644 --- a/build/common/commands/restore_backup.py +++ b/build/common/commands/restore_backup.py @@ -203,9 +203,9 @@ def restore_postgres(config, site_config, database_file): psql_command = ["psql", f"postgres://{db_root_user}:{db_root_password}@{db_host}:{db_port}"] print('Restoring PostgreSQL') - run_command(psql_command + ["-c", f"\"DROP DATABASE IF EXISTS \"{db_name}\"\""]) + run_command(psql_command + ["-c", f"\"DROP DATABASE IF EXISTS {db_name}\""]) run_command(psql_command + ["-c", f"\"DROP USER IF EXISTS {db_name}\""]) - run_command(psql_command + ["-c ", f"\"CREATE DATABASE \"{db_name}\"\""]) + 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(["psql", f"{psql_command[-1]}/{db_name}", "<", database_file.replace('.gz', '')])