pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Schuller <peter.schuller@infidyne.com>
To: John W Cunningham <john@pickaprof.com>
Cc: Peter Schuller <peter.schuller@infidyne.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Backing up postgresql databases
Date: Mon, 19 Mar 2001 04:56:10 -0500
Message-ID: <20010319045610.D439@prometheus> (raw)
In-Reply-To: <BEEOLIJOIOBCOCILGHKIOEHDDBAA.john@pickaprof.com>
References: <20010317223923.X441@prometheus>
	<BEEOLIJOIOBCOCILGHKIOEHDDBAA.john@pickaprof.com>

Hello,

> From what I understand (and I'm still fairly new to Postgres) you won't get
> a perfect copy while Postmaster is running, but there is a way to backup the
> entire database while it's running: pg_dumpall.

Ah, perfekt! And thanks to Grant for that bash script :)

I do have a question though. Contrary to Grant, I can't use a trust policy,
even on the local machine. As a result, I need to use password
authentication. However, pg_dumpall seems to generally screw up.

Wheather or not I do -u has no effect; in either case I get prompted to the
password (but not the username). And in either case, I get a buch of random
"Password:" type outputs at first (as if it's trying to authenticate
unsuccessfully several times) intermixed with the other output. When I
finally get the password prompt, I enter it and I seem to get logged in (as
postgres). Then I get another error (invalid script or sql query of some
sort it looks like).

Below is some example output; it looks really messy in general with a bunch
of failed authentications. Note that I didn't get to enter the password
until the very last Username:Password:

   defiant:~$ /usr/lib/postgresql/bin/pg_dumpall -u
   Password: psql: Password authentication failed for user 'postgres'
   \connect template1
   select datdba into table tmp_pg_shadow       from pg_database where datname
   = 'template1';
   delete from pg_shadow where usesysid <> tmp_pg_shadow.datdba;
   drop table tmp_pg_shadow;
   copy pg_shadow from stdin;
   Password: 
   psql: Password authentication failed for user 'postgres'
   \.
   delete from pg_group;
   copy pg_group from stdin;
   Password: 
   psql: Password authentication failed for user 'postgres'
   \.
   Password: Password: psql: Password authentication failed for user 'postgres'
   \connect template1 
   create database "postgres";
   \connect postgres 
   Username: Password: 
 
   Connection to database 'postgres' failed.
   ERROR: Missing '=' after '31' in conninfo

   pg_dump failed on postgres, exiting

Is there something obvious I'm doing wrong?

Thanks!

-- 
/ Peter Schuller, InfiDyne Technologies HB

PGP userID: 0x5584BD98 or 'Peter Schuller <peter.schuller@infidyne.com>'
Key retrival: Send an E-Mail to getpgpkey@scode.infidyne.com
E-Mail: peter.schuller@infidyne.com Web: http://scode.infidyne.com




view thread (10+ messages)  latest in thread

Message-ID: <20010319045610.D439@prometheus>
Permalink:  ../20010319045610.D439@prometheus/
Also on:    postgresql.org/message-id/20010319045610.D439@prometheus

 · 

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-admin@postgresql.org
  Cc: peter.schuller@infidyne.com, john@pickaprof.com
  Subject: Re: Backing up postgresql databases
  In-Reply-To: <20010319045610.D439@prometheus>
  References: <20010317223923.X441@prometheus> <BEEOLIJOIOBCOCILGHKIOEHDDBAA.john@pickaprof.com> <20010319045610.D439@prometheus>

* 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