Skip to content

Commit

Permalink
Add Clean
Browse files Browse the repository at this point in the history
  • Loading branch information
enyachoke committed Nov 6, 2024
1 parent ec7d9a2 commit dd85c53
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 --clean --if-exists --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 dd85c53

Please sign in to comment.