supply user/pass to pg_dump noninteractive
Started by Peter Pilslalmost 25 years ago2 messagesgeneral
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 ?
thnx,
peter
--
mag. peter pilsl
phone: +43 676 3574035
fax : +43 676 3546512
email: pilsl@goldfisch.at
sms : pilsl@max.mail.at
pgp-key available
Re: supply user/pass to pg_dump noninteractive
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