S3cmd#

To enjoy advanced object storage management capabilities, use S3cmd utility. Here are the required steps for configuring the utility to work with the K2 Cloud object storage.

Installing S3cmd#

Before installation, get API access settings in the CROC Cloud management console. Click the user login in the top right corner, select Profile Get API access settings.

To install S3cmd utility, follow the instruction.

Configure S3cmd#

Configure S3cmd with the command:

# s3cmd --configure

Enter 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.
Leave them empty for using the env variables.

Access Key: <Project ID in K2 Cloud>:<Your login to K2 Cloud>
Secret Key: XXXXXXXXXXXXXXXXXXXXXX
Default Region [US]:

Use "s3.amazonaws.com" for S3 Endpoint and not modify it to the target Amazon S3.
S3 Endpoint [s3.amazonaws.com]: s3.k2.cloud

Use "%(bucket)s.s3.amazonaws.com" to the target Amazon S3.
"%(bucket)s" and "%(location)s" vars can be used
if the target S3 system supports dns based buckets.
DNS-style bucket+hostname:port template for accessing
a bucket [%(bucket)s.s3.amazonaws.com]: %(bucket)s.s3.k2.cloud

Encryption password is used to protect your files from reading
by unauthorized persons while in transfer to S3
Encryption password:
Path to GPG program [/usr/bin/gpg]:

When 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 only be proxied with Python 2.7 or newer
Use HTTPS protocol [No]: yes

On some networks all internet access must go through a HTTP proxy.
Try setting it here if you can't connect to S3 directly
HTTP Proxy server name:

New settings:
Access Key: <Project ID in K2 Cloud>:<Your login to K2 Cloud>
Secret Key: XXXXXXXXXXXXXXXXXXXXXX
Default Region: US
S3 Endpoint: s3.k2.cloud
DNS-style bucket+hostname:port template for accessing a bucket: %(bucket)s.s3.k2.cloud
Encryption password:
Path to GPG program: /usr/bin/gpg
Use HTTPS protocol: True
HTTP Proxy server name:
HTTP Proxy server port: 0

Test access with supplied credentials? [Y/n] y

Save settings? [y/N] y

The settings are saved in the configuration file ~/.s3cfg.

How to use S3cmd#

To get help how to use the utility, enter the following command:

s3cmd --help