S5cmd CLI configuration for private object Storage
1 min readAug 1, 2024
S5cmd is a fast and efficient command-line utility for interacting with S3-compatible Object Storage services.
Installation
To install s5cmd for your platform:
- Linux: Download the latest release for your platform from the GitHub repository, unpack the archive, and move the executable to
/usr/local/bin
. - macOS: Install with Homebrew:
$ brew install peak/tap/s5cmd
- Windows: Download the latest release for your platform from the GitHub repository, unpack the archive, and place the
.exe
file in a directory in your system path.
s5cmd configuration is not the same as s3cmd configuration. To configure s5cmd is as below
Configuration
- Create a file that stores object storage credentials
mkdir -p root/s5/credentials
[default]
aws_access_key_id = xxxxx
aws_secret_access_key = xxxxx
2. Use the following command to check
1. To List file in pirticular Bucket:
s5cmd --endpoint-url https://staas-bbs1.cloud.gov.in --credentials-file /root/s5/credentials ls s3://bucket-name/ --log=trace
2. To sync object from local to object storage
s5cmd --credentials-file /root/s5/credentials --endpoint-url https://<end-point-url>/ sync /tmp_bkp/ s3://m-backup/filestore_prod_s5_vv/
3. Enjoy !!!