Skip to content

Commit

Permalink
Actually run backup rotation in [email protected]
Browse files Browse the repository at this point in the history
Dry run example:

```shell
Dry run. No changes will be made.

Used space: 30 files, 133682908 bytes
Freed space: 34 files, 151342898 bytes
```
  • Loading branch information
malor committed Sep 12, 2024
1 parent 18762c1 commit 8689e2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion roles/postgres/templates/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ Group = postgres
WorkingDirectory = {{ postgres_backups_dir }}
ExecStartPre = +/usr/bin/chown postgres:postgres {{ postgres_backups_dir }}
ExecStart = /usr/bin/bash -c "/usr/bin/pg_dump --compress=9 --no-owner --format=p --file=%i_$(TZ=UTC date +%%Y%%m%%d-%%H%%M%%S).sql.gz %i"
ExecStartPost = /usr/bin/python3 /usr/local/bin/rotate.py --keep 30 --dir {{ postgres_backups_dir }}
ExecStartPost = /usr/bin/python3 /usr/local/bin/rotate.py --no-dry-run --keep 30 --dir {{ postgres_backups_dir }}

0 comments on commit 8689e2d

Please sign in to comment.