I need help with postgres restore database

vinhqua
HOBBY

9 months ago

I followed this article but came with an error
https://blog.railway.app/p/postgre-backup

0 Replies

vinhqua
HOBBY

9 months ago

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


9 months ago

what was the command ran to take the backup?


vinhqua
HOBBY

9 months ago

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


9 months ago

im sorry but that doesnt quite answer my question


vinhqua
HOBBY

9 months ago

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


vinhqua
HOBBY

9 months ago


vinhqua
HOBBY

9 months ago

How's it going?


9 months ago

what version of pg_dump are you using?


vinhqua
HOBBY

9 months ago

16.3


vinhqua
HOBBY

9 months ago

1299066783948607500


9 months ago

and what about pg_restore?


vinhqua
HOBBY

9 months ago

1299069556442271700


vinhqua
HOBBY

9 months ago

same


9 months ago

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


vinhqua
HOBBY

9 months ago

can you give me the file/


vinhqua
HOBBY

9 months ago

the backup file


vinhqua
HOBBY

9 months ago

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


9 months ago

i didnt take a backup of your database lol


vinhqua
HOBBY

9 months ago

Then does my database create the issue?


9 months ago

i assume its a bad file


vinhqua
HOBBY

9 months ago

how come?


9 months ago

because restoring from the file doesnt work


vinhqua
HOBBY

9 months ago

Can I swap postgres database between prod and dev environment


9 months ago

nope, you would want to use pgdump and pgrestore for that


vinhqua
HOBBY

9 months ago

1299224156537360400


vinhqua
HOBBY

9 months ago

I made progress with an new error


9 months ago

you need to use the public host and port


vinhqua
HOBBY

9 months ago

1299224575288283100


vinhqua
HOBBY

9 months ago

this one right?


9 months ago

thats the internal host


vinhqua
HOBBY

9 months ago

where can I find it?


vinhqua
HOBBY

9 months ago

1299225007918153700


vinhqua
HOBBY

9 months ago

why it has two ports?


9 months ago

external and internal


vinhqua
HOBBY

9 months ago

1299225651680903200


vinhqua
HOBBY

9 months ago

procceed with an new error


9 months 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
HOBBY

9 months ago

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