supply user/pass to pg_dump noninteractive

supply user/pass to pg_dump noninteractive

Post by Peter Pil » Sun, 22 Apr 2001 23:36:37



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


pgp-key available

---------------------------(end of broadcast)---------------------------

 
 
 

supply user/pass to pg_dump noninteractive

Post by Peter Eisentra » Sun, 22 Apr 2001 23:57:23


Quote: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

--

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

 
 
 

1. pgsql-server/src/bin/pg_dump pg_dump.c pg_dump ...

CVSROOT:        /cvsroot
Module name:    pgsql-server

Modified files:
        src/bin/pg_dump: pg_dump.c pg_dumpall.c pg_restore.c

Log message:
        Break up the long usage messages in pg_dump and pg_restore and
        unify the wording, to make life easier for translators.

        from Dennis Bjorklund

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

2. Help!!

3. pgsql/src/bin/pg_dump pg_dump.c pg_dump.h

4. Performance advice ?

5. recursive sql statement

6. pgsql-server/src/bin/pg_dump pg_dump.c pg_dump.h

7. connection timeout on long running queries

8. pgsql-server/src/bin/pg_dump pg_dump.c pg_dump ...

9. pgsql/src/bin/pg_dump common.c pg_dump.c pg_dump.h

10. pgsql/src/bin/pg_dump pg_dump.c pg_dump.h

11. pgsql/src/bin/pg_dump (common.c pg_backup_archiver.h pg_dump.c pg_dump.h)

12. pgsql/src/bin/pg_dump pg_dump.c pg_dump.h