pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joseph Maruca <joseph.maruca@masimo.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Unable to execute pg_dump
Date: Mon, 15 Jun 2020 04:38:22 +0000
Message-ID: <3e8a19df5ce7480bb7d5b6647e514a91@masimo.com> (raw)

Hello everyone,

I am trying to work out a way to perform a PostgreSQL pg_dump of a single DB via RHEL v6.10 command line. Now the system I am working on is that you have to shell into Bash 4.1 first before you get to PSQL. Now I can access the actual PSQL db using the following syntax from the command line which works fine:

'''sudo -u postgres -H --psql -pxxxxx -d db_name'''

If I enter the following syntax from the RHEL command line:

'''sudo su postgres'''

I end up in the bash-4.1 shell. When executing the following command from within the shell: bash-4.1$ pg_dump db_name > /tmp/my_database.sql I am presented with the following error:

pg_dump: [archiver (db)] connection to database "db_name" failed: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

I am expecting the db to be exported to /tmp/my_database.sql file. I have tried various combinations of commands from both RHEL and bash command lines but cannot achieve the desired outcome. Your assistance would be greatly appreciated, thank you.
Regards,
Joe28a

view thread (3+ messages)  latest in thread

Message-ID: <3e8a19df5ce7480bb7d5b6647e514a91@masimo.com>
Permalink:  ../3e8a19df5ce7480bb7d5b6647e514a91@masimo.com/
Also on:    postgresql.org/message-id/3e8a19df5ce7480bb7d5b6647e514a91@masimo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: joseph.maruca@masimo.com
  Subject: Re: Unable to execute pg_dump
  In-Reply-To: <3e8a19df5ce7480bb7d5b6647e514a91@masimo.com>
  References: <3e8a19df5ce7480bb7d5b6647e514a91@masimo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox