[postgis-users] Uploading data to a different server via command prompt

Mark Volz MarkVolz at co.lyon.mn.us
Wed May 14 08:50:14 PDT 2014


Hello,

I understand that I can use shp2pgsql to load shapefiles on the localhost.  I would like to know load data onto another server, and I would like to verify that I am doing everything correct.  Specifically:

1)  How I can adjust this code so that I can update the gis data on a different server?
2)  How will I specify the password on a different machine?
3)  Do I need to do anything in addition to this to create spatial indexes?

Current code that I am using to load a directory of shapefiles.

set PATH=C:\Program Files\PostgreSQL\9.2\bin;%PATH%
for %%f in (*.shp) do shp2pgsql -d -I -s 103749 -W LATIN1 %%f %%~nf | psql -w -U postgres -d lyongis


Thanks

Sincerely,
Mark Volz, GISP
Lyon County GIS Coordinator




More information about the postgis-users mailing list