MinIO
Overview
MinIO: A high-performance object storage solution supporting Kubernetes deployment. MinIO provides an API compatible with Amazon Web Services S3 and supports all core S3 functions. Using the MinIO Client, you can easily create and delete buckets, as well as view, copy, move, and delete objects. Additionally, you can also manage the lifecycle, encryption algorithm, and version control of buckets.
Install
Go to https://min.io/download to download and install the MinIO Client.
Usage
The general operation format is as follows:
mc [FLAGS] COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...]
Bind Baidu AI Cloud account
Command is:
1mc alias set mys3 https://s3.bj.bcebos.com abcdefg ABCDEFG
Among them, mys3 is the account name set, which can be set at will. https://s3.bj.bcebos.com is an S3 domain name. Different endpoints correspond to different S3 domain names. For specific correspondence, please refer to Here. Abcdefg and ABCDEFG are AK and SK respectively. Sign in to Baidu AI Cloud Console Overview and click the security certification below the avatar on the top right to view or apply
Bucket operation
- List all buckets under mys3:
mc ls mys3 - Create a bucket named new-bu under mys3:
mc mb mys3/new-bu - Delete a bucket named new-bu under mys3:
mc rb mys3/new-bu
Object operation
- List all objects under mys3/old-bu:
mc ls mys3/old-bu - File upload:
mc cp /Users/zhangsan/Desktop/baidu.pptx mys3/new-bu/baidu.pptx - File download:
mc cp mys3/new-bu/baidu.pptx /Users/zhangsan/Desktop/baidu.pptx - Copy test.jpg from old-bu to new-bu:
mc cp mys3/old-bu/test.jpg mys3/new-bu/test.jpg - Delete test.jpg under old-bu:
mc rm mys3/old-bu/test.jpg
Others
- Adding --json to the command outputs results in JSON format.
- Enter
mc --helpto view all available operation commands. - For detailed operation commands, refer to Here.
