blob: a7f7f3d593499d4f06832cfacc799e882550d0ac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
[Unit]
Description=Dump of PostgreSQL Cluster %i
AssertPathExists=/etc/postgresql/%I/postgresql.conf
Wants=postgresql@%i.service
After=postgresql@%i.service
RequiresMountsFor=/var/backups/postgresql
[Service]
Type=oneshot
User=postgres
Environment="KEEP=3"
ExecStartPre=+/usr/bin/pg_backupcluster %i createdirectory
ExecStart=/usr/bin/pg_backupcluster %i dump
ExecStart=/usr/bin/pg_backupcluster %i expiredumps $KEEP
|