I have a Ruby on Rails site with models using CarrierWave for file handling, currently using local storage. I want to start using cloud storage and I need to migrate existing lo
I have migrated the Carrier wave files to Amazon s3 with s3cmd and it works.
Here are the steps to follow:
sudo apt-get install s3cmd
s3cmd --configure
.
You would need to enter public and secret key here, provided by Amazon.s3cmd sync /path_to_your_files ://bucket_name/
--acl-public
to upload the file as public and avoid permission issues.Notes:
sync
will not duplicate your records. It will first check if the file is present on remote server or not.