MinIO 客户端命令 mc version 用来管理存储桶版本控制。语法如下:
C:\> mc version -h NAME: mc version - manage bucket versioning USAGE: mc version COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...] COMMANDS: enable enable bucket versioning suspend suspend bucket versioning info show bucket versioning status FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
该命令用来启用存储桶版本控制,语法如下:
D:\server\minio>mc version enable -h NAME: mc version enable - enable bucket versioning USAGE: mc version enable ALIAS/BUCKET FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
例如:为别名“myminio”的存储桶“mybucket”启用版本控制。
C:\> mc version enable myminio/mybucket
该子命令用来暂停存储桶版本控制。语法如下:
C:\>mc version suspend -h NAME: mc version suspend - suspend bucket versioning USAGE: mc version suspend ALIAS/BUCKET FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
例如:对别名“myminio”的存储桶“mybucket”暂停版本控制。
C:\> mc version suspend myminio/mybucket
该子命令用来显示存储桶版本控制状态。语法如下:
C:\>mc version info -h NAME: mc version info - show bucket versioning status USAGE: mc version info ALIAS/BUCKET FLAGS: --config-dir value, -C value path to configuration folder (default: "C:\\Users\\Administrator\\mc") --quiet, -q disable progress bar display --no-color disable color theme --json enable JSON lines formatted output --debug enable debug output --insecure disable SSL certificate verification --help, -h show help
例如:显示存储桶 “mybucket” 的存储桶版本控制状态。
C:\> mc version info myminio/mybucket