New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script to change local-storage to AWS #7907
Comments
@jmelati @sojan-official, This issue is still open? I would like to work on it |
@FranciscoJBrito please go ahead. |
It's cool that this discussion already exists here on Github, I have the same need. |
I am on the same need. I had an installation done from ctwl script. And now i did a migration to a docker installation using CapRover. I need to migrate the blobs to a minIo bucket. |
Also the same need. |
@FranciscoJBrito , just a comment, maybe can help. I have run the script suggested by @sojan-official , and works fine, the blobs are really imported to the S3 (minIO, in my case). The problem is that, even when it is already imported, Chatwoot still uses the local folder, so if I delete the "/app/storage" folder, I cannot access the data, even when is already in the S3. This happened with the old data in local storage, because the new one is going to the S3. I discovered that if I change the "service_name" in the "active_storage_blob" to "s3_compatible", works fine. I think there is something missing here: Maybe you already resolved this in the #9117 PR. Just an observation, because I am new in rails. |
Hi @dlc-letelier 👋🏻. P.S.: Make sure to correctly configure the providers in the file |
Hi @FranciscoJBrito , |
@dlc-letelier this script is intended to migrate content that you already have stored in your active storage 'local', to a cloud provider, but it will not change the active storage configuration (by default it will still be 'local'). If you want to change the default configuration you can do it manually in the file |
Understood. I'am using Kubernetes, so I do not have to change the environments file, but the values.yaml. But even changing to 's3_compatibles', only the new files are save and read from the S3. The old ones, already migrated to the S3, are taken from the local. |
…change-local-storage-to-aws
@FranciscoJBrito I noticed you talked about YAML files, my deployment was with docker. The only configuration file I have is a .ENV Will it work the same? |
Hi @hiagodotme, yes in your |
Thank you very much! Today I managed to take some time to do my migration. Just a consideration for @FranciscoJBrito PR #9117 . I had files that were removed, I believe it was because someone had deleted a message with an attachment (as I performed a delete on the storage table and everything went well). However, a tip to improve the implementation is to ignore files that were not found and in the end create a not_found_log.txt. Thank you again. |
@FranciscoJBrito I also noticed that files received via WhatsApp and email channels were not uploaded to AWS. I placed a comment here displaying the line that prevented the upload: https://github.com/chatroot/chatroot/pull/9117/commits/5c350348d63af1b1cfd807412cc11fc616044da2 |
@hiagodotme, perfect, I will make the modification so that you can migrate any type of file as soon as I can |
Is your feature or enhancement related to a problem? Please describe.
It would be interesting a script to migrate the images that are in a "local storage" installation to an "AWS" type cloud.
I've been using it in a production environment for some time now, and I only felt the need now.
Wish I had the option to migrate.
Describe the solution you'd like
A script who do this migration.
Describe alternatives you've considered
A step-by-step for this.
Additional context
No response
The text was updated successfully, but these errors were encountered: