[postgis-users] PostGIS synchronization between two computers

Stephen Woodbridge woodbri at swoodbridge.com
Mon Jul 27 13:42:42 PDT 2009


Michael Ewald wrote:
> I'm gearing up for research project and using a netbook for fieldwork. I 
> want to be able to move my postgis databases between my office computer 
> and the field netbook and back again after adding data. I tried doing a 
> pg_dump on the database and restoring on the netbook or vise versa but 
> the tables contain references to filepaths that don't exist on the 
> netbook (i.e. /opt/local/lib/postgresql83//liblwgeom) creating a 
> failure. My basic setup is pgsql and postgis installed via MacPorts on 
> OS X and postgis installed via apt-get under Ubuntu (for the netbook).
> 
> Has anyone developed a tool to sync? Anyone have any ideas on how I 
> could accomplish this sync without copying each row using python?
> 
> Thanks for any suggestions.

Michael,

I typically create a db, make a new schema like "data", issue
   alter database mynewdb set search_path to "data", public;

I create all my tables in "data" instead of "public" and when I 
pg_dump/restore I only dump the "data" schema. this makes it much easier 
to avoid the issues you mentioned above. It also make it much easier to 
upgrade postgis when a new version comes along and to move my data 
between databases that have slightly different versions of postgis 
loaded on them.

YMMV,
   -Steve



More information about the postgis-users mailing list