Skip site navigation (1) Skip section navigation (2)

Re: Importing the dump file in postgresql-7.4.23

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: saravanan <saravanan(dot)kcse(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Importing the dump file in postgresql-7.4.23
Date: 2011-07-15 11:41:02
Message-ID: CAOR=d=0bh47gBmFa_gj4uvYnx9qmLABuGV4aUbdb2mhdLV4NbQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Fri, Jul 15, 2011 at 1:11 AM, saravanan <saravanan(dot)kcse(at)gmail(dot)com> wrote:
> Hi,
>
> I tried to troubleshoot the errors while importing dumps in PostgreSQL -
> 8.0.0 version. But still i'm getting some permission level errors. Before
> importing the dumps, i used to install some functions like
> ltree,tsearch2,pgcrypto from directory
> /usr/local/src/postgresql-8.0/contrib. So that i can avoid some errors.

Some tips on how to backup / restore across versions.

1: pg assumes you're going from an old to a new version.  i.e. 7.4 to
8.3 etc.  Going the other way is not officially supported and you're
on your own.
2: Run both versions of the db server at once.  Use the pg_dump and
pg_dumpall from the higher version, i.e. the destination db.  So if
you're going from 7.4 to 8.4, use 8.4's pg_dump to dump data.
3: use pg_dumpall --globals to get a list of users to import to the
new database.
4: create tablespaces ahead of time if needed.

so:

pg_dumpall --globals -h pg74host -U postgres | psql -h pg84host -U postgres
createdb -h pg84host dbname
pg_dump -h pg74host dbname | psql -h pg84host dbname

Should get mostly get you there.

In response to

pgsql-admin by date

Next:From: David OndrejikDate: 2011-07-15 15:27:09
Subject: vacuumdb question/problem??
Previous:From: Scott MarloweDate: 2011-07-15 10:09:23
Subject: Re: Maximum insert per second

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group