Heroku database restore issue

Just found the solution, actually two things were wrong in my case.

One, the uploaded .dump file was not well readable/usable by the heroku.

Two, the heroku postgresql DB complete URL was not required to be provided.

So, the right way that worked for me was that the uploaded file should be accessible without any token and also without any virtual/indirect path, etc. The URL to the file should point to the file directly. In my questioned problem, I was using firebase to host my DB file temporarily to do the heroku operation. And firebase was not giving direct URL to the uploaded physical file.

heroku pg:backups:restore  --app heroku-postgres-f3*** 'https://www.h***.com/dss_iaya_db_dump2.dump' DATABASE_URL

After typing this command, I was asked to retype the heroku app name just to confirm the operation. Once done, everything worked like a charm.

Leave a Comment