From f6407bafcb56aa3af46fa750e55bb3c3e58df466 Mon Sep 17 00:00:00 2001 From: Nathan Beals Date: Fri, 10 Apr 2020 11:20:46 -0400 Subject: [PATCH] Remove the `--create` flag, was causing an error --- borgmatic/hooks/postgresql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/borgmatic/hooks/postgresql.py b/borgmatic/hooks/postgresql.py index 5f9546a..e308076 100644 --- a/borgmatic/hooks/postgresql.py +++ b/borgmatic/hooks/postgresql.py @@ -103,7 +103,7 @@ def restore_database_dumps(databases, log_prefix, location_config, dry_run): ) restore_command = ( ('psql' if all_databases else 'pg_restore', '--no-password') - + (('--if-exists', '--exit-on-error', '--clean', '--create', '--dbname', database['name']) if not all_databases else ()) + + (('--if-exists', '--exit-on-error', '--clean', '--dbname', database['name']) if not all_databases else ()) + (('--host', database['hostname']) if 'hostname' in database else ()) + (('--port', str(database['port'])) if 'port' in database else ()) + (('--username', database['username']) if 'username' in database else ())