[postgis-users] Moving PostGIS tables between different PGSQL+PostGIS versions

Kevin Neufeld kneufeld at refractions.net
Thu Aug 30 08:12:42 PDT 2007

You don't need to dump the entire database, you can use pg_dump to dump 
one table:

pg_dump -t my_table my_old_db | psql my_new_db

This may fail if foreign keys are referencing non-existent tables in the 
new database, but for the most part, it's tried and true.

Don't forget to update the geometry_columns table in your new db.


Jose Gomez-Dans wrote:
> Hi,
> I have a number of tables in PostGIS (1.1.6, PGSQL 8.1). I want to
> move them to another server (which is running PostGIS 1.3.1 and 8.2).
> Apart from dumping the databases (pg_dump), do I need to take other
> things into account? The tables are fairly simple, and at most have
> PostGIS extensions or are plain tables.
> Is there an idiot's proof guide somewhere?
> Thanks!
> José
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

Kevin Neufeld
Software Developer
Refractions Research Inc.
300-1207 Douglas St.
Victoria, B.C., V8W 2E7

Phone: (250) 383-3022
Email: kneufeld at refractions.net

More information about the postgis-users mailing list