uadmin.org




download minio client

wget https://dl.min.io/client/mc/release/linux-amd64/mc


create an alias to connect to the load balancer endpoint using minio client

mc alias set sg http://192.168.4.230:10443 Q45UGJOIVB7KJW156S7F YNohmReCkZtzkn4ZSj1R+aQ8L9nOdxNPIJ0hf6+p --api S3v4 --insecure

list all buckets

mc ls sg --insecure


copy a local file to bucket

mc cp filename sg/bucketname --insecure
mc ls sg/bucketname --insecure


--------------------------------------------
Or with awscli

Install awscli

yum remove awscli
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
./aws/install
aws configure

add credentials

list all buckets

aws s3 ls --profile default --endpoint-url http://192.168.4.230:10443

copy local file to bucket

aws s3 cp file1 --profile maasland s3://bucket1/ --endpoint-url http://192.168.4.230:10443


##Some more examples:
#create bucket

aws s3api create-bucket --bucket bucket2 --endpoint-url http://192.168.4.230:10443 --profile maasland

#upload file to bucket

aws s3 cp file1 --profile maasland s3://bucket2/ --endpoint-url http://192.168.4.230:10443

#list contents of bucket

aws s3 ls --profile maasland --endpoint-url http://192.168.4.230:10443 s3://bucket2

#remove object

aws s3 rm --profile maasland --endpoint-url http://192.168.4.230:10443 s3://bucket2/file1

#remove bucket

aws s3 rb --profile maasland --endpoint-url http://192.168.4.230:10443 s3://bucket2