Expect and scripting.

From: Eric Naujock <naujocke(at)abacusii(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Expect and scripting.
Date: 2002-06-24 01:46:00
Message-ID: 20020623T214618Z_E5A300070003@abacusii.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Does anyone have an example of an expect script that could work. For some reason either I am not understanding something about this or My script is just wrong but my pg_sump script does not work with expect.

I have all my databases password protected hence a need for doing this for backup.

Currently this is what I am doing

spawn /usr/bin/pg_dump -U myusername -b -c -F c -f /backup/databasename_sql databasename
expect Password:
send "the_password\r"

any tips or suggestions would be appreciated.

thanks in advance.

--------------------------------------------------------------------------------
Eric Naujock CCNA, CCDA, A+, Network +, I-Net +
Abacus II
5610 Monroe St.
Sylvania, Ohio 43560
<http://www.abacusii.com>
E-mail - naujocke(at)abacusii(dot)com
Phone - 419-885-0082 X 241
Fax : 419-885-2717
AOL IM: erlic

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Aarni Ruuhimäki / Megative Tmi / KYMI.com 2002-06-24 06:03:10 Re: Reliable and scrptable backup to Postgresql databases.
Previous Message John Nix 2002-06-23 18:25:34 Re: Reliable and scrptable backup to Postgresql databases.