password option in pg_dumpall
password option in pg_dumpall
От:
"rkmr.em@gmail.com" <rkmr.em@gmail.com>
Дата:
is there anyway of specifying password in the command line interface of pg_dumpall?? this my script, and it asks for password for every host... thanks ''' #!/bin/sh for line in `cat /home/mark/work/infrastructure/farm_all` do pg_dumpall -h $line -U postgres | bzip2 > "$line.bz2" done '''
Re: password option in pg_dumpall
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"rkmr.em@gmail.com" writes: > is there anyway of specifying password in the command line interface > of pg_dumpall?? No, and you wouldn't want to use it if there was (hint: putting a password on a command line is insecure). The recommended procedure to avoid a lot of password prompts is to set up a ~/.pgpass file: http://www.postgresql.org/docs/8.2/static/libpq-pgpass.html regards, tom lane