Developer使用例
s3cmd
s3cmd を RustFS に接続し、コマンドラインから基本的なオブジェクト操作を行います。
s3cmd は、S3 互換ストレージ向けのコマンドラインクライアントです。小さな設定ファイルで、RustFS のエンドポイントを指定します。
インストール
# macOS
brew install s3cmd
# Debian/Ubuntu
sudo apt install s3cmd
# or via pip
pip install s3cmd設定
~/.s3cfg を作成します。localhost:9000 を実際のサーバーアドレスに置き換え、独自のアクセスキーを使います。RustFS はパススタイルアクセスを使うため、バケットのホストを同じエンドポイントに設定します。
[default]
access_key = <your-access-key>
secret_key = <your-secret-key>
host_base = localhost:9000
host_bucket = localhost:9000
use_https = False
signature_v2 = FalseTLS を設定している場合は、use_https = True にし、ポート 9000 を指定します。
検証
バケットを作成し、ファイルをアップロードして、一覧表示します。
s3cmd mb s3://my-bucket
s3cmd put /path/to/hello.txt s3://my-bucket/hello.txt
s3cmd ls s3://my-bucketupload: '/path/to/hello.txt' -> 's3://my-bucket/hello.txt' [1 of 1]
2026-07-16 10:00 12 s3://my-bucket/hello.txt