summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2017-02-20 11:52:51 +0100
committerPeter Palfrader <peter@palfrader.org>2017-02-20 11:52:51 +0100
commitd127316c21e7cc245e44f4d1bc313f0c61e308ba (patch)
tree9f7517ec933ca8d72352505c7a106d592abe84e9
parentb0145d0a8cc4220009b6171b81c2d9331dad4545 (diff)
cd to / before calling psqlHEADmaster
-rwxr-xr-xbackup-pg1
1 files changed, 1 insertions, 0 deletions
diff --git a/backup-pg b/backup-pg
index 18c762c..8debbc8 100755
--- a/backup-pg
+++ b/backup-pg
@@ -64,6 +64,7 @@ else
exit 1
fi
+cd /
$SUDO psql $PORT --quiet --no-align --tuples-only --command "SELECT datname FROM pg_database" |
while read db; do
if [ "$db" = "template0" -o "$db" = "template1" ] ; then