Re: Help automate pg_dump - Mailing list pgsql-general

From Bjoern Metzdorf
Subject Re: Help automate pg_dump
Date
Msg-id 034d01c216d3$62eb6620$81c206d4@office.turtleentertainment.de
Whole thread Raw
In response to Re: Help automate pg_dump  (terry@greatgulfhomes.com)
List pgsql-general
> Please let the list know if you get a solution, I am about to go to 7.2 on
> my production machines but that could be a show stopper if the cron job
> cannot automatically back it up anymore.

You might try this with expect (customizing necessary):

#!/usr/bin/expect -f
# wrapper to make passwd(1) be non-interactive
# username is passed as 1st arg, passwd as 2nd

set password xxx
spawn /usr/bin/psql -d db
expect "password:"
sleep 1
send "$password\r"
expect "password:"
sleep 1
send "$password\r"
expect eof



Greetings,
Bjoern



pgsql-general by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Are there any "official" PostgreSQL banners available.
Next
From: "Bjoern Metzdorf"
Date:
Subject: db grows and grows