postgres backup script and popen2

Nikita the Spider NikitaTheSpider at gmail.com
Thu Feb 8 14:44:49 EST 2007


In article <1170951829.472924.65040 at q2g2000cwa.googlegroups.com>,
 "Gabriel Genellina" <gagsl-py at yahoo.com.ar> wrote:

> On 8 feb, 10:27, Maël Benjamin Mettler <m... at mediamonger.ch> wrote:
> 
> > flupke schrieb:
> > > i made a backup script to backup my postgres database.
> > > Problem is that it prompts for a password. It thought i
> > > could solve this by using popen2.
> >
> > Use pexpect:http://pexpect.sourceforge.net/
> 
> pexpect could work. But a better way would be to supply the password
> on the command line. I don't know how postgres does that things, but I
> hope there is some way to automate the backup process...

See the Postgres documentation for the .pgpass  file.

-- 
Philip
http://NikitaTheSpider.com/
Whole-site HTML validation, link checking and more



More information about the Python-list mailing list