blob: dad940141a702b13c4c01e86ab25b8c476682e62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/bin/sh
# To dump pgsql databases make sure to export the following variables.
# This can be done from /etc/lbu/rbu.conf or add it to this file.
# PGUSER, PGPASSWORD, PGHOST, PGDATABASE
# Set GZIP to pigz for multi core compression (if installed)
if [ -n "$PGPASSWORD" ]; then
echo "Dumping PostgreSQL database to: $RBU_CACHE"
pg_dump | ${GZIP:-gzip} > "$RBU_CACHE"/dump.sql.gz
else
echo "PostgreSQL password not set, skipping pg_dump."
fi
|