Moving your media file from Linux server to Amazon s3 using s3cmd
s3 is one of the most reliable when it comes to storing your data . let it be for for your web application, mobile app or anything.Industry leading tech giants like Netflix, Airbnb use it for storing its content. This shows the reliable, scalable and the uptime performance of Amazon s3.
We will be looking at how do we move our content from our server to Amazon s3 using s3cmd.
On an debian/unbuntu type the following command to install s3cmd.
Installing s3cmd
sudo apt-get install s3cmd
Configure s3cmd
s3cmd --configure
the command will ask for Access Key , Secret Key, Bucket Name & few options.
Retrieving Access Key From AWS
For retrieving your Access Key and Secret Key, In the AWS Console, click my security credentials at the top right for your profile.
You can create a new access key for use an old one from Access Keys column.
Now, it's time to move your file/folder from server to s3.
Move a single file to s3
s3cmd put file.txt s3://folder/
Move a folder to s3
s3cmd put --recursive source-folder s3://destination-folder