Tooling : s3cmd#
Installation#
On 2021-11-18, there is no official way to install it. Try one of :
sudo apt install s3cmdnix-env -iA nixpkgs.s3cmd(update your chan before installing :nix-channel --update nixpkgs)- get it from https://s3tools.org/s3cmd
Configuration#
Edit ${HOME}/.s3cfg :
access_key = xxxxxxxxxxxxxxxxxxxxxx
secret_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
bucket_location = eu-west-0
host_base = oss.eu-west-0.prod-cloud-ocb.orange-business.com
host_bucket = %(bucket)s.oss.eu-west-0.prod-cloud-ocb.orange-business.com
Get AK/SK from vault or from a pod that uses them. Or follow the procedure : * FE : https://docs.prod-cloud-ocb.orange-business.com/ugs3cmd/obs/en-us_topic_0076545672.html
Note : you may create files like ${HOME}/.s3cfg-<client name>.asc and generate the .s3cfg file with :
gpg -d ${HOME}/.s3cfg-<client name>.asc > ${HOME}/.s3cfg
Utilisation#
Examples of use :
$ s3cmd --help
$ s3cmd ls s3://thanos-cloud-caascad-ocb-test01
$ s3cmd del s3://thanos-cloud-caascad-ocb-test01/some_file
$ s3cmd del -r s3://thanos-cloud-caascad-ocb-test01/some_dir
$ s3cmd get s3://thanos-cloud-caascad-ocb-test01/some_file - | md5sum