This commit is contained in:
Bart Sjerps
2026-06-29 09:02:59 +02:00
parent f5824e80e9
commit 9d74e2f4b1
4 changed files with 43 additions and 2 deletions
Executable
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
cd /tmp
test -d /var/lib/pgsql || exit 0
pgrep postgres &>/dev/null || exit 10
tar -jcvf /var/backups/postgres/postgresql-config.tbz2 /var/lib/pgsql/*/data/*.conf
/usr/sbin/runuser postgres -l -s /bin/bash -c '/usr/bin/pg_dumpall > /var/backups/postgres/pgdump.sql'