Re: Restoring a database dump from 9.0 to 9.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jay McGaffigan <hooligan495(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Restoring a database dump from 9.0 to 9.2
Date: 2013-02-09 00:03:38
Message-ID: 26527.1360368218@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jay McGaffigan <hooligan495(at)gmail(dot)com> writes:
> I've been trying to restore a fairly sizeable database dump from my
> production server onto my dev box.
> Recently upgraded to 9.2.2 and wanted to try it out.

> So I grabbed a text dump of the database and tried the "Createdb dbname;
> psql < dmpfile" way of restoring that's always worked for me before
> upgrading my dev box and I'm getting errors on import. Some of my columns
> have 'rich text' (carriage returns, XML and other markup) in it and I
> suspect they are causing the issues (basically the errors I'm seeing seem
> to imply that the text formatting is getting out of wack I'm suspecting due
> to carriage returns embedded in the dump file).

If you showed us the exact error messages rather than hand-waving, we
might be able to help, but it's hard to say much with so little detail.

Note that you generally want to look at the first few errors not the
last few, as pg_dump scripts tend to be very prone to cascading-error
syndrome.

Another thing that's often helpful is to see if you can restore a
schema-only dump (pg_dump -s), as that lets you separate schema problems
from data problems, and get any of the former resolved before you deal
with the latter.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben Madin 2013-02-09 00:17:26 Re: Restoring a database dump from 9.0 to 9.2
Previous Message Adrian Klaver 2013-02-09 00:02:04 Re: no implicit cast error in 9.2?