Skip to content

Instantly share code, notes, and snippets.

@andybega
Created December 17, 2013 01:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andybega/7998153 to your computer and use it in GitHub Desktop.
Save andybega/7998153 to your computer and use it in GitHub Desktop.
Updating PostgreSQL and PostGIS (installed via homebrew)
# from here http://blog.55minutes.com/2013/09/postgresql-93-brew-upgrade/
# Create backup of database
/usr/local/cellar/postgresql/9.2.4/bin/pg_dump -h localhost -p 5432 -U ab428 -Fc -b -v -f "/usr/local/var/pg_backup/afghanistan.backup" afghanistan
# Upgrade PostGIS
brew doctor # fix errors
brew update
brew upgrade postgres
brew upgrade gdal --with-postgres
brew upgrade postgis
# Create new database
createdb -U ab428 cied
psql -U ab428 -d cied
CREATE EXTENSION postgis;
SELECT PostGIS_full_version();
## got through here
/usr/local/bin/pg_upgrade \
-d /usr/local/var/postgres \
-D /usr/local/var/postgres9.3 \
-b /usr/local/Cellar/postgresql/9.2.4/bin/ \
-B /usr/local/Cellar/postgresql/9.3.2/bin/ \
-v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment