7 months ago
Hello. I am deploying a service with a volume. The thing is, after I need to redeploy it (for a simple change in the cron job command), all the files in the volume associated with the service are deleted.
My question is: Is this the regular pattern of railway volume or am I doing something wrong?
5 Replies
7 months ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 volume data loss
- 🧵 Volume Data Loss
- 🧵 Data loss issue – Chatwoot service volume emptied unexpectedly
If you find the answer from one of these, please let us know by solving the thread!
7 months ago
Are you 100% sure that you're saving the files to the directory the volume is mounted on?
samgordon
Are you 100% sure that you're saving the files to the directory the volume is mounted on?
6 months ago
Currently, my volume mount path is "/Boletos" and the code of the service associated with is:
filename = f"{name} {date}.pdf"
file_path = os.path.join("Boletos", filename)
save_pdf(file_path)
I assume that the files are being written in the volume, because my code sends me an e-mail every day with all the files saved in the directory "Boletos", and the files increases every day - meaning that the files are persistent. I suppose that if I wasn't saving in the volume, I wouldn't receive the e-mail with older files.
I tried to use the filebrowser template to see the files. However, when I try to deploy, with the mount path as "/Boletos" or "Data", and both shows this error: /orchestrator.RouterLegacyService/CreateDeployment UNKNOWN: error creating container: could not parse throttle device at /dev/zvol/railway_0/vol_2nikq9z68xzijdwu: no such file or directory
vintage2190
Currently, my volume mount path is "/Boletos" and the code of the service associated with is: filename = f"{name} {date}.pdf" file\_path = os.path.join("Boletos", filename) save\_pdf(file\_path) I assume that the files are being written in the volume, because my code sends me an e-mail every day with all the files saved in the directory "Boletos", and the files increases every day - meaning that the files are persistent. I suppose that if I wasn't saving in the volume, I wouldn't receive the e-mail with older files. I tried to use the filebrowser template to see the files. However, when I try to deploy, with the mount path as "/Boletos" or "Data", and both shows this error: /orchestrator.RouterLegacyService/CreateDeployment UNKNOWN: error creating container: could not parse throttle device at /dev/zvol/railway\_0/vol\_2nikq9z68xzijdwu: no such file or directory
6 months ago
Your file path is actually just pointing to ./Boletos, when your volume is at /Boletos.
You just need to change your file_path to:
file_path = os.path.join("/Boletos", filename)
6 months ago
Regarding that error when using the mount path... can you screenshot that? Is it during build? When does it happen?