I need help with postgres restore database

I followed this article but came with an error https://blog.railway.app/p/postgre-backup
Railway Blog
How to Backup and Restore Your Postgres Database
In this post, we will go over the process of backing up and restoring your Postgres database hosted on Railway.
No description
No description
35 Replies
Percy
Percy4w ago
Project ID: 53b9fe5c-d166-46c5-bd1a-8280edc67251
Vinh Qua
Vinh QuaOP4w ago
53b9fe5c-d166-46c5-bd1a-8280edc67251
Brody
Brody4w ago
what was the command ran to take the backup?
Vinh Qua
Vinh QuaOP4w ago
pg_restore -U postgres -h autorack.proxy.rlwy.net -p 28543 -W -F t -d railway SCHOOL_MANAGER
Brody
Brody4w ago
im sorry but that doesnt quite answer my question
Vinh Qua
Vinh QuaOP4w ago
pg_dump -U postgres -h monorail.proxy.rlwy.net -p 30383 -W -F t railway > SCHOOL_MANAGER How's it going?
Brody
Brody4w ago
what version of pg_dump are you using?
Vinh Qua
Vinh QuaOP4w ago
16.3
Vinh Qua
Vinh QuaOP4w ago
No description
Brody
Brody4w ago
and what about pg_restore?
Vinh Qua
Vinh QuaOP4w ago
No description
Vinh Qua
Vinh QuaOP4w ago
same
Brody
Brody4w ago
i cant reproduce the issue with pg_restore / pg_dump 16.x, i ran the same commands you gave me
Vinh Qua
Vinh QuaOP4w ago
can you give me the file/ the backup file I used the file which I backed up 2 months ago, it works just fine, but not the new one
Brody
Brody4w ago
i didnt take a backup of your database lol
Vinh Qua
Vinh QuaOP4w ago
Then does my database create the issue?
Brody
Brody4w ago
i assume its a bad file
Vinh Qua
Vinh QuaOP4w ago
how come?
Brody
Brody4w ago
because restoring from the file doesnt work
Vinh Qua
Vinh QuaOP4w ago
Can I swap postgres database between prod and dev environment
Brody
Brody4w ago
nope, you would want to use pg_dump and pg_restore for that
Vinh Qua
Vinh QuaOP4w ago
No description
Vinh Qua
Vinh QuaOP4w ago
I made progress with an new error
Brody
Brody4w ago
you need to use the public host and port
Vinh Qua
Vinh QuaOP4w ago
No description
Vinh Qua
Vinh QuaOP4w ago
this one right?
Brody
Brody4w ago
thats the internal host
Vinh Qua
Vinh QuaOP4w ago
where can I find it?
Vinh Qua
Vinh QuaOP4w ago
No description
Vinh Qua
Vinh QuaOP4w ago
why it has two ports?
Brody
Brody4w ago
external and internal
Vinh Qua
Vinh QuaOP4w ago
No description
Vinh Qua
Vinh QuaOP4w ago
procceed with an new error
Brody
Brody4w 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
Vinh Qua
Vinh QuaOP4w ago
Well it finished with a warning the data was restored safely, thanks anyway
Want results from more Discord servers?
Add your server