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

Re: moving a database.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: LWATCDR <lwatcdr(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: moving a database.
Date: 2008-01-10 16:44:30
Message-ID: 7131.1199983470@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
LWATCDR <lwatcdr(at)gmail(dot)com> writes:
> I have an old postgres 7.1 data base that I must migrate to a new
> server running 8.2.6.
> The problem is everything I have tried has failed. The database has
> blobs in it but other than that it is pretty simple.
> So my question is what command line should I use to try and migrate
> this old database to the new server?

You want to pg_dump (or pg_dumpall, but pg_dump'ing each database
would give you a bit more control) and load the resulting script
into the new server.

If possible, use the 8.2 pg_dump to do this, as it's a lot more
featureful than what came with 7.1 --- in particular it will
handle blobs better.

I have a vague recollection that there are some corner cases that
changed in the COPY data format since 7.1.  If you are having
trouble with getting the data reloaded, try using the -d option
to pg_dump.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: Frank BaxDate: 2008-01-10 16:56:29
Subject: Re: moving a database.
Previous:From: LWATCDRDate: 2008-01-10 15:45:36
Subject: moving a database.

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