2

I reached the build limit on my Heroku app, but I still had a lot of changes I wanted to make. My idea was to create another app, connect it to the same database as the first app, then delete the first app and rename the second app to use the original name.

However, when I deleted the first app, the database was also deleted.

Before deleting, I had downloaded a Postgres dump as a backup. I uploaded the dump to GitHub and tried restoring it with this command:

heroku pg:backups:restore 'https://github.com/myusername/repo/path/branch/latest.dump' --app myappname --c
onfirm myappname

But I got this error:

Restoring... !
 !    An error occurred and the backup did not finish.
 !
 !    waiting for restore to complete
 !    pg_restore finished with errors
 !    waiting for download to complete
 !    download finished with errors
 !    please check the source URL and ensure it is publicly accessible
 !

My question:

Is there any way I can restore my backup, or have I lost the data for good?

If possible, how can I properly restore the Postgres dump into my new Heroku app?

1 Answer 1

2
+50

You are using an incorrect URL to point the dump file,

https://github.com/myusername/repo/path/branch/latest.dump is a blob_url which is like a URL of the web page, we get a rendered HTML version of the file by accessing the blob_url.

You should use a raw_url to point the dumb file, to get the raw_url click on the Raw button on the blob page of the respected file

github get raw file link

Hope that should work

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.