Reputation: 327
I have a database backup of a postgres 9.1 and postgis 1.5. Many of the databases were built using a spatial enabled database, created using:
createdb spacial psql -d spacial -f postgis.sql psql -d spacial -f spatial_ref_sys.sql psql -d spacial -f postgis_comments.sql
Now I jave a postgres 9.3 and postgis 2.1. All spatial databases were not restored correctly because my spacial database (created with this new version) is created with only one of the two tables (created with the old version).
Does anyone knows what is going on? Thanks.
I have made the steps I needed, at least I think I've made it. After run: SELECT postgis_full_version();
I've got this result: "POSTGIS="2.1.2 r12389" GEOS="3.3.3-CAPI-1.7.4" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.9.1" LIBJSON="UNKNOWN""
As the POSTGIS 2.1.2 is not covered in the link provided, I figured I should run only the script postgis_upgrade_21_minor.sql, as I don't have topology installed. But a few tables were not imported at all. During importing I got a few messages: type "geometry" is undefined.
Any new ideas?
Upvotes: 3
Views: 4892
Reputation: 43742
Follow the hard upgrade instructions in the manual. These steps, in brief, are:
postgis_restore.pl
that came with your new version of PostGIS to translate the old format to the new format.Upvotes: 6