Thread: running pg_dumpall as superuser fails

running pg_dumpall as superuser fails

From
Josh
Date:
Hello,

I am trying to figure out how to get pg_dumpall to work.  My ultimate goal is to get this running as a cron to backup the DBs nightly.

By the way, I am running PostgreSQL 7.2.4 on redhat 7.3.

My problem is with authentication. I think it ultimately has to do with my pg_hba.conf file.

I am doing this in my shell script:

export PGUSER=superuser
export PGPASSWORD=passwd

(with the real user and passwd of a super user of course)

and the script always bombs saying that the password authentication fails for the user on the database.

I am using plesk 6.0.2 as my contorl panel for hosting, and it creates entries in my pg_hba.conf file like so:

local   mydb1        password        usrs_mydb1
local   mydb2        password        usrs_mydb2
local   mydb3        password        usrs_mydb3

I think this conflicts with running pg_dumpall as a super user.

What can I do to allow the superuser to run pg_dumpall?

Any help is greatly appreciated!

--Josh