Skip to content

Commit

Permalink
Include create statements for the PG dump
Browse files Browse the repository at this point in the history
  • Loading branch information
enyachoke committed Nov 6, 2024
1 parent 67b8380 commit 311bd78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/restic_compose_backup/containers_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit 311bd78

Please sign in to comment.