Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ansible/files/pgbackrest_config/pgbackrest.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ log-level-console = info
log-level-file = detail
log-subprocess = y
resume = n
# spool-path must share a filesystem with pg_wal so archive-get can hand off WAL segments via rename instead of copy.
spool-path = /data/pgbackrest_spool
start-fast = y
# Note: the [supabase] stanza (pg1-path, pg1-socket-path, pg1-user) has been
# removed from this file. supabase-admin-agent owns that stanza and writes it
Expand Down
8 changes: 6 additions & 2 deletions ansible/files/postgresql_config/sbpostgres_apparmor
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ profile sbpostgres flags=(attach_disconnected) {
/var/lib/postgresql/data/standby.signal rw,
/var/lib/pgbackrest rw,
/etc/pgbackrest/conf.d/** rw,
/var/spool/pgbackrest/** rw,
# bare-dir grant needed alongside ** (same as /data/pgdata/pg_wal/) since ** doesn't cover the directory inode itself
/data/pgbackrest_spool/ rw,
/data/pgbackrest_spool/** rw,
/var/log/pgbackrest/** rw,
/etc/** r,
/usr/local/** r,
Expand Down Expand Up @@ -188,7 +190,9 @@ profile sbpostgres flags=(attach_disconnected) {
/var/lib/postgresql/data/standby.signal rw,
/var/lib/pgbackrest rw,
/etc/pgbackrest/conf.d/** rw,
/var/spool/pgbackrest/** rw,
# bare-dir grant needed alongside ** (same as /data/pgdata/pg_wal/) since ** doesn't cover the directory inode itself
/data/pgbackrest_spool/ rw,
/data/pgbackrest_spool/** rw,
/var/log/pgbackrest/** rw,
/etc/** r,
/usr/local/** r,
Expand Down
3 changes: 2 additions & 1 deletion ansible/tasks/setup-pgbackrest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
# (running as the pgbackrest user) cannot read conf files created by adminapi.
- {dir: /etc/pgbackrest/conf.d, mode: '02770'}
- {dir: /var/lib/pgbackrest}
- {dir: /var/spool/pgbackrest}
# must match spool-path in ansible/files/pgbackrest_config/pgbackrest.conf
- {dir: /data/pgbackrest_spool}
- {dir: /var/log/pgbackrest}
loop_control:
loop_var: backrest_dir
Expand Down
Loading