How to migrate the image files to Amazon S3 for running sites

Chandra Bhattarai asked on April 24, 2022 08:58

For the running production site, I planned to migrate to Amazon S3 bucket. I tested it and found all new images are being uploaded and read from the S3. But how to make to point the images to S3 for all the old images after downloading all old images folder and uploading to S3.

https://docs.xperience.io/custom-development/working-with-physical-files-using-the-api/configuring-file-system-providers/configuring-amazon-s3

I am using Kentico 13.0.62

Recent Answers


Juraj Ondrus answered on April 24, 2022 11:41

Are you talking about media files or the page attachments?
If you mean media files, once you have the storage provider in place, just copy the original media library folders and files to S3 - just keep the same folder structure.
If you mean page attachments, you need to set the system to store files on file system - and then, once the file is requested, it will be copied to the S3 storage automatically. Or, you can save all the attachments to disk at once in System -> Files.

0 votesVote for this answer Mark as a Correct answer

Chandra Bhattarai answered on April 24, 2022 13:02

Hi Juraj,

Thank you for the answer. So you mean, After doing the instruction you mentioned and on proper configuration of S3 on web config/ appsetting.json, it will automatically point to the S3 for the old media files too? without pointing to local folder?

Thanks, Chandra

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on April 24, 2022 13:30

It depends what files you mean - as mentioned in my previous message. If you mean page attachments, you need to map given physical folder, which is set to store the files. You need to set the system to store files in file system. Then, when the image will be requested, it will be copied to the file system if not present there.
When using media files, you need to copy those files manually into respective folders.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.