Skip to content

Commit

Permalink
Merge pull request #58 from xsnippet/backup-format
Browse files Browse the repository at this point in the history
postgres: change backup format from plain SQL to pg_dump custom
  • Loading branch information
malor authored Nov 16, 2024
2 parents a8b2356 + 976b4e4 commit e682fe4
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 @@ -8,5 +8,5 @@ User = postgres
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"
ExecStart = /usr/bin/bash -c "/usr/bin/pg_dump --compress=9 --format=c --file=%i_$(TZ=UTC date +%%Y%%m%%d-%%H%%M%%S).pgc %i"
ExecStartPost = /usr/bin/python3 /usr/local/bin/rotate.py --no-dry-run --keep 30 --dir {{ postgres_backups_dir }}

0 comments on commit e682fe4

Please sign in to comment.