borgmatic-base/scripts/pre_postgresql
2021-09-02 13:48:53 -04:00

8 lines
154 B
Bash
Executable file

#!/bin/bash
state=$(nc 127.0.0.1 5400)
if [[ "$state" != "MASTER" ]]; then
/usr/local/sbin/pg_backup -c /etc/postgresql/9.6/main/pg_backup.config
fi