r/wal-g-pg: Run wal-g backup as postgres

`wal-g` needs to connect to the PostgreSQL database system, so it should
run as the _postgres_ user, who has permission to connect, rather than
_root_, who does not.
This commit is contained in:
2024-08-30 09:44:43 -05:00
parent ab5da58175
commit 2e37fce4f6

View File

@@ -7,3 +7,4 @@ After=network-online.target
Type=oneshot Type=oneshot
Environment=PGDATA=/var/lib/pgsql/data Environment=PGDATA=/var/lib/pgsql/data
ExecStart=/usr/bin/wal-g-pg backup-push --config /etc/postgresql/wal-g.yml $PGDATA ExecStart=/usr/bin/wal-g-pg backup-push --config /etc/postgresql/wal-g.yml $PGDATA
User=postgres