first commit
This commit is contained in:
14
postgresql-dump@.service
Normal file
14
postgresql-dump@.service
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=PostgreSQL dump for %i
|
||||
Requires=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=postgres
|
||||
Group=postgres
|
||||
ExecStartPre=/usr/bin/test -d /srv/backups/postgresql/daily
|
||||
ExecStart=/bin/sh -c "/usr/bin/pg_dump -Fc %i > /srv/backups/postgresql/daily/%i.sql && /usr/bin/pg_dumpall --globals-only > /srv/backups/postgresql/daily/postgres-globals.sql"
|
||||
|
||||
[Install]
|
||||
WantedBy=postgresql-dump.target
|
||||
|
||||
Reference in New Issue
Block a user