From 311bd782a9f0fdd2a5a3a241d44ca1b47f643d0e Mon Sep 17 00:00:00 2001 From: Emmanuel Nyachoke Date: Wed, 6 Nov 2024 07:09:13 +0000 Subject: [PATCH] Include create statements for the PG dump --- src/restic_compose_backup/containers_db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/restic_compose_backup/containers_db.py b/src/restic_compose_backup/containers_db.py index 970dae7..79ed83b 100755 --- a/src/restic_compose_backup/containers_db.py +++ b/src/restic_compose_backup/containers_db.py @@ -208,7 +208,7 @@ def dump_command_str(self) -> str: """list: create a dump command restic and use to send data through stdin""" # NOTE: Backs up a single database from POSTGRES_DB env var creds = self.get_credentials() - return f"pg_dumpall --host={creds['host']} --port={creds['port']} --username={creds['username']} > {self.backup_destination_path()}" + return f"pg_dumpall --create --host={creds['host']} --port={creds['port']} --username={creds['username']} > {self.backup_destination_path()}" def restore_command_str(self) -> str: """list: create a restore command to restore database dump from restic"""