a month ago
I have a postgres service with my production database, since the outage i havent been able to connect and my app is down. I saw that restarting the service can fix the problem i would like to know if there is a chance that i lose my data doing that. thanks in advance.
3 Replies
a month ago
If you deployed the template postgres that we provide you shouldnt lose any data no!
It uses a persistent volume.
Status changed to Awaiting User Response Railway • 29 days ago
noahd
If you deployed the template postgres that we provide you shouldnt lose any data no!It uses a persistent volume.
a month ago
I'm losing my data from my tables when I restart and redeploy, tables are there but no data, I was going to reach out today and saw this post
Status changed to Awaiting Railway Response Railway • 28 days ago
a month ago
Based on what I see, I think you may have resolved the issue already, but let us know if you have not.
Data persistence on Railway requires a volume attached to the service, mounted at the correct path - for Postgres, that's /var/lib/postgresql/data. If data is disappearing on restart while tables remain, the volume may not be attached or may be mounted to a different path than where Postgres stores its data. I notice you have two volumes in your project, so maybe the right one was not attached?
Status changed to Awaiting User Response Railway • 28 days ago
21 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 21 days ago