S3cmd is created for managing S3 buckets on Linux servers. But we also use this tool on windows servers as well. This article will help you to setup s3cmd in windows systems. If you are searching here to setup s3cmd on Linux system read next article install s3cmd on Linux.
S3cmd System Requirements: s3cmd required Python 2.7 or greater version to run. We also need to install GPG.
Step 1 – Install Python
Download and install python 2.7 or the higher version from python official site and install it.
After installing python, append the Python in
C:> python --version Python 2.7.6
Step 2 – Install GPG on Windows
Gpg4win (GNU Privacy Guard for Windows) is Free Software to install. Use the following link to download and install it.
Step 3 – Configure S3cmd
Download latest s3cmd source code from s3cmd official page and extract to c:s3cmd location.
After extracting source code, use following command to setup s3 environment. It will ask for your s3 accounts AccessKey and SecretKey, the path to GPG command like below.
python s3cmd --configureEnter new values or accept defaults in brackets with Enter. Refer to user manual for detailed description of all options. Access key and Secret key are your identifiers for Amazon S3 Access Key: XXXXXXXXXXXXXXXXXXXXSecret Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXEncryption password is used to protect your files from reading by unauthorized persons while in transfer to S3 Encryption password: XXXXXXXXXPath to GPG program: C:\Program Files (x86)\GNU\GnuPG\gpg2.exeWhen using secure HTTPS protocol all communication with Amazon S3 servers is protected from 3rd party eavesdropping. This method is slower than plain HTTP and can't be used if you're behind a proxy Use HTTPS protocol [No]: YesNew settings: Access Key: XXXXXXXXXXXXXXXXXXXX Secret Key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Encryption password: XXXXXXXXX Path to GPG program: C:Program Files (x86)GNUGnuPGgpg2.exe Use HTTPS protocol: True HTTP Proxy server name: HTTP Proxy server port: 0 Test access with supplied credentials? [Y/n] YPlease wait, attempting to list all buckets... Success. Your access key and secret key worked fine :-) Now verifying that encryption works... Success. Encryption and decryption worked fine :-) Save settings? [y/N] YConfiguration saved to 'C:\Users\Administrator\Application Data\s3cmd.ini'
Step 4 – Verify S3cmd
To verify s3cmd configuration use following command. It will list the buckets create in your configured s3 account.
C:> python c:\s3cmd\s3cmd ls 2014-02-03 06:37 s3://tecadmin 2014-03-29 07:56 s3://tecadminbackups