Command: heroku pgbackups:capture --remote production
Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712
Command: heroku pgbackups:url [db_key] --remote production
Example: heroku pgbackups:url a712 --remote production
>>> "https://s3.amazonaws.com/hkpgbackups/[email protected]/a712.dump?AWSAccessKeyId=XXXXXXXXXXXXXX&Expires=1367876175&Signature=XXXXXXX%EEEEEEEYWWWWWWW%3D"
Command: curl "http://[url]" > production.dump
Example: curl "https://s3.amazonaws.com/hkpgbackups/[email protected]/a712.dump?AWSAccessKeyId=XXXXXXXXXXXXXX&Expires=1367876175&Signature=XXXXXXX%EEEEEEEYWWWWWWW%3D" > production.dump
Command: pg_restore --verbose --clean --no-acl --no-owner -h localhost -d [db_name] production.dump
@vaskaloidis the update command returns
For me it didn't work.
brew upgrade postgresql
returns "Error: postgresql 10.3 already installed". Andpg_restore -V
still returns "pg_restore (PostgreSQL) 9.6.5".I ran
brew doctor
, which returnedRunning
brew link postgresql
returned "Error: Could not symlink bin/clusterdb", so I then ranbrew link --overwrite postgresql
to force the link and overwrite all conflicting files. That command returned "Linking /usr/local/Cellar/postgresql/10.3... 1665 symlinks created". Good to go!