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) legalhold set legal hold for object(s) diff list differences in object name, size, and date between two buckets rm remove objects 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) ilm manage bucket lifecycle version manage bucket versioning replicate configure server side bucket replication admin manage MinIO servers update update mc to latest release
alias ls='mc ls' alias cp='mc cp' alias cat='mc cat' alias mkdir='mc mb' alias pipe='mc pipe' alias find='mc find' alias tree='mc tree'
7) MinIO 管理员操作
MinIO Client (mc) 提供 admin 子命令来对 MinIO 部署执行管理任务。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
service restart and stop all MinIO servers update update all MinIO servers info display MinIO server information user manage users group manage groups policy manage policies defined in the MinIO server replicate manage MinIO site replication config manage MinIO server configuration decommission, decom manage MinIO server pool decommissioning heal heal disks, buckets and objects on MinIO server prometheus manages prometheus config kms perform KMS management operations bucket manage buckets defined in the MinIO server tier manage remote tier targets for ILM transition top provide top like statistics for MinIO trace show http trace for MinIO server console show console logs for MinIO server
1. 查看集群信息
1 2 3 4 5
mc admin info minio
# 为了方便使用,可以设置别名 alias minfo='mc admin info' minfo minio
2. 全局选项
1、选项 [–debug]
【示例】显示 info 命令的详细调试输出
1
mc admin info --debug minio
2、选项 [–json]
JSON 选项启用 JSON 行格式的可解析输出。
【示例】MinIO 服务器信息
1
mc admin --json info minio
3. 命令 service- 重启和停止所有 MinIO 服务器
service 命令提供了一种重新启动和停止所有 MinIO 服务器的方法。 【示例】
1
mc admin service restart minio
4. 命令 policy- 管理预设策略
policy 添加、删除、列出策略、获取策略信息以及为 MinIO 服务器上的用户设置策略的命令。
1 2 3 4 5 6 7 8 9 10 11 12
NAME: mc admin policy - manage policies
FLAGS: --help, -h show help
COMMANDS: add add new policy remove remove policy list list all policies info show info on a policy set set IAM policy on a user or group