magento2-s3
magento2-s3 copied to clipboard
You are already using S3 as your media file storage backend!
Hi, I have followed all installation instructions and after running command php bin/magento s3:storage:export it shows the list of moving files but nothing is uploading to amazon s3 bucket and when I try to again run the command it give me below error You are already using S3 as your media file storage backend! Please help
@rudracomputech Consider posting error log. That would help understand the problem.
I think error that @rudracomputech described occurs because s3 storage is enable. Please do following steps and let us know if it helps?
- php bin/magento s3:storage:disable
- php bin/magento s3:storage:export
- php bin/magento s3:storage:enable
If you have correct url in Magento configuration for you media files set, all media should be loaded now from s3.
After week later I don't see point why I cannot export my media files when storage is enabled? Can anyone explain it to me please?
My catalog product cache All images are not getting uploaded to S3 when i am exporting images to S3.
@23ankit are caches in media/catalog directory?
Yes caches is there in media/catalog directory but when i export images to S3 all the images are not getting exported.
I had the same error message, and it turns out that if you have the extension enabled in your config.php
, there is no way to enable/disable it or to export images.
Config:
media_storage_configuration' => [
'media_storage' => '2',
...
]
A few suggestions:
- Remove the check at https://github.com/thaiphan/magento2-s3/blob/master/Console/Command/StorageExportCommand.php#L111. However, I don't know the implications for that diff, maybe the plugin author could have a better opinion on this.
- Create a new command called
reexport
that exports local files even if the extension is already enabled. This would be a safe fix, but might be futile if solution 1 could work.