By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,373 Members | 1,984 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,373 IT Pros & Developers. It's quick & easy.

problems dumping from one server 2 another

P: n/a
Hi!

Can't get the

sudo -u user1 /usr/local/bin/pg_dump db1 | /usr/local/bin/psql -U user2
-h host2 db2

to work.

Only thing that happens is that I get multiple passwordprompts, and
then I gets told that the password is incorrect…

Would appreciate quick help,

sincerely

Victor Spång Arthursson

Copenhagen, Denmark and Malmoe, Sweden

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Friday 09 January 2004 14:38, Victor Spång Arthursson wrote:
Hi!

Can't get the

sudo -u user1 /usr/local/bin/pg_dump db1 | /usr/local/bin/psql -U user2
-h host2 db2

to work.

Only thing that happens is that I get multiple passwordprompts, and
then I gets told that the password is incorrect…


You probably want a .pgpass file - see the section on libpq in the manuals
(client interfaces / libpq / files)

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #2

P: n/a

2004-01-10 kl. 00.21 skrev Richard Huxton:
Can't get the

sudo -u user1 /usr/local/bin/pg_dump db1 | /usr/local/bin/psql -U
user2
-h host2 db2

to work.

Only thing that happens is that I get multiple passwordprompts, and
then I gets told that the password is incorrect…


You probably want a .pgpass file - see the section on libpq in the
manuals
(client interfaces / libpq / files)


Hi and thanks for the tip!

Have created my .pgpass-file, and is able to connect as well to my
local server as to my remote server, each for them self.

This:

/usr/local/bin/psql -U user_local db_local

and:

/usr/local/bin/psql -U user_remote -h host_remote db_remote

works fine.

This, though, doesn't work:

/usr/local/bin/psql -U user_local db_local | /usr/local/bin/psql -U
user_remote -h host_remote db_remote

Any tips, anyone?

Sincerely

Victor
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.