Skip to content
Snippets Groups Projects
Commit b58c8778 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

pgsql backup: show database name

parent 86275d05
No related branches found
No related tags found
1 merge request!53pgsql backup: show database name
......@@ -54,7 +54,7 @@ function doPgsqlBackup(){
sSqlGetDblist="select datname from pg_database where not datistemplate and datallowconn order by datname;"
for DATABASE in $(su ${PGUSER} -c "psql -At -c '$sSqlGetDblist' postgres" 2>/dev/null)
do
echo -n "__DB__${SERVICENAME} backup $_dbname ... "
echo -n "__DB__${SERVICENAME} backup $DATABASE ... "
OUTFILE="${BACKUP_TARGETDIR}/$(get_outfile ${DATABASE}).sql"
su ${PGUSER} -c "pg_dump -Fp ${DATABASE} >$OUTFILE"
fetchrc >/dev/null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment