Question

I am trying to restore a heroku postgres data base from a dump of a local data base using the following command:

heroku pgbackups:restore HEROKU_POSTGRESQL_MAROON_URL 'https://s3-eu-west-1.amazonaws.com/my-app-data/test.dump' --app my-app

I see this:

HEROKU_POSTGRESQL_MAROON_URL (DATABASE_URL)  <---restore---  test.dump

 !    WARNING: Destructive Action
 !    This command will affect the app: smc-staging
 !    To proceed, type "my-app" or re-run this command with --confirm my-app

and after entering my-app, I get this:

←[0KRetrieving... done

 !    An error occurred and your restore did not finish.
 !    The backup url is invalid. Use `pgbackups:url` to generate a new temporary URL.

I am running windows 7, the backup was taken using pg_dumps, and uploaded to S3, and heroku --version gets me:

heroku/toolbelt/3.3.0 (i386-mingw32) ruby/1.9.3

please help!

Was it helpful?

Solution

Can you paste your URL into a browser and get the file you expect? I suspect the file is not publicly available. Instead, I would suggest something like this to restore the latest staging backup:

heroku pgbackups:restore DATABASE -a example-staging `heroku pgbackups:url -a example`

or this to restore a specific older backup:

heroku pgbackups:restore DATABASE -a example-staging `heroku pgbackups:url a114 -a example`
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top