Created
December 17, 2013 01:02
-
-
Save andybega/7998153 to your computer and use it in GitHub Desktop.
Updating PostgreSQL and PostGIS (installed via homebrew)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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