[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions






On Wed, Mar 5, 2014 at 8:22 AM, Chris Travers <..hidden..> wrote:

snip

Sorry, I got the sudo command wrong.  Confused sudo and su.

sudo -u postgres  pg_dumpall > /tmp/mypgbackup.sql
cp /tmp/mypgbackup /home/myuser/

the response to the sudo . . .        is:

pgdumpall: could not connect to database "template1": 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"?


ok then.  As root try:

locate .s.PGSQL.5432

See if that shows anything.  If not, of if you get an error you may need to:

Tried this first and no joy!

find / -name  .s.PGSQL.5432

That may take a while though.

As the third option ran and provided nothing - - - bummer!

As an alternative you could just do as follows instead:

pg_dumpall -h localhost -u postgres > /home/myuser/mydbdump.sql

You will need to provide the Postgres password in this case.

Tried this second and the response was:

Is the server running on host "localhost"(127.0.0.1) and accepting TCP/IP connections on port 5432?

Maybe PostgreSQL isn't running after all.

Try:

 ps -A | grep postgres

If that returns nothing then PostgreSQL isn't running afterall.

nothing returned!

Funny because when I do a reboot or halt on of the lines is Postgresql 9.3 shutting down.

What next?