Tag Archives: postgres

Export Import GIS Shape File to Postgres or Postgis

For importing or ingesting GIS shapefile to a postgresql database we can use shp2pgsql  command, example:   shp2pgsql -s 4326 -c -D -I myshapefile dbtable | \ psql -d dbname -h localhost -p 5432 -U dbuser   In example above we convert or import the shapefile  (myshapefile) to dbtable in dbname database with a dbuser. […]

how to backup or dump and restore postgresql database

In this tutorial, we show how to backup or dump and how to restore a postgresql database.   For making a backup you can use pg_dump command like below:   pg_dump -Fc -h localhost mydatabase -U myuser -n myschema > test.pgdump   in the above, change hostname (localhost), database name (mydatabase), user (myuser) and schema […]