Good day everyone! In our previous article entry we were able to successfully push and put files to our Amazon AWS s3 Bucket. What if we wanted to pull them down at one point? In this blog entry we are going to be working on pull files down locally to our Linux Web Server or our local Linux or Mac machines.
- You have setup an Amazon S3 Bucket.
- You have installed Amazon S3cmd on your web server or local machine.
- You have knowledge on how to navigate the command line.
Since we have done all our prerequisites above this entry is going to be rather short for once!
1.) Begin by opening the command prompt or terminal on your local machine or web server.
2.) Once there we will proceed with the command below which will allow us to GET the particular file that we have in our Amazon S3 Bucket:
Before this command is run you need to ensure that you are in the location of where you want to pull the file TO on your local machine or web server. So if you wanted to pull my jimmy_wichard.jpg image to our desktop or to say /var/www/images/ you will need to be in that particular directory THEN proceed with running to command below. Got it? Great! Run the command in the directory where you want to place file:
s3cmd get s3://my-test-bucket-20/jimmy_wichard.jpg
Easy enough huh? We have now pulled our jimmy_wichard.jpg file from our Amazon S3 Bucket called
my-test-bucket-20 from our bucket using the
Now I do understand that you may want to pull more than one file at once and exclude directories that you wish to ignore. In future entires I will walk you through some of these steps in another how to entry, but for now let’s enjoy our small success and enjoy the rest of our day!