Page tree
Skip to end of metadata
Go to start of metadata


Docker

  • docker pull minio/mc

Linux

  • wget https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc


Microsoft

  • https://dl.min.io/client/mc/release/windows-amd64/mc.exe

Running the minio client


Docker

  • docker run --rm --name minio-client -it -v ${HOME}/.mc:/root/.mc --entrypoint=/bin/sh minio/mc



Via .bash.rc

  • alias mc='docker run --rm --name minio-client -it -v ${HOME}/.mc:/root/.mc minio/mc'


Linux

  • /path/to/mc

Creating Config aliases

Frankfurt, DE

  • mc alias set s3-thgosting-fra https://external.object.de.thghosting.cloud <ACCESS KEY> <SECRET KEY> --api S3v4


London, UK

  • mc alias set s3-thgosting-lon https://external.object.gb.thghosting.cloud <ACCESS KEY> <SECRET KEY> --api S3v4





Dallas, US

  • mc alias set s3-thgosting-dfw https://external.object.us-central.thghosting.cloud <ACCESS KEY> <SECRET KEY> --api S3v4

Bucket Operations


Creating a bucket


mc mb <ALIAS>/<BUCKET NAME>

Example:

  • jane $ mc mb s3-thgosting-de/example-bucket
  • Bucket created successfully s3-thghosting-de/example-bucket.

Uploading a file

  • mc cp example-file.yaml <ALIAS>/<BUCKET NAME>


Example:

  • jane $ mc cp /example-file.yaml s3-thghosting-de/example-bucket
  • ...file.yaml: 365 B / 365 B ┃▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓┃ 400.05 KiB/s 0s

Listing buckets

LISTING ALL BUCKETS


  • mc ls <ALIAS>


Example:

  • jane $ mc ls s3-thghosting-de 
  • [2021-03-31 11:04:55 UTC] 0B example-bucket/
  • [2021-03-31 11:20:45 UTC] 0B example-bucket-2/


LISTING CONTENTS OF A SINGLE BUCKET

  • mc ls <ALIAS>/<BUCKET>


Example:

  • jane $ mc ls s3-thghosting-de/example-bucket
  • [2021-03-31 11:14:51 UTC] 365B example-file.yaml

Getting bucket usage

OVERALL

  • mc du <ALIAS>

Example:

  • jane $ mc du s3-thghosting-de
  • 365B


FOR A SPECIFIC BUCKET

  • mc du <ALIAS>/<BUCKET>


Example:

  • jane $ mc du s3-thghosting-de/example-bucket/
  • 365B example-bucket


  • No labels