pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: "Marc G. Fournier From": <scrappy@hub.org>
To: pgsql-admin@postgresql.org
Subject: Upgrading a database with pg_dumpall / psql ...
Date: Thu, 15 Nov 2007 04:12:33 +0000 (UTC)
Message-ID: <fhggvh$26dp$1@news.hub.org> (raw)

This is one of those 'stupid questions I hate to ask' ... I've rechecked the 
docs to make sure I haven't missed something stupid, and unless I'm blind, 
I haven't ...

I'm trying to upgrade a database from 8.1 -> 8.2 ... on a seperate server,
with 8.2 pg_dump already installed, I do:

  pg_dumpall -U pgsql -h <host> > dump.sql

Works great.

Then I upgrade the 8.1 server to 8.2, initdb, and try and do the restore
doing:

  psql -U pgsql -h <host> template1 < dump.sql

And get a whack of:

invalid command \n
invalid command \
invalid command \ni
invalid command \
invalid command \n
invalid command \n
invalid command \.

and other errors ... so I'm obviously missing something that is probably
obvious to everyone else ...  am I dumping wrong?  If I use '--inserts', 
it, of course, works like a charm, its only when I try and use COPY ...

-- 
----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email . scrappy@hub.org                              MSN . scrappy@hub.org
Yahoo . yscrappy               Skype: hub.org        ICQ . 7615664



view thread (3+ messages)  latest in thread

Message-ID: <fhggvh$26dp$1@news.hub.org>
Permalink:  ../fhggvh$26dp$1@news.hub.org/
Also on:    postgresql.org/message-id/fhggvh$26dp$1@news.hub.org

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: scrappy@hub.org
  Subject: Re: Upgrading a database with pg_dumpall / psql ...
  In-Reply-To: <fhggvh$26dp$1@news.hub.org>

* 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