<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">The issue is that you are trying to install an old version of postgis into the new database.<br><br>My normal approach (yet to fail - for me at least):<br><br>create the new database<br>install the appropriate/current version of Postgis in that db (this may require plpgsql as well as running postgis.sql & spatial_ref_sys.sql)<br><br>dump the old db without the "create new db option" & copy the dump file to the new system<br><br>run psql -d <newdb> -f <old db dump file><br>(optionally create any users you want in the new db to be compatible with the old db)<br><br>you will still get errors as it fails to install the old postgis on top of the one that is already there, but that is fine - you don't want or need the old postgis.<br><br>That should give you a working new db.<br><br>Brent Wood<br><br>--- On <b>Sat, 9/10/11, Michael A. Peters
 <i><mpeters@shastaherps.org></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Michael A. Peters <mpeters@shastaherps.org><br>Subject: [postgis-users] Problem moving database<br>To: "PostGIS Users" <postgis-users@postgis.refractions.net><br>Date: Saturday, September 10, 2011, 9:00 AM<br><br><div class="plainMail">Old server:<br>- 32 bit CentOS 5.6<br>- postgresql-8.4.4-2PGDG.el5<br>- postgresql-server-8.4.4-2PGDG.el5<br>- postgis-1.3.6-1.rhel5<br><br>New server:<br>- 64 bit CentOS 6<br>- postgresql-8.4.7-1.el6_0.1.x86_64<br>- postgresql-server-8.4.7-1.el6_0.1.x86_64<br>- postgis-1.5.1-1.el6.x86_64<br><br>Dump Method:<br><br>pg_dump -Fc shastaherps > shastaherps.dump<br><br>Restore Method: (as postgres user)<br><br>sh /usr/share/postgis/postgis_restore.pl postgis-64.sql shastaherps shastaherps.dump -E=UNICODE > restore.log<br><br>Problems:<br><br>Console
 full of error - IE<br><br>ERROR:  language "plpgsql" already exists<br>ERROR:  function st_histogram2d_in(cstring) does not exist<br>ERROR:  could not access file "/usr/lib/pgsql/liblwgeom": No such file or directory<br>ERROR:  function public.asukml(geometry, integer, integer) does not exist<br>ERROR:  could not access file "/usr/lib/pgsql/liblwgeom": No such file or directory<br>ERROR:  function public.asukml(geometry, integer) does not exist<br>ERROR:  could not access file "/usr/lib/pgsql/liblwgeom": No such file or directory<br>ERROR:  function public.asukml(geometry) does not exist<br>ERROR:  could not access file "/usr/lib/pgsql/liblwgeom": No such file or directory<br>ERROR:  function public.box2d_contain(box2d, box2d) does not exist<br>ERROR:  could not access file "/usr/lib/pgsql/liblwgeom": No such file or directory<br>ERROR:  function public.box2d_contained(box2d, box2d) does not
 exist<br>ERROR:  could not access file "/usr/lib/pgsql/liblwgeom": No such file or directory<br><br>etc.<br><br>ERROR:  function public.transform_geometry(geometry, text, text, integer) does not exist<br>ERROR:  function geom_accum(geometry[], geometry) does not exist<br>ERROR:  aggregate public.geomunion(geometry) does not exist<br><br>-bash-4.1$ yum provides '/usr/lib/pgsql/liblwgeom'<br>Loaded plugins: fastestmirror<br>No Matches found<br><br>-=-=-<br><br>Any suggestions?<br>_______________________________________________<br>postgis-users mailing list<br><a ymailto="mailto:postgis-users@postgis.refractions.net" href="/mc/compose?to=postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></div></blockquote></td></tr></table>