1. 首页
  2. 乘风破浪

MinIO Client (mc)

minio client:
官方文档:https://docs.min.io/docs/minio-client-complete-guide.html
官方中文文档:http://docs.minio.org.cn/docs/master/minio-monitoring-guide
 
一、安装
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
./mc –help
cp mc /usr/bin/
 
二、添加云存储服务
mc将其所有配置信息存储在~/.mc/config.json文件中。
mc alias set <ALIAS> <YOUR-S3-ENDPOINT> [YOUR-ACCESS-KEY] [YOUR-SECRET-KEY] [–api API-SIGNATURE]
#mc alias set <oss> <http://oss-shanghai.aliyuncs.com> <akid> <aksecret>
 
三、命令
alias       set, remove and list aliases in configuration file
ls          list buckets and objects
mb          make a bucket
rb          remove a bucket
cp          copy objects
mirror      synchronize object(s) to a remote site
cat         display object contents
head        display first 'n' lines of an object
pipe        stream STDIN to an object
share       generate URL for temporary access to an object
find        search for objects
sql         run sql queries on objects
stat        show object metadata
mv          move objects
tree        list buckets and objects in a tree format
du          summarize disk usage recursively
retention   set retention for object(s) and bucket(s)
legalhold   set legal hold for object(s)
diff        list differences in object name, size, and date between two buckets
rm          remove objects
version     manage bucket versioning
ilm         manage bucket lifecycle
encrypt     manage bucket encryption config
event       manage object notifications
watch       listen for object notification events
undo        undo PUT/DELETE operations
policy      manage anonymous access to buckets and objects
tag         manage tags for bucket(s) and object(s)
replicate   configure server side bucket replication
admin       manage MinIO servers
update      update mc to latest release
#mc cp -r dir/file <ALIAS>/dir/ >> mc-copy.log 2>&1 &
#mc rm –force –recursive <ALIAS>/bucket-name/ #删除该bucket

原创文章,作者:wz,如若转载,请注明出处:https://www.wzstyle.cn/1010.html

发表评论

邮箱地址不会被公开。 必填项已用*标注