mc mb

MinIO 客户端的 mc mb 命令用来创建存储桶。语法如下:

C:\> mc mb -h
NAME:
  mc mb - make a bucket

USAGE:
  mc mb [FLAGS] TARGET [TARGET...]

FLAGS:
  --region value                specify bucket region; defaults to 'us-east-1' (default: "us-east-1")
  --ignore-existing, -p         ignore if bucket/directory already exists
  --with-lock, -l               enable object lock
  --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

示例

(1)在本地 MinIO 存储服务中创建一个存储桶。

D:\server\minio>mc mb local/files
Bucket created successfully `local/files`.

(2)在 Google Cloud Storage 上创建一个新存储分区。

D:\server\minio>mc mb gcs/miniocloud
Bucket created successfully `gcs/miniocloud`.

(3)在 Amazon S3 云存储上的“us-west-2”区域创建一个新存储桶。

D:\server\minio> mc mb --region=us-west-2 s3/myregionbucket

(4)创建一个新目录,包括其缺失的父目录(相当于'mkdir -p')。

D:\server\minio>mc mb /tmp/this/new/dir1

(5)创建多个目录,包括其缺失的父目录(行为类似于“mkdir -p”)。

D:\server\minio>mc mb /mnt/sdb/mydisk /mnt/sdc/mydisk /mnt/sdd/mydisk

(6)如果存储桶/目录已存在,则忽略。

D:\server\minio>mc mb --ignore-existing local/files
Bucket created successfully `local/files`.

(7)在 Amazon S3 云存储上启用对象锁定的“us-west-2”区域中创建一个新存储桶。

D:\server\minio>mc mb --with-lock --region=us-west-2 s3/myregionbucket
说说我的看法
全部评论(
没有评论
关于
本网站专注于 Java、数据库(MySQL、Oracle)、Linux、软件架构及大数据等多领域技术知识分享。涵盖丰富的原创与精选技术文章,助力技术传播与交流。无论是技术新手渴望入门,还是资深开发者寻求进阶,这里都能为您提供深度见解与实用经验,让复杂编码变得轻松易懂,携手共赴技术提升新高度。如有侵权,请来信告知:hxstrive@outlook.com
其他应用
公众号