I am working on a project using Rails as my backend API server. Uploading clients' files will be one of the most important part of this application (it is something like a CRM/ERP system). However, my client prefer storing all the data and files into their own server due to security and privacy issues of their clients.
However, while I am reading the documents of ActiveStorage, it sounds like :disk
option is just used for test
and development
environment. I understand using cloud storage like s3 would benefit on scalability and backup stuffs that are much secure and flexible for web development, but after all, you know, client's requirement.
1) Therefore, would like to know is it not preferred to use :disk
on any production environment? What will be the cons that I may miss out?
Also, will it be hard for me to do backup for the files, as I saw in the /storage
path, the files are all saved not into the same names of the original files.
I am having a guess that, could I just backup the whole sites by just doing pg_dump
and a clone of the entire site directory including the /storage
file (they will be gitignore, so I need to backup them by myself and do some git clone git pull stuff while doing recovery or server transition). Will this workflow work flawlessly?
2) What should be the actual backup and recover flow if I use :disk
option in ActiveStorage?
Thanks for your help, and am appreciate any of your helps!