Volume getting auto wipe out
shaikat
PROOP

a year ago

Hi there, I am in hobby plan. I have created a persistent storage. However, after every new deployment the data in the volume is geting wiped. Am I doing anyting incorrectly? Is this an expected behavior?

18 Replies

shaikat
PROOP

a year ago

2825d179-16ab-4d3e-bf1b-c3b0d70e18ce


a year ago

if data is being wiped, that data is not being stored in the volume


shaikat
PROOP

a year ago

I can access the data using mounting path. But after redeploy it just becomes a fresh volume.


shaikat
PROOP

a year ago

How can I prevent it?


a year ago

you need to save data into the volume, your mount path is likely incorrect


shaikat
PROOP

a year ago

/app/data

This is the mounting path I have in setting.


a year ago

and are you sure that your app stores data in that same path?


shaikat
PROOP

a year ago

I think I am. Because I can access those using the same path.


shaikat
PROOP

a year ago

DATA_DIR = "./data"

In the app backend I have saving the data in thie above directly.


shaikat
PROOP

a year ago

Am I doing a mistake here?


a year ago

then your mounting dir should be just /data


shaikat
PROOP

a year ago

For example, if your application writes data to ./data, you should mount the volume to /app/data.

This is the instruction I was following.,


shaikat
PROOP

a year ago

All right. Let me try that.


a year ago

how did it go @mykabir ?


shaikat
PROOP

a year ago

It's still not working.


shaikat
PROOP

a year ago

Let say I want mount a path for an image directory. let say the name is image. What should be my mounting path and access path?


shaikat
PROOP

a year ago

I am using python. Does it anything to do with package type? Like hobby vs pro?


a year ago

No, there's no relation between plans.

Volumes are supposed to be simple, if your app uploads images to /data then your volume mounting path should be /data


Welcome!

Sign in to your Railway account to join the conversation.

Loading...