anubhav_
anubhav_
RRailway
Created by anubhav_ on 8/6/2023 in #✋|help
Migrate Postgres from Heroku to Railway
I'm trying to migrate my postgres database from Heroku to Railway. I already have a dump file from Heroku. I'm following this guide to restore the database: https://blog.railway.app/p/postgre-backup#restoring-your-database-backup However, when I run the command:
pg_restore -U <USER> -h <HOST> -p <PORT> -W -F t -d <DATABASE> latest.dump
pg_restore -U <USER> -h <HOST> -p <PORT> -W -F t -d <DATABASE> latest.dump
I get the following error:
pg_restore: error: corrupt tar header found in PGDMP (expected 0, computed 19448) file position 512
pg_restore: error: corrupt tar header found in PGDMP (expected 0, computed 19448) file position 512
Pls note: - I've tried running this command on both Windows and Ubuntu, still I get the same error - The dump file was created before Heroku removed the free tier. So now, I can't create a new dump file since heroku has deleted my data
15 replies