Unix Technical Forum

automating remote pg_dump

This is a discussion on automating remote pg_dump within the pgsql Admins forums, part of the PostgreSQL category; --> I notice pg_dump does'nt have a '-P' flag to provide a password, so I assume you generally use it ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 01:22 AM
Dick Davies
 
Posts: n/a
Default automating remote pg_dump

I notice pg_dump does'nt have a '-P' flag to provide a password, so I assume
you generally use it to pull data through a socket.

I need to run it remotely (to dump a live db and clone its structure to a test
db for unit testing), has anyone got a way to do this?

I've tried 'echo pass | pg_dump -h host -U user dbname' , but she doesnae like it....

extra points for answers that don't include the word 'expect'

--
'Ugh, it's like there's a party in my mouth and everyone's throwing up.'
-- Fry
Rasputin :: Jack of All Trades - Master of Nuns

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 01:23 AM
Tom Lane
 
Posts: n/a
Default Re: automating remote pg_dump

Dick Davies <rasputnik@hellooperator.net> writes:
> I notice pg_dump does'nt have a '-P' flag to provide a password,


~/.pgpass is the preferred solution.
http://www.postgresql.org/docs/8.0/s...pq-pgpass.html

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:43 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com