I need help with postgres restore database
vinhqua
HOBBYOP

2 years ago

I followed this article but came with an error

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

38 Replies

vinhqua
HOBBYOP

2 years ago

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


2 years ago

what was the command ran to take the backup?


vinhqua
HOBBYOP

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
HOBBYOP

2 years ago

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


vinhqua
HOBBYOP

2 years ago


vinhqua
HOBBYOP

2 years ago

How's it going?


2 years ago

what version of pg_dump are you using?


vinhqua
HOBBYOP

2 years ago

16.3


vinhqua
HOBBYOP

2 years ago

1299066783948607558


2 years ago

and what about pg_restore?


vinhqua
HOBBYOP

2 years ago

1299069556442271826


vinhqua
HOBBYOP

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
HOBBYOP

2 years ago

can you give me the file/


vinhqua
HOBBYOP

2 years ago

the backup file


vinhqua
HOBBYOP

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
HOBBYOP

2 years ago

Then does my database create the issue?


2 years ago

i assume its a bad file


vinhqua
HOBBYOP

2 years ago

how come?


2 years ago

because restoring from the file doesnt work


vinhqua
HOBBYOP

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
HOBBYOP

2 years ago

1299224156537360406


vinhqua
HOBBYOP

2 years ago

I made progress with an new error


2 years ago

you need to use the public host and port


vinhqua
HOBBYOP

2 years ago

1299224575288283196


vinhqua
HOBBYOP

2 years ago

this one right?


2 years ago

thats the internal host


vinhqua
HOBBYOP

2 years ago

where can I find it?


vinhqua
HOBBYOP

2 years ago

1299225007918153758


vinhqua
HOBBYOP

2 years ago

why it has two ports?


2 years ago

external and internal


vinhqua
HOBBYOP

2 years ago

1299225651680903228


vinhqua
HOBBYOP

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
HOBBYOP

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...