Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id ED7F0B5DBC8 for ; Tue, 25 Oct 2011 00:45:59 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 32125-03 for ; Tue, 25 Oct 2011 03:45:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-gy0-f174.google.com (mail-gy0-f174.google.com [209.85.160.174]) by mail.postgresql.org (Postfix) with ESMTP id 70D2AB5DC5F for ; Tue, 25 Oct 2011 00:45:53 -0300 (ADT) Received: by gyb13 with SMTP id 13so79066gyb.19 for ; Mon, 24 Oct 2011 20:45:53 -0700 (PDT) Received: by 10.150.243.8 with SMTP id q8mr23377913ybh.41.1319514352040; Mon, 24 Oct 2011 20:45:52 -0700 (PDT) Received: from ?IPv6:2001:44b8:6109:9f00:2a0:c9ff:fe6e:ed8f? (2001-44b8-6109-9f00-02a0-c9ff-fe6e-ed8f.static.ipv6.internode.on.net. [2001:44b8:6109:9f00:2a0:c9ff:fe6e:ed8f]) by mx.google.com with ESMTPS id r5sm69259754anl.13.2011.10.24.20.45.49 (version=SSLv3 cipher=OTHER); Mon, 24 Oct 2011 20:45:51 -0700 (PDT) Message-ID: <4EA630E3.6090606@ringerc.id.au> Date: Tue, 25 Oct 2011 11:45:39 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Thunderbird/3.1.9 MIME-Version: 1.0 To: Krishnamurthy Radhakrishnan CC: Craig James , pgsql-admin@postgresql.org Subject: Re: Dumping data using pg_dump after chrooting to a different partition References: <4EA5E253.6020600@cisco.com> <4EA5EA8E.5090406@emolecules.com> <4EA6269A.7040803@cisco.com> In-Reply-To: <4EA6269A.7040803@cisco.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/113 X-Sequence-Number: 38565 On 25/10/11 11:01, Krishnamurthy Radhakrishnan wrote: > Thanks Craig. > > After configuring to accept TCP connections on port 5432, I tried to > specify the hostname as shown below and that didn't help. Is there > anything else that needs to be configured? > pg_dump -h bldr-ccm36.cisco.com -p 5432 -a -U postgres > pg_dump: [archiver (db)] connection to database "postgres" failed: could > not connect to server: Connection refused > Is the server running on host "bldr-ccm36.cisco.com" and accepting > TCP/IP connections on port 5432? Use "localhost" or "127.0.0.1" if it's on the same machine to simplify things. If you try to connect to your host's public IP but postgresql.conf has listen_addresses='127.0.0.1' or listen_addresses='localhost' then you won't be able to connect because Pg isn't listening on your public IP, only your loopback IP. A chroot won't affect tcp/ip, so it's still localhost when you're chrooted into another FS. Also, you may have firewall rules in place that prevent the connection, check for that. -- Craig Ringer