Related Links
Integrate the s4cmd Command Line Utility with IDrive® e2
S4cmd is a Python command-line utility that accelerates file management on S3 and S3-compatible storage by enabling fast bulk transfers, multipart uploads, parallel execution, and reliable directory synchronization. It supports uploads, downloads, moves, deletes, and scripted automation for large-scale data workflows. Integrating S4cmd with IDrive® e2 gives you a capable and scalable cloud object storage solution that supports systematic integration for efficient, high-performance data operations.
Prerequisites
Before you begin, ensure the following:
- An active IDrive® e2 account. Sign up here if you do not have one.
- A bucket in IDrive® e2. See how to create a bucket.
- Valid Access Key ID and Secret Access Key. Learn how to create an access key.
- s4cmd command line utility.
Install the s4cmd Command Line Utility
- Install s4cmd using the command below.
pip install s4cmd - Copy or create a symbolic link so you can run s4cmd.py as s4cmd:
$ln -s .local/lib/python3.7/site-packages/s4cmd.py s4cmd
Configure s4cmd Command Line Utility with IDrive® e2
- Create a directory to keep your IDrive® e2 credentials (s4cmd uses the same credentials file as AWS CLI).
$ mkdir ~/.aws - Enter Access and Secret keys in the created AWS directory.
$ vi ~/.aws/credentials (Or use nano)
Format:
[default]
aws_access_key_id = CNUD0gIlerxucyN*****
aws_secret_access_key = k0B9tZa2xhgDjf1o8OHl9LZwMN21Fs8zQHD*****
Using s4cmd
- List buckets from your IDrive® e2 account.
$ s4cmd --endpoint-url=https://r4a6.or5.idrivee2-75.com ls
- Create a bucket.
$ s4cmd --endpoint-url=https://r4a6.or5.idrivee2-75.com mb s3://s3cmdbkt - Copy/Upload file to your IDrive® e2 Bucket.
$ s4cmd --endpoint-url=https://r4a6.or5.idrivee2-75.com cp image.jpg
s3://s3cmdbkt
For a full list of commands and features, visit the official s4cmd page.