borgmatic-base/scripts/pre_postgresql

9 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