Reputation: 2508
Kept getting
DATABASE_URL does not match any of your databases ! Could not resolve database DATABASE ! ! Available databases:
when I try to transfer from production to my staging
pgbackups:capture --app myapp
pgbackups:restore DATABASE
heroku pgbackups:url --app myapp
--app myapp-staging
Upvotes: 2
Views: 1123
Reputation: 1185
Apparently you have to push some code to the repository first before the database becomes available. (I don't think it's created until then.)
Upvotes: 0
Reputation: 37507
From http://devcenter.heroku.com/articles/pgbackups#transfers
heroku pgbackups:capture --app myapp
heroku pgbackups:restore DATABASE `heroku pgbackups:url --app myapp` --app myapp-staging
The back ticks are important! Are you using the correct application name passed into --app?
Upvotes: 1