Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using Postgres 9.3 and PostGIS 2.1, installed in a Docker container via

RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y install postgresql-9.3 postgresql-contrib-9.3 postgresql-9.3-postgis-2.1 postgis

According to the docs I can spatial-enable my database just by executing these commands against my db in a psql console:

CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;

It then says:

If you plan to restore an old backup from prior versions in this new db, run:

psql -d [yourdatabase] -f legacy.sql

Well, I need to import data dumped from Postgres 9.1 and PostGIS 1.5.3 so I guess I need to do this (I have tried not doing it and I get errors when creating a table with a geography column)

I don't know where to find "legacy.sql" though.

I downloaded http://www.postgis.org/download/postgis-2.0.2.tar.gz and found a "legacy.sql" in there but I get errors when I run it:

psql:/common/postgres_data/legacy.sql:11: 00-regress-install/share/contrib/postgis/legacy.sql: No such file or directory
(followed by lots more errors)

Looking at the source I think it's trying to include another file also called "legacy.sql" but I can't find it.

share|improve this question
    
I found this question gis.stackexchange.com/questions/29759/… but there are no .sql files in my /usr/share/postgresql/9.3/contrib/postgis-2.1/ dir, only a single file postgis_restore.pl –  Anentropic Dec 27 '13 at 10:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.