Skip to content
I need help with postgres restore database
vinhqua
OP

2 years ago

I followed this article but came with an error

https://blog.railway.app/p/postgre-backup

Closed

38 Replies

vinhqua
OP

2 years ago

53b9fe5c-d166-46c5-bd1a-8280edc67251


2 years ago

what was the command ran to take the backup?


vinhqua
OP

2 years ago

pg_restore -U postgres -h autorack.proxy.rlwy.net -p 28543 -W -F t -d railway SCHOOL_MANAGER


2 years ago

im sorry but that doesnt quite answer my question


vinhqua
OP

2 years ago

pg_dump -U postgres -h monorail.proxy.rlwy.net -p 30383 -W -F t railway > SCHOOL_MANAGER


vinhqua
OP

2 years ago


vinhqua
OP

2 years ago

How's it going?


2 years ago

what version of pg_dump are you using?


vinhqua
OP

2 years ago

16.3


vinhqua
OP

2 years ago


2 years ago

and what about pg_restore?


vinhqua
OP

2 years ago


vinhqua
OP

2 years ago

same


2 years ago

i cant reproduce the issue with pg_restore / pg_dump 16.x, i ran the same commands you gave me


vinhqua
OP

2 years ago

can you give me the file/


vinhqua
OP

2 years ago

the backup file


vinhqua
OP

2 years ago

I used the file which I backed up 2 months ago, it works just fine, but not the new one


2 years ago

i didnt take a backup of your database lol


vinhqua
OP

2 years ago

Then does my database create the issue?


2 years ago

i assume its a bad file


vinhqua
OP

2 years ago

how come?


2 years ago

because restoring from the file doesnt work


vinhqua
OP

2 years ago

Can I swap postgres database between prod and dev environment


2 years ago

nope, you would want to use pg_dump and pg_restore for that


vinhqua
OP

2 years ago


vinhqua
OP

2 years ago

I made progress with an new error


2 years ago

you need to use the public host and port


vinhqua
OP

2 years ago


vinhqua
OP

2 years ago

this one right?


2 years ago

thats the internal host


vinhqua
OP

2 years ago

where can I find it?


vinhqua
OP

2 years ago


vinhqua
OP

2 years ago

why it has two ports?


2 years ago

external and internal


vinhqua
OP

2 years ago


vinhqua
OP

2 years ago

procceed with an new error


2 years ago

i honestly dont know, unfortunately theres not all that much i can do here as we cant really provide support for 3rd party software


vinhqua
OP

2 years ago

Well it finished with a warning the data was restored safely, thanks anyway


Welcome!

Sign in to your Railway account to join the conversation.

Loading...