How to use AWS CLI v2 and s3cmd with e3 Object Storage
Connection settings: Connection details.
e3 Object Storage: Linux CLI Guide
Welcome! This guide shows you how to use AWS CLI v2 and s3cmd with eazyBackup e3 Object Storage.
You can copy and paste the example commands as-is, replacing the placeholders where noted.
What You Need
Your e3
ACCESS_KEYYour e3
SECRET_KEYYour bucket name
Linux shell access
Our S3-compatible endpoint used in examples:
s3.ca-central-1.eazybackup.comEnvironment variables:
Set the recommended environment variables in your terminal session:
export ACCESS_KEY="<YOUR_E3_ACCESS_KEY>"
export SECRET_KEY="<YOUR_E3_SECRET_KEY>"
export ENDPOINT="s3.ca-central-1.eazybackup.com"
export ENDPOINT_URL="https://$ENDPOINT"
export REGION="ca-central-1"
export BUCKET="<YOUR_BUCKET_NAME>"Option A: AWS CLI v2
AWS CLI is Amazon's official CLI, but it works great with e3 when you provide a custom endpoint.
A more permanent setup: use an e3 profile
Most users prefer a named AWS profile so they do not have to export credentials every time.
Create an
e3profile:
When prompted:
AWS Access Key ID: your e3 access key
AWS Secret Access Key: your e3 secret key
Default region name:
ca-central-1Default output format: (optional)
json
Set e3-friendly S3 settings for that profile:
Where AWS CLI stores credentials (~/.aws/credentials)
AWS CLI profiles are stored in two files in your home directory:
~/.aws/credentials: secrets (access keys)~/.aws/config: profile settings (region, S3 addressing style, etc.)
If you use aws configure --profile e3, AWS CLI will create/update these files for you.
You can also create them manually.
Create the directory:
Create or edit ~/.aws/credentials:
Lock down permissions:
Create or edit ~/.aws/config:
Then use the profile in commands:
Notes:
You will still supply the e3 endpoint on commands using
--endpoint-url "$ENDPOINT_URL"(We have found that AWS CLI does not reliably store an endpoint override in the profile for all commands).Keeping e3 in its own profile helps avoid accidentally talking to AWS S3 with the same commands.
Install AWS CLI v2 on Linux
Configure for e3
Why virtual:
It uses bucket subdomain style (
bucket.endpoint), which we recommend for e3.
Convenience: an aws-e3 wrapper (optional)
If you want to avoid typing --endpoint-url and --profile every time, add this to your shell profile (for example ~/.bashrc):
Then you can run:
AWS CLI Examples
List buckets:
List objects in a bucket:
Upload a file (PUT):
Download a file (GET):
Delete object:
Get object metadata:
Option B: s3cmd
s3cmd is a popular third-party S3 client and works with e3 when configured correctly.
Install s3cmd on Linux
Ubuntu/Debian:
Configure s3cmd for e3
Create a dedicated config:
s3cmd Examples
List buckets:
List objects in a bucket:
Upload a file (PUT):
Download a file (GET):
Delete object:
Get object info:
Troubleshooting
InvalidAccessKeyId with s3cmd
Most common cause:
host_bucketis not set correctly.
Fix:
Use
host_bucket = %(bucket)s.s3.ca-central-1.eazybackup.com.
FAQ
Is e3 the same as AWS S3?
e3 is S3-compatible, not AWS itself. That means most standard S3 tools work, but you will need to provide the e3 endpoint and correct addressing configuration.
Which client should I use?
We prefer AWS CLI v2 for most workflows.
Use s3cmd if you prefer its command style, but be sure to configure
host_bucketexplicitly.