Reputation: 1
I have followed various links including Herokus documentation here: https://devcenter.heroku.com/articles/heroku-postgresql#using-the-cli
I am using the command: pg_dump -Fc --no-acl --no-owner -h $DB_LOCAL_URL -U $DB_LOCAL_USER ${DB_LOCAL_DATABASE} > my_database.dmp to create the database. It creates the dump okay. Put I cannot figure out how to push it:
I tried: heroku pg:push my_database.dmp <my_heroku_databaseurl> --app myapp Where <my_heroku_databaseurl> is the value of heroku config -a myapp command, which gives
=== myapp Config Vars
DATABASE_URL:my_heroku_databaseurl>
This gives an error: Unknown database: postgres:....... If I try heroku pg:push my_database.dmp <heroku_database_name> --app myapp Unknown database: <heroku_database_name> Valid options are: DATABASE_URL
I tried every variation without success, dropping username, database name etc.
The Heroku documentation simply says: heroku pg:push mylocaldb HEROKU_POSTGRESQL_MAGENTA --app sushi But what exactly is HEROKU_POSTGRESQL_MAGENTA in this instance?
The other example given is:
# push mylocaldb into a Heroku DB named postgresql-swimmingly-100
$ heroku pg:push mylocaldb postgresql-swimmingly-100
but what from the perspective of my local machine is postgresql-swimmingly-100?
Any ideas?
Upvotes: 0
Views: 174
Reputation: 373
HEROKU_POSTGRESQL_MAGENTA is a dummy word just replace it with DATABASE_URL
Upvotes: 0