Re: Move database from Solaris to Windows - Mailing list pgsql-general

From Barry C Dowell
Subject Re: Move database from Solaris to Windows
Date
Msg-id 000301c7d478$a4673620$9d09b780@gsfc.nasa.gov
Whole thread Raw
In response to Re: Move database from Solaris to Windows  (Steve Atkins <steve@blighty.com>)
List pgsql-general
You asked for details, here's a few:

The database that I'm working with on the Solaris side is approximately
1.5GB in size.  One file in the directory that I believe is that database,
is over 1GB in size on it's own.

When I tried using the plain format, I got human readable information which
is fine, but when I attempted to restore the database on the Windows side
using that file the psql database < output.fil command choked on several
lines from the output.fil that included the sequence \^N (or similar) at the
end of the lines (apparently lines that were supposed to load data into a
table).

That was but one of the issues that was noted, as there several.  I can
replicate the problem again but have to remove the application first, then
remove postgreSQL, reinstall postgreSQL and then reinstall the application
to create the original database that will then be replaced with the copy
brought over from Solaris.

During the earlier attempts, I did not CLEAN the database before attempting
to restore it, so I was also getting lots of messages about duplicate keys,
or existing keys.  I would guess that the recommendation is to clean the
database before restoring it, which might work just fine, but it doesn't
resolve the issue noted with the characters that aren't understood (psql
seemed to think they were commands, but of course gives a syntax type error
message saying they aren't understood).


When I dumped the original database, I used simple commands like this:

pg_dump --file=output.fil --format=p Databasename

When I tried to restore the database, I followed the examples in the link in
my original post and did the following:

psql -d databasename -f output.fil

I also tried the same basic processes when working with the tar format (I
assumed that I was going to need that because of large objects).  Again
though, I never cleaned the database during the restore processes.


Thanks again for any assistance!


bcd



-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of Steve Atkins
Sent: Wednesday, August 01, 2007 3:35 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Move database from Solaris to Windows


On Aug 1, 2007, at 11:44 AM, Barry C Dowell wrote:

> Please forgive me if this question is being asked in the wrong area
> (and please suggest the proper one so I can ask there :-) ), but I'm
> in search of assistance in moving a database from a Solaris system
> over to a Windows system.
>
> Solaris 5.8, postgreSQL 8.01, to Windows Server 2003, postgreSQL
> 8.0.13.
>
> Installing on the Windows Server has gone simple enough, and I've
> actually experimented a little with pg_dump to dump the contents of
> the database that I get by default when installing the application
> that I'm working with which requires the db.
>
> I tried using pg_dump --format=t to dump the original database, and
> then tried to restore into a database with the same name on the
> Windows side but that restore has not been successful.

I find it a lot easier to diagnose what's going on with plain format,
generally.

>
> I've been trying to follow information found here:
> http://www.postgresql.org/docs/8.0/static/app-pgrestore.html but
> have not
> been successful yet.
>
> Any assistance that can be lent my way is greatly appreciated.

You'll need to post a few more details (what commands you ran,
what errors you got) before people will be able to help you much.

Cheers,
   Steve


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/


pgsql-general by date:

Previous
From: Steve Atkins
Date:
Subject: Re: Move database from Solaris to Windows
Next
From: Erik Jones
Date:
Subject: Re: Move database from Solaris to Windows