Draft
Conversation
8f44ad4 to
2370c92
Compare
hunleyd
requested changes
Mar 31, 2026
Comment on lines
+27
to
+31
| to-pgbackrest) | ||
| exec /usr/bin/chown -R pgbackrest:pgbackrest "$REAL" | ||
| ;; | ||
| to-postgres) | ||
| exec /usr/bin/chown -R postgres:postgres "$REAL" |
Contributor
There was a problem hiding this comment.
Suggested change
| to-pgbackrest) | |
| exec /usr/bin/chown -R pgbackrest:pgbackrest "$REAL" | |
| ;; | |
| to-postgres) | |
| exec /usr/bin/chown -R postgres:postgres "$REAL" | |
| to-pgbackrest|to-postgres) | |
| exec /usr/bin/chown -R ${ACTION:3}:postgres "$REAL" ;; |
we've been setting everything to group postgres thus far
Contributor
Author
There was a problem hiding this comment.
The pgBackRest binary in the wrapper is executed as the pgbackrest user so the PGDATA path needs to be altered for restores and relics setup.
Contributor
There was a problem hiding this comment.
i get that. it'd still be owner pgbackrest with my change?
Comment on lines
+20
to
+21
| recovery) FILE="/data/pgdata/recovery.signal" ;; | ||
| standby) FILE="/data/pgdata/standby.signal" ;; |
Contributor
There was a problem hiding this comment.
Suggested change
| recovery) FILE="/data/pgdata/recovery.signal" ;; | |
| standby) FILE="/data/pgdata/standby.signal" ;; | |
| recovery|standby) FILE="/data/pgdata/${SIGHNAL_TYPE}.signal" ;; |
Comment on lines
+28
to
+30
| case "$ACTION" in | ||
| create) exec /usr/bin/touch "$FILE" ;; | ||
| remove) exec /usr/bin/rm -f "$FILE" ;; |
Contributor
There was a problem hiding this comment.
if you make ACTION either touch or rm then you can:
Suggested change
| case "$ACTION" in | |
| create) exec /usr/bin/touch "$FILE" ;; | |
| remove) exec /usr/bin/rm -f "$FILE" ;; | |
| case "$ACTION" in | |
| touch|rm) exec /usr/bin/${ACTION} -f "$FILE" ;; |
Comment on lines
43
to
+67
| - name: Create needed directories for pgBackRest | ||
| ansible.legacy.file: | ||
| group: postgres | ||
| mode: '0770' | ||
| owner: pgbackrest | ||
| path: "{{ backrest_dir }}" | ||
| state: directory | ||
| loop: | ||
| - /etc/pgbackrest/conf.d | ||
| - /var/lib/pgbackrest | ||
| - /var/spool/pgbackrest | ||
| - /var/log/pgbackrest | ||
| loop_control: | ||
| loop_var: backrest_dir | ||
| when: | ||
| - nixpkg_mode | ||
|
|
||
| - name: Create pgBackRest conf.d directory with setgid | ||
| ansible.legacy.file: | ||
| group: postgres | ||
| mode: '02770' | ||
| owner: pgbackrest | ||
| path: /etc/pgbackrest/conf.d | ||
| state: directory | ||
| when: | ||
| - nixpkg_mode |
Contributor
There was a problem hiding this comment.
Suggested change
| - nixpkg_mode | |
| - name: Create needed directories for pgBackRest | |
| ansible.legacy.file: | |
| group: postgres | |
| mode: "{{ backrest_dir['mode'] | default('0770', true) }}" | |
| owner: pgbackrest | |
| path: "{{ backrest_dir['dir'] }}" | |
| state: directory | |
| loop: | |
| - { dir: /etc/pgbackrest/conf.d, mode: '02770' } | |
| - { dir: /var/lib/pgbackrest } | |
| - { dir: /var/spool/pgbackrest } | |
| - { dir: /var/log/pgbackrest } | |
| when: | |
| - nixpkg_mode |
Comment on lines
+95
to
+100
| ansible.legacy.copy: | ||
| src: files/pgbackrest_config/pgbackrest.logrotate | ||
| dest: /etc/logrotate.d/pgbackrest | ||
| owner: root | ||
| group: root | ||
| mode: '0644' |
Contributor
There was a problem hiding this comment.
Suggested change
| ansible.legacy.copy: | |
| src: files/pgbackrest_config/pgbackrest.logrotate | |
| dest: /etc/logrotate.d/pgbackrest | |
| owner: root | |
| group: root | |
| mode: '0644' | |
| ansible.legacy.copy: | |
| dest: /etc/logrotate.d/pgbackrest | |
| group: root | |
| mode: '0644' | |
| owner: root | |
| src: files/pgbackrest_config/pgbackrest.logrotate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Additional config for
pgBackRestbackups and restores. Details further in: https://linear.app/supabase/issue/INDATA-403/admin-agent-add-new-command-to-control-pgbackrest