`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.
11 lines
264 B
Desktop File
11 lines
264 B
Desktop File
[Unit]
|
|
Description=PostgreSQL Backup with WAL-G
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
Environment=PGDATA=/var/lib/pgsql/data
|
|
ExecStart=/usr/bin/wal-g-pg backup-push --config /etc/postgresql/wal-g.yml $PGDATA
|
|
User=postgres
|