Created 1/16/2016 jamshid.afshar · Updated 4/14/2017 jamshid.afshar
The S3CMD command-line utility is a popular open-source tool. http://s3tools.org/s3cmd [http://s3tools.org/s3cmd]
It has two main uses with Content Gateway:
- Easy command-line syncing of files to and from a Swarm domain
- Help with diagnosing and verifying a Content Gateway environment
INSTALLING AND CONFIGURING S3CMD
The .s3cfg file configures the s3cmd utility so that it can access your Caringo Content Gateway domain. In this example, the domain you've Created and want to access is MYDOMAIN.EXAMPLE.COM and the cloudgateway S3 endpoint is running at 192.168.99.100:8082.
Important: Your machine must be able to resolve the domain name as the Content Gateway S3 gateway IP address. In a production environment, this would involve DNS configuration of wildcard domains, but you can simply edit your hosts file when using s3cmd locally.
- Using OS X brew or python pip install s3cmd [https://github.com/s3tools/s3cmd/blob/master/INSTALL]
- Windows: Install python 2.7 and pip. For more info see README [https://github.com/s3tools/s3cmd/blob/master/README.md]
sudo pip install s3cmd
- Verify that that s3cmd is version 1.5.2 or later:
s3cmd --version
- Edit your /etc/hosts (or c:WindowsSystem32etchosts) file and add a mapping for your domain to your Content Gateway IP address. For example:
192.168.99.100 mydomain.example.com
- Edit your ~/.S3CFG file and paste into it all of these settings. Note: if you don't increase part size here, use command-line argument --multipart-chunk-size-mb=100 on s3cmd put/sync:
...