Re: supply user/pass to pg_dump noninteractive - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: supply user/pass to pg_dump noninteractive
Date
Msg-id Pine.LNX.4.30.0104211706350.758-100000@peter.localdomain
Whole thread Raw
In response to supply user/pass to pg_dump noninteractive  (Peter Pilsl <pilsl@goldfisch.at>)
List pgsql-general
Peter Pilsl writes:

> for backup-purposes I'd like to run pg_dump in a script. Is there any
> easy way to provide the user/pass-information noninteractive or do I
> need to change the source/provide a wrapper ?

Try one of

export PGPASSWORD=foo
pg_dump

or

(echo "username"; echo "password") | pg_dump

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter


pgsql-general by date:

Previous
From: Richard Eicher II
Date:
Subject: 64 character column name's
Next
From: Peter Eisentraut
Date:
Subject: Re: 64 character column name's