What's the best way to populate a railway psql database from a local file?
frugofruit90
TRIALOP

a year ago

I have a local app which I use to send my fiancee job offers via email. Since it's working well I want to deploy it on Railway. However, I need to somehow migrate my database from local to railway db and I don't know how. I've been working with Claude for some time now and we're stuck fighting with the shell. Can someone help please? 🙂

12 Replies

frugofruit90
TRIALOP

a year ago

d2118190-d2d6-4eb1-ab42-d135d10d9f21


maddsua
HOBBY

a year ago

Use pgdump and pgrestore to first download your existing database and then restore it to the new railway instance



frugofruit90
TRIALOP

a year ago

but for that I would need access to shell on my railway pg


maddsua
HOBBY

a year ago

Pro tip: use the "custom" dump format for better experience


maddsua
HOBBY

a year ago

Wait why? The tools work with the DB connection, you don't need a shell


maddsua
HOBBY

a year ago

Wait do you have a local database instance or a json file of some sort containing your data?


frugofruit90
TRIALOP

a year ago

I have a local instance, I'll try your suggestion, thx!


maddsua
HOBBY

a year ago

Great!


maddsua
HOBBY

a year ago

That should definitely work


maddsua
HOBBY

a year ago

Ping me if you need any help with the thing, I'm on mobile so I might miss new messages


frugofruit90
TRIALOP

a year ago

It worked, thank you!


Loading...