Dumping data using pg_dump after chrooting to a different partition - Mailing list pgsql-admin

From Krishnamurthy Radhakrishnan
Subject Dumping data using pg_dump after chrooting to a different partition
Date
Msg-id 4EA5E253.6020600@cisco.com
Whole thread Raw
Responses Re: Dumping data using pg_dump after chrooting to a different partition  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Dumping data using pg_dump after chrooting to a different partition  (Craig James <craig_james@emolecules.com>)
List pgsql-admin
Hi,

I am new to PostgreSQL. We are using PostgreSQL 9.0.2 on our linux server. We have an instance of PostgreSQL 9.0 running using the primary partition on the server.

We want to use the pg_dump and psql programs to migrate the data during our software upgrade process. For upgrade, we plan to do the following:
  • chroot to a secondary partition on the server.
  • install the software RPMs including PostgreSQL RPMs
  • start a secondary instance of PostgreSQL DB server using a different port and data directory.
  • run pg_dump to dump the data from the primary instance to a file.
  • run psql to import the data from the file into the secondary instance.
However when I tried to perform the pg_dump as mentioned above, I get the following error:
pg_dump: [archiver (db)] connection to database "TestDB" failed: could not connect to server: No such file or directory|<LVL::Debug>
Is the server running locally and accepting|<LVL::Debug>
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?|<LVL::Debug>

pg_dump works before chrooting to the secondary partition. Can you please provide a way to dump the data after chrooting?

Thanks for your help.

Radha


pgsql-admin by date:

Previous
From: Greg Williamson
Date:
Subject: postgres 9.0.4, pg_restore and indexes
Next
From: "Kevin Grittner"
Date:
Subject: Re: Dumping data using pg_dump after chrooting to a different partition