Go to main content

Oracle® ZFS Storage Appliance Object API Guide for Amazon S3 Service Support, Release OS8.8.0

Exit Print View

Updated: January 2019
 
 

s3cmd

The following sections provide example information to help you install, configure, and use the s3cmd command-line tool that is an independent development of the official s3cmd tool. For additional information about this tool, refer to the official product documentation listed under Related Information.

Installation Example: s3cmd Client


Note -  The Oracle ZFS Storage Appliance S3 Object API Service does not support the official S3cmd command-line client tool.

In this example, the GitHub address is used to clone and install the eucalyptus/s3cmd client.

git clone https://github.com/eucalyptus/s3cmd
cd s3cmd
python setup.py install

Configuration Example: s3cmd Client

Prior to accessing the Oracle ZFS Storage Appliance S3 Object API Service, the eucalyptus/s3cmd client must be configured. The following example creates a default configuration file manually, which eliminates a need to provide an s3cfg file for each client session.

cat s3cfg

[default]
access_key = your_access_key-ID
host_base = hostname.example.com
host_bucket = hostname.example.com
service_path = /s3/v1/export/S3_enabled_share
use_https = False
secret_key = your_secret key

Where:

  • The access_key property points to the key required for S3 Authentication. For additional details, see Authentication for S3 API.

  • The host_base and host_bucket properties point to the network address of the Oracle ZFS Storage Appliance system.

  • The service_path property points to the share object store that was enabled for S3 service.

  • The use_https property enables you set the HTTPS service. For instance, set the use_https property to False to disable the HTTPS service or set it to True to enable the HTTPS service.

  • The secret_key property points to the secret key generated for S3 authentication.

Usage Examples: s3cmd Client

The following examples show interaction with the Oracle ZFS Storage Appliance S3 Object API Service. Additional usage information about the s3cmd command-line tool is available at the s3tools web site (http://s3tools.org/usage).

s3cmd -c s3cfg ls                                      # list all buckets
s3cmd -c s3cfg mb s3://new_bucket                      # make a new bucket called new_bucket
s3cmd -c s3cfg put abc.txt s3://new_bucket             # upload file abc.txt to new_bucket
s3cmd -c s3cfg ls s3://new_bucket                      # list all objects in new_bucket
s3cmd -c s3cfg get s3://new_bucket/abc.txt abc.2.txt   # download object abc.txt from new_bucket to a new file abc.2.txt
s3cmd -c s3cfg del s3://new_bucket/abc.txt             # delete object abc.txt from new_bucket
s3cmd -c s3cfg rb s3://new_bucket                      # delete bucket new_bucket
s3cmd -c s3cfg <cmd> <parameters> --deug               # enable debug mode

Related Information