I have a PostGIS installation running on an old computer that I'd like to move. I spent a bunch of time playing with pg_dump and pg_dumpall without success. It seems the normal dump procedures don't work with PostGIS because file paths get hard coded in the output from pg_dump. Any suggestions on how to move PostGIS installation to a new installation of PostgreSQL?
Asked
Active
Viewed 1,933 times
2 Answers
10
I'd suggest moving all your data tables into a schema, then dumping just that schema. then you can easily restore not only on a different computer, but into different versions of PostGIS and PostgreSQL.
Storing your data in a schema other than "public" is a Best Practice.
Paul Ramsey
- 19,865
- 1
- 47
- 57
-
1More info here http://blog.cleverelephant.ca/2010/09/postgis-back-up-restore.html – Paul Ramsey Sep 30 '10 at 17:02
9
This post http://traviscline.com/blog/2010/04/28/moving-postgis-databases-between-machines/ seems to indicate that pg_dump -Fc is what you want.
alfonx
- 1,111
- 10
- 13
Ian Turton
- 81,417
- 6
- 84
- 185