Thread: pg_dump on remote machine

pg_dump on remote machine

From
"Askar Zaidi"
Date:
Hello,
Iam trying to take a dump of my DB from one machine to another in this
fashion:

on the secondary database:

pg_dump -b -h 172.16.1.20 (dbname) > /tmp/dump.dump

my error is :
could not connect to database etc...etc..

although the file dump.dump in /tmp is created.(it's empty)

I can access remote database on my secondary through phpPgAdmin.

Any clues??

Askar Zaidi
Central Computer Facility,
National Physical Laboratory,
New Delhi, India


Re: pg_dump on remote machine

From
"Joel Fradkin"
Date:
I have used pgadmin III to do that so you may want to try it.

Joel Fradkin

Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida 34243
Tel.  941-753-7111 ext 305

jfradkin@wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced tools.
C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
 This email message is for the use of the intended recipient(s) and may
contain confidential and privileged information.  Any unauthorized review,
use, disclosure or distribution is prohibited.  If you are not the intended
recipient, please contact the sender by reply email and delete and destroy
all copies of the original message, including attachments.




-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Askar Zaidi
Sent: Friday, April 08, 2005 8:25 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] pg_dump on remote machine

Hello,
Iam trying to take a dump of my DB from one machine to another in this
fashion:

on the secondary database:

pg_dump -b -h 172.16.1.20 (dbname) > /tmp/dump.dump

my error is :
could not connect to database etc...etc..

although the file dump.dump in /tmp is created.(it's empty)

I can access remote database on my secondary through phpPgAdmin.

Any clues??

Askar Zaidi
Central Computer Facility,
National Physical Laboratory,
New Delhi, India


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

               http://archives.postgresql.org


Re: pg_dump on remote machine

From
Brad Nicholson
Date:
Check the pg_hba.conf file to see if you have access to the database, as
user that you are trying to connect as, from the IP you are trying to
connect from.
I'll bet that you don't.  Check you postgres error logs, and you should
see the refused connection.  You might have to tweak the logging settings.

Also, the exact error you get would be a bit more helpful.

Askar Zaidi wrote:

>Hello,
>Iam trying to take a dump of my DB from one machine to another in this
>fashion:
>
>on the secondary database:
>
>pg_dump -b -h 172.16.1.20 (dbname) > /tmp/dump.dump
>
>my error is :
>could not connect to database etc...etc..
>
>although the file dump.dump in /tmp is created.(it's empty)
>
>I can access remote database on my secondary through phpPgAdmin.
>
>Any clues??
>
>Askar Zaidi
>Central Computer Facility,
>National Physical Laboratory,
>New Delhi, India
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>               http://archives.postgresql.org
>
>


--
Brad Nicholson  416-673-4106
Database Administrator, Afilias Canada Corp.


Re: pg_dump on remote machine

From
Thomas Kaminski
Date:
Hello,

> Iam trying to take a dump of my DB from one machine to another in
this
> fashion:
>
> on the secondary database:
>
> pg_dump -b -h 172.16.1.20 (dbname) > /tmp/dump.dump

Can you get connect with
psql -h 172.16.1.20 (dbname)


I think, you /etc/pg_hba.conf must be configured to grant this access.
And don't forget to reload the postmaster after this.

Look in the log of postgresql.

Bye Thomas



Re: pg_dump on remote machine

From
Thomas Kaminski
Date:
Hello,

> Yes I can get connected by psql -h 172.16.30.2 (dbname) and I can also connect
to the remote DB using phpPgAdmin. I have given the permissions on
pg_hba.conf file.

Hmmm,
when you connected with psql -h 172.16.30.2 (dbname),
are you able to get data with the select-command?
If not, you must grant access with the grant-command.

And you should look to the logfile of postgresql.

Bye Thomas