an S3 Rich Support client - rust edition 2018 - multi config - interactive command line tool - easy to debug with http protocol - AWS4, AWS2 support - support http redirect for multi region of AWS S3 - support automatically multipart upload
current status:
| COMMAND | FUNCTION | CEPH | AWS |
|----------------------------------------------------------------------|--------------------------------------------|------|-----|
| ls | list all buckets | O | O |
| ls bucket | list objects in the bucket | O | O |
| ls s3://bucket | list objects in the bucket | O | O |
| mb bucket | create bucket | O | O |
| rb bucket | delete bucket | O | O |
| put
| HIGH LEVEL COMMAND | INTEGRATE FUNCTIONS | CEPH | AWS | |--------------------|------------------------------------------------------------------------------------------|------|-----| | la | list all objects | O | O | | info s3://bucket | acl(ceph, aws), location(ceph, aws), versioning(ceph, aws), uploads(ceph), version(ceph) | O | O |
| CEPH OPS API (use system keys) | CEPH ONLY FUNCTION | |--------------------------------|-----------------------------------| | usage s3://bucket | show the bucket usage |
| SHELL SETTING COMMAND | FUNCTION | |-------------------------------|------------------------------------------| | s3_type [ceph/aws/aws4/aws2] | change the api for different S3 providor | | log [trace/debug/info/erro] | change the log level | | | - Info : for Http header and body | | | - debug: for auth signature hash info | | | - trace: more detail about rust | | logout | logout and reselect user | | Ctrl + d | logout and reselect user |
| S3 TYPE | AUTH TYPE | FORMAT | URL STYLE | |---------|-----------|--------|----------------------| | ceph | aws4 | json | path-style | | aws | aws4 | xml | virtual-hosted–style |
Install rust tools rustup and cargo
- curl https://sh.rustup.rs -sSf | sh
Additional package for ubuntu
- apt-get install libssl-dev
It is easy to install s3rs via cargo as following command.
- cargo install s3rs
Set up the path for rust binnary
- export PATH=$PATH:~/.cargo/bin
The config file will auto setup when binary first time launch
- s3rs
edit the config file at ~/.s3rs.toml
- vi ~/.s3rs.toml
Install rust tools rustup and cargo
- curl https://sh.rustup.rs -sSf | sh
- git clone https://github.com/yanganto/s3rs.git
- cargo test
- cargo build
- The excutable binary will in ./target/debug/s3rs