[postgis-users] migrating from linux to windows

Willy-Bas Loos willybas at gmail.com
Fri Nov 14 04:22:50 PST 2008


>I think in old versions of PostGIS, the .so, .dll was hard-coded.  Is that
the problem you are running into?
Yes that is the main problem, but there seem to be some other complications.
It's not a thing of the past either; this error is from a PostgreSQL 8.3.x
dump, PostGIS 1.3.3. Dumped on Ubuntu 8.04 restored on Windows XP:
pg_restore: [archiver (db)] could not execute query: ERROR:  could not
access file "/usr/lib/postgresql/8.3/lib/liblwgeom": No such file or
directory

The create_undef.pl approach i mentioned before is not working.  The postgis
objects are all dependent on each other, it's pretty hard to discard some
and keep others. (BTW the function doesn't take these dependencies into
account, so it's pretty hard to run the SQL without errors. Also it is not
distributed with ubuntu 8.04 (nor Debian Etch) AFAIK, so i had to use the
one from windows, which worked except for the dependencies when running the
SQL ).

My approach is now to split the migration in 2 steps:
1. upgrade to the correct version on the native OS (that is, ubuntu will
replace Debian because they are much alike postgres wise, and ubuntu has
more recent PostgreSQL versions)
2. migrate to the other OS.

The upgrade works with the postgis_restore.pl when the OS is the same. I
make sure that the version that i am upgrading to is exactly the same as the
version on the other OS that i want to migrate to.

When migrationg to the other OS, i first create the target database from the
postgis_template and restore the custom dump  (-Fc) in it, so that errors
are ignored (but stored in a log).
All the postgis functions will allready exist, so they will not be attempted
to be overwritten.

This results is exactly what i wanted, only there is a small difference in
the Windows and Ubuntu versions of postgis 1.3.3. But I will write a
different post for that.

Cheers,

WBL

-- 
"Patriotism is the conviction that your country is superior to all others
because you were born in it." -- George Bernard Shaw
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081114/3ccc7352/attachment.html>


More information about the postgis-users mailing list