Thread: Scripting a pg_dumpall/pg_dump backup using bash or perl
Dear all, This is my first post. 2 questions: 1. How can I script the above so passwords aren't asked for? 2. Is bash or perl better, i.e. should I need DBI? Thanks. -- Kind Regards, Gavin Henry. Managing Director. T +44 (0) 1467 624141 M +44 (0) 7930 323266 F +44 (0) 1224 742001 E ghenry@suretecsystems.com Open Source. Open Solutions(tm). http://www.suretecsystems.com/
am Thu, dem 03.02.2005, um 9:52:35 -0000 mailte Gavin Henry folgendes: > Dear all, > > This is my first post. 2 questions: > > 1. How can I script the above so passwords aren't asked for? You can edit the pg_hba.con and make the client 'trust'. Or you can tools like http://www.edlsystems.com/shellsql/. Or you can use tools like expect. > 2. Is bash or perl better, i.e. should I need DBI? This is your decision ;-) Andreas -- Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau- fenden Pinguins aus artgerechter Freilandhaltung. Er ist garantiert frei von Micro$oft'schen Viren. (#97922 http://counter.li.org) GPG 7F4584DA Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)
"Gavin Henry" <ghenry@suretecsystems.com> writes: > 1. How can I script the above so passwords aren't asked for? The cleanest solution is to put the password in a ~/.pgpass file so the script doesn't need to know it at all. Or you can think about using non-password-based auth methods, such as IDENT. regards, tom lane