Skip to content

This is the multi-page printable view of this section. .

Return to the regular view of this page.

Reference

Kubernetes, bare-metal, S3 API, integration, release, and security references.

1 - mc ilm add

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm add replaced by mc ilm rule add.

Syntax

The mc ilm add command adds an object lifecycle management rule to a bucket.

The command supports adding both Transition (Tiering) and Expiration lifecycle management rules.

The following command adds new lifecycle management rules to the mydata bucket on the myminio deployment:

mc ilm add --expire-days 90 --noncurrent-expire-days 30 myminio/mydata

mc ilm add --expire-delete-marker myminio/mydata

mc ilm add --transition-days 30 --transition-tier "COLDTIER" myminio/mydata

mc ilm add --noncurrent-transition-days 7 --noncurrent-transition-tier "COLDTIER"

The configured rules have the following effect:

  • Delete objects more than 90 days old
  • Delete objects 30 days after they become non-current
  • Delete DeleteMarker tombstones if that object has no other versions remaining.
  • Transition objects more than 30 days old to the COLDTIER remote tier.
  • Transition objects 7 days after they become non-current to the COLDTIER remote tier.

The command has the following syntax:

mc [GLOBALFLAGS] ilm add                                    \
                 [--prefix string]                          \
                 [--tags string]                            \
                 --expire-days "integer"                    \
                 [--expire-delete-marker]                   \
                 [--transition-days "string"]               \
                 [--transition-tier "string"]               \
                 [--noncurrent-expire-days "integer"]       \
                 [--noncurrent-expire-newer "integer"]      \
                 [--noncurrent-transition-days "integer"]   \
                 [--noncurrent-transition-tier "string"]    \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias and bucket on the MinIO deployment to which to add the object lifecycle management rule.

For example:

mc ilm add myminio/mydata
--prefix

mc-cmd

Optional

Restrict the management rule to a specific object prefix.

For example:

mc ilm add --prefix "meetingnotes/" myminio/mydata/ --expire-days "90"

The command creates a rule that expires objects in the mydata bucket of the myminio ALIAS after 90 days for any object with the meetingnotes/ prefix.

--tags

mc-cmd

Optional

One or more ampersand &-delimited key-value pairs describing the object tags to use for filtering objects to which the lifecycle configuration rule applies.

This option is mutually exclusive with the following option:

--expire-days

mc-cmd

Required

The number of days to retain an object after being created. MinIO marks the object for deletion after the specified number of days pass. Specify the number of days as an integer, e.g. 30 for 30 days.

For versioned buckets, the expiry rule applies only to the current object version. Use the --noncurrent-expire-days option to apply expiration behavior to noncurrent object versions.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

Mutually exclusive with the following options:

For more complete documentation on object expiration, see Object Expiration and Object Deletion.

--expire-delete-marker

mc-cmd

Optional

Specify this option to direct MinIO to remove delete markers for objects with no remaining object versions. Specifically, the delete marker is the only remaining “version” of the given object.

This option is mutually exclusive with the following option:

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

For more complete documentation on object expiration, see Object Expiration and Object Deletion.

--transition-days

mc-cmd

Optional

The number of calendar days from object creation after which MinIO marks an object as eligible for transition. MinIO transitions the object to the configured remote tier specified to the --transition-tier. Specify the number of days as an integer, e.g. 30 for 30 days.

For versioned buckets, the transition rule applies only to the current object version. Use the --noncurrent-transition-days option to apply transition behavior to noncurrent object versions.

Requires specifying --transition-tier.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

For more complete documentation on object transition, see Object Transition (“Tiering”).

--transition-tier

mc-cmd

Optional

The remote tier to which MinIO transition objects. Specify an existing remote tier created by mc admin tier.

Required if specifying --transition-days.

--noncurrent-expire-days

mc-cmd

Optional

The number of days to retain an object version after becoming non-current (i.e. a different version of that object is now the HEAD). MinIO marks noncurrent object versions for deletion after the specified number of days pass.

This option has the same behavior as the S3 NoncurrentVersionExpiration action.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

--noncurrent-transition-days

mc-cmd

Optional

The number of days an object has been non-current (i.e. replaced by a newer version of that same object) after which MinIO marks the object version as eligible for transition. MinIO transitions the object to the configured remote tier specified to the --transition-tier once the system host datetime passes that calendar date.

This option has no effect on non-versioned buckets. Requires specifying --noncurrent-transition-tier.

This option has the same behavior as the S3 NoncurrentVersionTransition action.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

--noncurrent-transition-tier

mc-cmd

Optional

The remote tier to which MinIO transitions noncurrent objects versions. Specify a remote tier created by mc admin tier.

--noncurrent-expire-newer

mc-cmd

Optional

The maximum number of non-current object versions to retain, ordered from newest to oldest.

Use this flag to retain a certain number of past versions of a file in a first in, first out fashion. After retaining the maximum number of non-current versions, MinIO marks any remaining older non-current object versions as eligible for expiration.

The following table lists a number of object versions and their expiration eligibility based on --noncurrent-expire-newer 3:

v5 (current version)

Current version not affected by ILM rules.

v4

retained

v3

retained

v2

retained

v1

marked for expiry

MinIO retains the current version, v5. MinIO also retains the next 3 non-current versions, starting with the newest. This means MinIO marks v4, v3, and v2 for the three non-current version to retain.

v1 would be a fourth non-current version, which falls outside the limit of non-current versions to retain, so MinIO marks v1 for expiration.

Updating the number for this flag only impacts the unmarked versions of objects. Any versions already marked for expiration do not change if you increase the number to retain.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

Global Flags

This command supports any of the global flags.

Examples

Expire All Bucket Contents After Number of Days

Use mc ilm add with --expire-days to mark bucket contents for expiration after a number of days pass from the object’s creation:

mc ilm add ALIAS/PATH --expire-days "DAYS"
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket on the S3-compatible host.
  • Replace DATE with the number of days after which to expire the object. For example, specify 30 to expire the object 30 days after creation.

Transition Non-Current Object Versions at a Prefix to a Different Tier

Use the mc ilm add with --prefix and --transition-tier to transition older non-current versions of an object to a different storage tier.

mc ilm add --prefix "doc/" --transition-days "90" --trasition-tier "MINIOTIER-1"                  \
       --noncurrent-transition-days "45" --noncurrent-transition-tier "MINIOTIER-2"  \
       myminio/mybucket/

This command looks at the contents with the doc/ prefix in the mybucket bucket on the myminio deployment.

  • Current objects in the prefix older than 90 days move to the MINIOTIER-1 storage tier.
  • Non-current objects in the prefix older than 45 days move to the MINIOTIER-2 storage tier.
  • Both MINIOTIER-1 and MINIOTIER-2 have already been created with mc admin tier add.

Expire All Objects at a Prefix, Retain Current Object Versions Longer Than Non-Current Object Versions

Use the mc ilm add command with --prefix, --expire-days, and --noncurrent-expire-days to expire current and non-current versions of an object at different times.

mc ilm add --prefix "doc/" --expire-days "300" --noncurrent-expire-days "100" myminio/mybucket/

This command looks at the contents with the doc/ prefix in the mybucket bucket on the myminio deployment.

  • Current objects expire after 300 days.
  • Non-current objects expire after 100 days.

Behavior

Lifecycle Management Object Scanner

MinIO uses a scanner process to check objects against the configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

Expiry vs Transition

MinIO supports specifying both expiry and transition rules in the same bucket or bucket prefix. MinIO can execute an expiration rule on an object regardless of its transition status. Use mc ilm ls to review the currently configured object lifecycle management rules for any potential interactions between expiry and transition rules.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

2 - mc quota clear

Note

Changed: RELEASE.2022-12-13T00-23-28Z

mc quota clear replaced mc admin bucket quota --clear.

Note

Changed: RELEASE.2024-07-31T15-58-33Z

mc quota clear is deprecated.

Description

The mc quota clear command removes a configured storage quota for a bucket.

Examples

Clear Configured Bucket Quota

Use mc quota clear flag to remove the quota from a bucket.

mc quota clear TARGET/BUCKET
  • Replace TARGET with the alias of a configured MinIO deployment. Replace BUCKET with the name of the bucket on which to clear the quota.

Syntax

mc quota clear has the following syntax:

mc quota clear TARGET [ARGUMENTS]

mc quota clear supports the following arguments:

TARGET

mc-cmd

Required

The full path to the bucket for which the command creates the quota. Specify the alias of the MinIO deployment as a prefix to the path. For example:

mc quota clear play/mybucket

Global Flags

This command supports any of the global flags.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

3 - MinIO Custom Resource Definition

The MinIO Operator installs a Custom Resource Definition (CRD) that describes a MinIO Tenant object. The Operator uses this CRD for provisioning and managing Tenant resources within a Kubernetes cluster.

This page documents the CRD reference for use in customizing Operator-deployed Tenants. This documentation assumes familiarity with all referenced Kubernetes concepts, utilities, and procedures.

Operator CRD v2 Reference

Package v2 - This page provides a quick automatically generated reference for the MinIO Operator Operator CRD v2 Reference CRD. For more complete documentation on the MinIO Operator CRD, see MinIO Kubernetes Documentation.

The Operator CRD v2 Reference API was released with the v4.0.0 MinIO Operator. The MinIO Operator automatically converts existing tenants using the /v1 API to /v2.

Bucket

Bucket describes the default created buckets

Field Description

name string

region string

objectLock boolean

CertificateConfig

CertificateConfig (certConfig) defines controlling attributes associated to any TLS certificate automatically generated by the Operator as part of tenant creation. These fields have no effect if spec.autoCert: false.

Field Description

commonName string

Optional

The CommonName or CN attribute to associate to automatically generated TLS certificates.

organizationName string array

Optional

Specify one or more OrganizationName or O attributes to associate to automatically generated TLS certificates.

dnsNames string array

Optional

Specify one or more x.509 Subject Alternative Names (SAN) to associate to automatically generated TLS certificates. MinIO Server pods use SNI to determine which certificate to respond with based on the requested hostname.

CertificateStatus

CertificateStatus keeps track of all the certificates managed by the operator

  • TenantStatus
Field Description

autoCertEnabled boolean

AutoCertEnabled registers whether we know if the tenant has autocert enabled

customCertificates CustomCertificates

Provides the output of the client, minio, and minioCAs custom TLS certificates manually added to the Operator.

CustomCertificateConfig

CustomCertificateConfig (customCertificateConfig) provides attributes associated of the TLS certificates manually added to the Operator as part of tenant creation. These fields contain no data if there are no custom TLS certificates.

Field Description

certName string

Optional

Output one or more CertName attributes associated with the manually provided TLS certificates.

domains string array

Optional

Output one or more Domains attributes associated with the manually provided TLS certificates.

expiry string

Optional

Output one or more Expiry attributes associated with the manually provided TLS certificates.

expiresIn string

Optional

Output one or more ExpiresIn attributes associated with the manually provided TLS certificates.

serialNo string

Optional

Output one or more SerialNo attributes associated with the manually provided TLS certificates.

CustomCertificates

CustomCertificates (customCertificates) provides groupings of the TLS certificates manually added to the Operator as part of tenant creation. These fields contain no data if there are no custom TLS certificates.

Field Description

client CustomCertificateConfig array

Optional

Client

minio CustomCertificateConfig array

Optional

Minio

minioCAs CustomCertificateConfig array

Optional

Certificate Authorities

ExposeServices

ExposeServices (exposeServices) defines the exposure of the MinIO object storage and Console services.

Field Description

minio boolean

Optional

Directs the Operator to expose the MinIO service. Defaults to false.

console boolean

Optional

Directs the Operator to expose the MinIO Console service. Defaults to false.

Features

Features (features) - Object describing which MinIO features to enable/disable in the MinIO Tenant.

Field Description

bucketDNS boolean

Optional

Specify true to allow clients to access buckets using the DNS path <bucket>.minio.default.svc.cluster.local. Defaults to false.

domains TenantDomains

Optional

Specify a list of domains used to access MinIO and Console.

enableSFTP boolean

Optional

Starts minio server with SFTP support

HealthStatus (string)

HealthStatus represents whether the tenant is healthy, with decreased service or offline

  • TenantStatus

KESConfig

KESConfig (kes) defines the configuration of the MinIO Key Encryption Service (KES) StatefulSet deployed as part of the MinIO Tenant. KES supports Server-Side Encryption of objects using an external Key Management Service (KMS).

Field Description

replicas integer

Optional

Specify the number of replica KES pods to deploy in the tenant. Defaults to 2.

image string

Optional

imagePullPolicy PullPolicy

Optional

The pull policy for the MinIO Docker image. Specify one of the following:

  • Always

  • Never

  • IfNotPresent (Default)

Refer to the Kubernetes documentation for details https://kubernetes.io/docs/concepts/containers/images#updating-images

serviceAccountName string

Optional

The Kubernetes Service Account to use for running MinIO KES pods created as part of the Tenant.

kesSecret LocalObjectReference

Required

Specify a Kubernetes opaque secret which contains environment variables to use for setting up the MinIO KES service.

See the Operator v7.1.1 KES configuration secret for an example.

externalCertSecret LocalCertificateReference

Optional

Enables TLS with SNI support on each MinIO KES pod in the tenant. If externalCertSecret is omitted and spec.requestAutoCert is set to false, MinIO KES pods deploy without TLS enabled.

Specify a Kubernetes TLS secret. The MinIO Operator copies the specified certificate to every MinIO pod in the tenant. When the MinIO pod/service responds to a TLS connection request, it uses SNI to select the certificate with matching subjectAlternativeName.

Specify an object containing the following fields:

  • - name - The name of the Kubernetes secret containing the TLS certificate.

  • - type - Specify kubernetes.io/tls

See the MinIO Operator CRD reference for examples and more complete documentation on configuring TLS for MinIO Tenants.

clientCertSecret LocalCertificateReference

Optional

Specify a Kubernetes TLS secret containing a custom root Certificate Authority and x.509 certificate to use for performing mTLS authentication with an external Key Management Service, such as Hashicorp Vault.

Specify an object containing the following fields:

  • - name - The name of the Kubernetes secret containing the Certificate Authority and x.509 Certificate.

  • - type - Specify kubernetes.io/tls

gcpCredentialSecretName string

Optional

Specify the GCP default credentials to be used for KES to authenticate to GCP key store

gcpWorkloadIdentityPool string

Optional

Specify the name of the workload identity pool (This is required for generating service account token)

annotations object (keys:string, values:string)

Optional

If provided, use these annotations for KES Object Meta annotations

labels object (keys:string, values:string)

Optional

If provided, use these labels for KES Object Meta labels

resources ResourceRequirements

Optional

Object specification for specifying CPU and memory resource allocations or limits in the MinIO tenant.

nodeSelector object (keys:string, values:string)

Optional

The filter for the Operator to apply when selecting which nodes on which to deploy MinIO KES pods. The Operator only selects those nodes whose labels match the specified selector.

See the Kubernetes documentation on Assigning Pods to Nodes for more information.

tolerations Toleration array

Optional

Specify one or more Kubernetes tolerations to apply to MinIO KES pods.

affinity Affinity

Optional

Specify node affinity, pod affinity, and pod anti-affinity for the KES pods.

topologySpreadConstraints TopologySpreadConstraint array

Optional

Specify one or more Kubernetes Topology Spread Constraints to apply to pods deployed in the MinIO pool.

keyName string

Optional

If provided, use this as the name of the key that KES creates on the KMS backend

securityContext PodSecurityContext

Specify the Security Context of MinIO KES pods. The Operator supports only the following pod security fields:

  • fsGroup

  • fsGroupChangePolicy

  • runAsGroup

  • runAsNonRoot

  • runAsUser

  • seLinuxOptions

containerSecurityContext SecurityContext

Specify the Security Context of MinIO KES pods.

env EnvVar array

Optional

If provided, the MinIO Operator adds the specified environment variables when deploying the KES resource.

LocalCertificateReference

LocalCertificateReference (externalCertSecret, externalCaCertSecret,clientCertSecret) contains a Kubernetes secret containing TLS certificates or Certificate Authority files for use with enabling TLS in the MinIO Tenant.

Field Description

name string

Required

The name of the Kubernetes secret containing the TLS certificate or Certificate Authority file.

type string

Required

The type of Kubernetes secret. Specify kubernetes.io/tls

Logging

Logging describes Logging for MinIO tenants.

Field Description

json boolean

anonymous boolean

quiet boolean

Pool

Pool (pools) defines a MinIO server pool on a Tenant. Each pool consists of a set of MinIO server pods which “pool” their storage resources for supporting object storage and retrieval requests. Each server pool is independent of all others and supports horizontal scaling of available storage resources in the MinIO Tenant.

See the MinIO Operator CRD reference for the pools object for examples and more complete documentation.

Field Description

name string

Required Specify the name of the pool. The Operator automatically generates the pool name if this field is omitted.

servers integer

Required

The number of MinIO server pods to deploy in the pool. The minimum value is 2.

The MinIO Operator requires a minimum of 4 volumes per pool. Specifically, the result of pools.servers X pools.volumesPerServer must be greater than 4.

volumesPerServer integer

Required

The number of Persistent Volume Claims to generate for each MinIO server pod in the pool.

The MinIO Operator requires a minimum of 4 volumes per pool. Specifically, the result of pools.servers X pools.volumesPerServer must be greater than 4.

volumeClaimTemplate PersistentVolumeClaim

Required

Specify the configuration options for the MinIO Operator to use when generating Persistent Volume Claims for the MinIO tenant.

resources ResourceRequirements

Optional

Object specification for specifying CPU and memory resource allocations or limits in the MinIO tenant.

nodeSelector object (keys:string, values:string)

Optional

The filter for the Operator to apply when selecting which nodes on which to deploy pods in the pool. The Operator only selects those nodes whose labels match the specified selector.

See the Kubernetes documentation on Assigning Pods to Nodes for more information.

affinity Affinity

Optional

Specify node affinity, pod affinity, and pod anti-affinity for pods in the MinIO pool.

tolerations Toleration array

Optional

Specify one or more Kubernetes tolerations to apply to pods deployed in the MinIO pool.

topologySpreadConstraints TopologySpreadConstraint array

Optional

Specify one or more Kubernetes Topology Spread Constraints to apply to pods deployed in the MinIO pool.

securityContext PodSecurityContext

Optional

Specify the Security Context of pods in the pool. The Operator supports only the following pod security fields:

  • fsGroup

  • fsGroupChangePolicy

  • runAsGroup

  • runAsNonRoot

  • runAsUser

containerSecurityContext SecurityContext

Specify the Security Context of containers in the pool. The Operator supports only the following container security fields:

  • runAsGroup

  • runAsNonRoot

  • runAsUser

annotations object (keys:string, values:string)

Optional

Specify custom labels and annotations to append to the Pool. Optional

If provided, use these annotations for the Pool Objects Meta annotations (Statefulset and Pod template)

labels object (keys:string, values:string)

Optional

If provided, use these labels for the Pool Objects Meta annotations (Statefulset and Pod template)

runtimeClassName string

Optional

If provided, each pod on the Statefulset will run with the specified RuntimeClassName, for more info https://kubernetes.io/docs/concepts/containers/runtime-class/

PoolState (string)

PoolState represents the state of a pool

PoolStatus

PoolStatus keeps track of all the pools and their current state

  • TenantStatus
Field Description

ssName string

state PoolState

legacySecurityContext boolean

LegacySecurityContext stands for Legacy SecurityContext. It represents that these pool was created before v4.2.3 when we introduced the default securityContext as non-root, thus we should keep running this Pool without a Security Context

PoolsMetadata

PoolsMetadata (poolsMetadata) defines custom labels and annotations for the MinIO pool stateful sets / pods.

Field Description

labels object (keys:string, values:string)

Optional

If provided, append these labels to the MinIO statefulset / pods

annotations object (keys:string, values:string)

Optional

If provided, append these annotations to the MinIO statefulset / pods

ServiceMetadata

ServiceMetadata (serviceMetadata) defines custom labels and annotations for the MinIO Object Storage service and/or MinIO Console service.

Field Description

minioServiceLabels object (keys:string, values:string)

Optional

If provided, append these labels to the MinIO service

minioServiceAnnotations object (keys:string, values:string)

Optional

If provided, append these annotations to the MinIO service

consoleServiceLabels object (keys:string, values:string)

Optional

If provided, append these labels to the Console service

consoleServiceAnnotations object (keys:string, values:string)

Optional

If provided, append these annotations to the Console service

kesServiceLabels object (keys:string, values:string)

Optional

If provided, append these labels to the KES service

kesServiceAnnotations object (keys:string, values:string)

Optional

If provided, append these annotations to the KES service

SideCars

SideCars (sidecars) defines a list of containers that the Operator attaches to each MinIO server pods in the pool.

Field Description

containers Container array

Optional

List of containers to run inside the Pod

volumeClaimTemplates PersistentVolumeClaim array

Optional

volumeClaimTemplates is a list of claims that pods are allowed to reference. The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.

volumes Volume array

Optional

List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes

resources ResourceRequirements

Optional

sidecar’s Resource, initcontainer will use that if set.

Tenant

Tenant is a Kubernetes object describing a MinIO Tenant.

  • TenantList
Field Description

apiVersion string

Operator CRD v2 Reference

kind string

Tenant

metadata ObjectMeta

Refer to Kubernetes API documentation for fields of metadata.

scheduler TenantScheduler

spec TenantSpec

Required

The root field for the MinIO Tenant object.

TenantDomains

TenantDomains (domains) - List of domains used to access the tenant from outside the kubernetes clusters. this will only configure MinIO for the domains listed, but external DNS configuration is still needed. The listed domains should include schema and port if any is used, i.e. https://minio.domain.com:8123

Field Description

minio string array

List of Domains used by MinIO. This will enable DNS style access to the object store where the bucket name is inferred from a subdomain in the domain.

console string

Domain used to expose the MinIO Console, this will configure the redirect on MinIO when visiting from the browser If Console is exposed via a subpath, the domain should include it, i.e. https://console.domain.com:8123/subpath/

TenantScheduler

TenantScheduler (scheduler) - Object describing Kubernetes Scheduler to use for deploying the MinIO Tenant.

Field Description

name string

Optional

Specify the name of the Kubernetes scheduler to be used to schedule Tenant pods

TenantSpec

TenantSpec (spec) defines the configuration of a MinIO Tenant object.

The following parameters are specific to the Operator CRD v2 Reference MinIO CRD API spec definition added as part of the MinIO Operator v4.0.0.

For more complete documentation on this object, see the MinIO Kubernetes Documentation.

Field Description

pools Pool array

Required

An array of objects describing each MinIO server pool deployed in the MinIO Tenant. Each pool consists of a set of MinIO server pods which "pool" their storage resources for supporting object storage and retrieval requests. Each server pool is independent of all others and supports horizontal scaling of available storage resources in the MinIO Tenant.

The MinIO Tenant spec must have at least one element in the pools array.

See the MinIO Operator CRD reference for the pools object for examples and more complete documentation.

image string

Optional

imagePullSecret LocalObjectReference

Optional

Specify the secret key to use for pulling images from a private Docker repository.

podManagementPolicy PodManagementPolicyType

Optional

Pod Management Policy for pod created by StatefulSet

env EnvVar array

Optional

If provided, the MinIO Operator adds the specified environment variables when deploying the Tenant resource.

externalCertSecret LocalCertificateReference array

Optional

Enables TLS with SNI support on each MinIO pod in the tenant. If externalCertSecret is omitted and requestAutoCert is set to false, the MinIO Tenant deploys without TLS enabled.

Specify an array of Kubernetes TLS secrets. The MinIO Operator copies the specified certificates to every MinIO server pod in the tenant. When the MinIO pod/service responds to a TLS connection request, it uses SNI to select the certificate with matching subjectAlternativeName.

Each element in the externalCertSecret array is an object containing the following fields:

  • - name - The name of the Kubernetes secret containing the TLS certificate.

  • - type - Specify kubernetes.io/tls

See the MinIO Operator CRD reference for examples and more complete documentation on configuring TLS for MinIO Tenants.

externalCaCertSecret LocalCertificateReference array

Optional

Allows MinIO server pods to verify client TLS certificates signed by a Certificate Authority not in the pod’s trust store.

Specify an array of Kubernetes TLS secrets. The MinIO Operator copies the specified certificates to every MinIO server pod in the tenant.

Each element in the externalCertSecret array is an object containing the following fields:

  • - name - The name of the Kubernetes secret containing the Certificate Authority.

  • - type - Specify kubernetes.io/tls.

See the MinIO Operator CRD reference for examples and more complete documentation on configuring TLS for MinIO Tenants.

externalClientCertSecret LocalCertificateReference

Optional

Enables mTLS authentication between the MinIO Tenant pods and MinIO KES. Required for enabling connectivity between the MinIO Tenant and MinIO KES.

Specify a Kubernetes TLS secrets. The MinIO Operator copies the specified certificate to every MinIO server pod in the tenant. The secret must contain the following fields:

  • name - The name of the Kubernetes secret containing the TLS certificate.

  • type - Specify kubernetes.io/tls

The specified certificate must correspond to an identity on the KES server. See the KES Wiki for more information on KES identities.

If deploying KES with the MinIO Operator, include the hash of the certificate as part of the kes object specification.

See the MinIO Operator CRD reference for examples and more complete documentation on configuring TLS for MinIO Tenants.

externalClientCertSecrets LocalCertificateReference array

Optional

Provide support for mounting additional client certificate into MinIO Tenant pods Multiple client certificates will be mounted using the following folder structure:

certs/
├── client-0/
│   ├── client.crt
│   └── client.key
├── client-1/
│   ├── client.crt
│   └── client.key
└── client-2/
    ├── client.crt
    └── client.key

Specify a Kubernetes TLS secrets. The MinIO Operator copies the specified certificate to every MinIO server pod in the tenant that later can be referenced using environment variables. The secret must contain the following fields:

  • name - The name of the Kubernetes secret containing the TLS certificate.

  • type - Specify kubernetes.io/tls

mountPath string

Optional

Mount path for MinIO volume (PV). Defaults to /export

subPath string

Optional

Subpath inside mount path. This is the directory where MinIO stores data. Default to "" (empty)

requestAutoCert boolean

Optional

Enables using Kubernetes-based TLS certificate generation and signing for pods and services in the MinIO Tenant.

  • Specify true to explicitly enable automatic certificate generate (Default).

  • Specify false to disable automatic certificate generation.

If requestAutoCert is set to false and externalCertSecret is omitted, the MinIO Tenant deploys without TLS enabled.

See the MinIO Operator CRD reference for examples and more complete documentation on configuring TLS for MinIO Tenants.

certExpiryAlertThreshold integer

CertExpiryAlertThreshold is the minimum number of days to expiry before an alert for an expiring certificate is fired.

liveness Probe

Liveness Probe for container liveness. Container will be restarted if the probe fails.

readiness Probe

Readiness Probe for container readiness. Container will be removed from service endpoints if the probe fails.

startup Probe

Startup Probe allows to configure a max grace period for a pod to start before getting traffic routed to it.

lifecycle Lifecycle

Lifecycle hooks for container.

features Features

S3 related features can be disabled or enabled such as bucketDNS etc.

certConfig CertificateConfig

Optional

Enables setting the CommonName, Organization, and dnsName attributes for all TLS certificates automatically generated by the Operator. Configuring this object has no effect if requestAutoCert is false.

kes KESConfig

Optional

Directs the MinIO Operator to deploy the MinIO Key Encryption Service (KES) using the specified configuration. The MinIO KES supports performing server-side encryption of objects on the MiNIO Tenant.

prometheusOperator boolean

Optional

Directs the MinIO Operator to use prometheus operator.

Tenant scrape configuration will be added to prometheus managed by the prometheus-operator.

serviceAccountName string

Optional

The Kubernetes Service Account to use for running MinIO pods created as part of the Tenant.

priorityClassName string

Optional

Indicates the Pod priority and therefore importance of a Pod relative to other Pods in the cluster. This is applied to MinIO pods only.

Refer Kubernetes Priority Class documentation for more complete documentation.

imagePullPolicy PullPolicy

Optional

The pull policy for the MinIO Docker image. Specify one of the following:

  • Always

  • Never

  • IfNotPresent (Default)

Refer Kubernetes documentation for details https://kubernetes.io/docs/concepts/containers/images#updating-images

sideCars SideCars

Optional

A list of containers to run as sidecars along every MinIO Pod deployed in the tenant.

exposeServices ExposeServices

Optional

Directs the Operator to expose the MinIO and/or Console services.

serviceMetadata ServiceMetadata

Optional

Specify custom labels and annotations to append to the MinIO service and/or Console service.

poolsMetadata PoolsMetadata

Optional

Specify custom labels and annotations to append to all pool statefulsets and pods.

users LocalObjectReference array

Optional

An array of Kubernetes opaque secrets to use for generating MinIO users during tenant provisioning.

Each element in the array is an object consisting of a key-value pair name: <string>, where the <string> references an opaque Kubernetes secret.

Each referenced Kubernetes secret must include the following fields:

  • CONSOLE_ACCESS_KEY - The "Username" for the MinIO user

  • CONSOLE_SECRET_KEY - The "Password" for the MinIO user

The Operator creates each user with the consoleAdmin policy by default. You can change the assigned policy after the Tenant starts.

buckets Bucket array

Optional

Create buckets when creating a new tenant. Skip if bucket with given name already exists

logging Logging

Optional

Enable JSON, Anonymous logging for MinIO tenants.

configuration LocalObjectReference

Optional

Specify a secret that contains additional environment variable configurations to be used for the MinIO pools. The secret is expected to have a key named config.env containing all exported environment variables for MinIO+

initContainers Container array

Optional

Add custom initContainers to StatefulSet

additionalVolumes Volume array

Optional

If provided, statefulset will add these volumes. You should set the rules for the corresponding volumes and volume mounts. We will not test this rule, k8s will show the result.

additionalVolumeMounts VolumeMount array

Optional

If provided, statefulset will add these volumes. You should set the rules for the corresponding volumes and volume mounts. We will not test this rule, k8s will show the result.

TenantUsage

TenantUsage are metrics regarding the usage and capacity of the tenant

  • TenantStatus
Field Description

capacity integer

Capacity the usage capacity of this tenant in bytes.

rawCapacity integer

Capacity the raw capacity of this tenant in bytes.

usage integer

Usage is how much data is managed by MinIO in bytes.

rawUsage integer

Usage is the raw usage on disks in bytes.

tiers TierUsage array

Tiers includes the usage of individual tiers in the tenant

TierUsage

TierUsage represents the usage from a tier setup by the tenant

Field Description

Name string

Name of the tier

Type string

type of the tier

totalSize integer

TotalSize usage of the tier

4 - Silo Client (mcli / mc)

The Pigsty-maintained client is distributed as mcli in standalone archives and Linux packages. Its source build, container entrypoint, configuration directory, module path, and command syntax retain mc for compatibility. It provides familiar commands such as ls, cat, cp, mirror, and diff for filesystems and Amazon S3-compatible object storage.

The mc command-line tool is built for compatibility with the AWS S3 API. Its current source retains compatibility with Silo, upstream MinIO, and AWS S3.

The Silo project cannot guarantee behavior against every other S3-compatible service because implementations differ. Test the operations your workload relies on before treating another service as compatible.

mc has the following syntax:

mc [GLOBALFLAGS] COMMAND --help

See Command Quick Reference for a list of supported commands.

Version Alignment with Silo Server

The client releases separately from the Silo server.

For best functionality and compatibility, use a client version released close to your Silo or MinIO server version. A client released on the same day or later than the server is generally the safer choice.

You can install a client newer than the server. If the versions skew too far apart, however, administrative features or flags may differ even when core S3 operations such as mc cp remain compatible.

Quickstart

1) Install the client

Use Download & Install to select a Linux package, an archive for Linux, macOS, or Windows, or the client container. Versioned artifacts and checksums are also available from GitHub Releases.

Standalone archives and Linux packages install the command as mcli. The container and source build retain mc. The commands are aliases of the same client; when this reference shows mc, substitute mcli if that is the name installed on your host.

To build the maintained fork from source:

git clone https://github.com/pgsty/mc.git
cd mc
make build
./mc --version
Warning

mc update is intentionally disabled in the Pigsty fork. Upgrade through the Silo download page, the Pigsty package repository, or GitHub Releases.

Note

The current pgsty/mc source still registers the mc license and mc support command trees. Those commands integrate with upstream MinIO SUBNET and its commercial licensing/support service; they are not Silo services. Their command names, protocol fields, SUBNET wording, and MinIO pricing/license links are retained as upstream contracts and must not be rebranded.

2) Create an Alias for the S3-Compatible Service

Warning

Important

The following example temporarily disables the bash history to mitigate the risk of authentication credentials leaking in plain text. This is a basic security measure and does not mitigate all possible attack vectors. Defer to security best practices for your operating system for inputting sensitive information on the command line.

Use the mc alias set command to add an Amazon S3-compatible service to the mc configuration.

bash +o history
mc alias set ALIAS HOSTNAME ACCESS_KEY SECRET_KEY
bash -o history
  • Replace ALIAS with a name to associate to the S3 service. mc commands typically require ALIAS as an argument for identifying which S3 service to execute against.
  • Replace HOSTNAME with the URL endpoint or IP address of the S3 service.
  • Replace ACCESS_KEY and SECRET_KEY with the access and secret keys for a user on the S3 service.

Replace each argument with the required values. If you omit the ACCESS_KEY and SECRET_KEY, the command prompts you to enter those values in the CLI.

Each of the following tabs contains a provider-specific example:

Silo Server
mc alias set silo https://silo.example.net ACCESS_KEY SECRET_KEY
AWS S3 Storage
mc alias set myS3 https://s3.{your-region-code}.amazonaws.com/endpoint ACCESS_KEY SECRET_KEY
Google Cloud Storage
mc alias set myGCS https://storage.googleapis.com/endpoint ACCESS_KEY SECRET_KEY

3) Test the Connection

Use the mc admin info command to test the connection to the newly added Silo deployment:

mc admin info silo

The command returns information on the S3 service if successful. If unsuccessful, check each of the following:

  • The host machine has connectivity to the S3 service URL (i.e. using ping or traceroute).

  • The specified ACCESSKEY and SECRETKEY correspond to a user on the S3 service. The user must have permission to perform actions on the service.

    For MinIO deployments, see Access Management for more information on user access permissions. For other S3-compatible services, defer to the documentation for that service.

Command Quick Reference

The following table lists mc commands:

Note

Note

The client also includes an administration extension for managing Silo and compatible MinIO deployments. See mc admin for more complete documentation.

The below table does not include those commands.

Command

Description

mc alias list
mc alias remove
mc alias set
mc alias import
mc alias export

The mc alias commands provide a convenient interface for managing the list of S3-compatible hosts that mc can connect to and run operations against.

mc anonymous get
mc anonymous get-json
mc anonymous links
mc anonymous list
mc anonymous set
mc anonymous set-json

The mc anonymous command supports setting or removing anonymous policies to a bucket and its contents. Buckets with anonymous policies allow public access where clients can perform any action granted by the policy without authentication.

mc batch describe
mc batch generate
mc batch list
mc batch start
mc batch status

The mc batch commands allow you to run one or more job tasks on a MinIO deployment.

mc cat

The mc cat command concatenates the contents of a file or object to another file or object. You can also use the command to display the contents of the specified file or object to STDOUT. cat has similar functionality to cat.

mc cp

The mc cp command copies objects to or from a MinIO deployment, where the source can MinIO or a local filesystem.

mc diff

The mc diff mc computes the differences between two filesystem directories or MinIO buckets. mc diff lists only those objects which are missing or which differ in size. mc diff does not compare the contents of objects.

mc du

The mc du command summarizes the disk usage of buckets and folders. You can also use du against the local filesystem to produce similar results as the du command.

mc encrypt clear
mc encrypt info
mc encrypt set

The mc encrypt commands set, update, or disable the default bucket Server-Side Encryption (SSE) mode. MinIO automatically encrypts objects using the specified SSE mode.

mc event add
mc event ls
mc event rm

The mc event command supports adding, removing, and listing bucket event notifications.

mc find

The mc find command supports searching for objects on a MinIO deployment. You can also use the command to search for files on a filesystem.

mc get

The mc get command downloads an object from a target S3 deployment to the local file system.

mc head

The mc head command displays the first n lines of an object, where n is an argument specified to the command.

mc idp ldap accesskey
mc idp ldap accesskey create-with-login
mc idp ldap add
mc idp ldap disable
mc idp ldap enable
mc idp ldap info
mc idp ldap ls
mc idp ldap policy
mc idp ldap rm
mc idp ldap update

The mc idp ldap commands allow you to manage configurations to 3rd party Active Directory or LDAP Identity and Access Management (IAM) integrations.

mc idp openid add
mc idp openid disable
mc idp openid enable
mc idp openid info
mc idp openid ls
mc idp openid rm
mc idp openid update

The mc idp openid commands allow you to manage configurations to 3rd party OpenID Identity and Access Management (IAM) integrations.

mc idp ldap policy attach
mc idp ldap policy detach
mc idp ldap policy entities

The mc idp ldap policy commands show the mapping relationships between policies and the associated groups or users.

mc ilm restore
mc ilm rule add
mc ilm rule edit
mc ilm rule export
mc ilm rule import
mc ilm rule ls
mc ilm rule rm
mc ilm tier add
mc ilm tier check
mc ilm tier info
mc ilm tier ls
mc ilm tier rm
mc ilm tier update

The mc ilm commands manage object lifecycle management rules and tiering on a MinIO deployment.

mc legalhold clear
mc legalhold info
mc legalhold set

The mc legalhold command sets, removes, or retrieves the object legal hold (WORM) settings for object(s).

mc license info
mc license register
mc license update

The mc license commands work with cluster registration for MinIO SUBNET. Use the commands to register a deployment, display information about the cluster’s current license, or update the license key for a cluster.

mc ls

The mc ls command lists buckets and objects on MinIO or another S3-compatible service.

mc mb

The mc mb command creates a new bucket or directory at the specified path.

mc mirror

The mc mirror command synchronizes content to MinIO deployment, similar to the rsync utility. mc mirror supports filesystems, MinIO deployments, and other S3-compatible hosts as the synchronization source.

mc mv

The mc mv command moves an object from source to the target, such as between MinIO deployments or between buckets on the same MinIO deployment. mc mv also supports moving objects between a local filesystem and MinIO.

mc od

The mc od command copies a local file to a remote location in a specified number of parts and part sizes. The command outputs the time it took to upload the file.

mc ping

The mc ping command performs a liveness check on a specified target.

mc pipe

The mc pipe command streams content from STDIN to a target object.

mc put

The mc put uploads an object from the local file system to a bucket on a target S3 deployment.

mc rb

The mc rb command removes one or more buckets on MinIO or another S3-compatible service.

To remove only the contents of a bucket, use mc rm instead.

mc ready

The mc ready command checks the status of a cluster and whether the cluster has read and write quorum.

mc replicate add
mc replicate backlog
mc replicate export
mc replicate import
mc replicate ls
mc replicate resync
mc replicate rm
mc replicate status
mc replicate update

The mc replicate command configures and manages the Server-Side Bucket Replication for a MinIO deployment, including active-active replication configurations and resynchronization.

mc retention clear
mc retention info
mc retention set

The mc retention command configures the Write-Once Read-Many (WORM) locking settings for an object or object(s) in a bucket. You can also set the default object lock settings for a bucket, where all objects without explicit object lock settings inherit the bucket default.

mc rm

The mc rm command removes objects from a bucket on a MinIO deployment. To completely remove a bucket, use mc rb instead.

mc share download
mc share ls
mc share upload

Use the mc share commands to manage presigned URLs for downloading and uploading objects to a MinIO bucket.

mc sql

The mc sql command provides an S3 Select interface for performing sql queries on objects in the specified MinIO deployment.

mc stat

The mc stat command displays information on objects in a MinIO bucket, including object metadata. You can also use it to retrieve bucket metadata.

mc support callhome
mc support diag
mc support inspect
mc support perf
mc support profile
mc support proxy
mc support top api
mc support top disk
mc support top locks
mc support upload

The MinIO Client mc support commands provides tools for analyzing deployment health or performance and for running diagnostics. You can also upload generated health reports for further analysis by MinIO engineering.

mc tag list
mc tag remove
mc tag set

The mc tag command adds, removes, and lists tags associated to a bucket or object.

mc tree

The mc tree command lists all prefixes inside a MinIO bucket in a tree format. The command optionally supports listing all objects inside of bucket at each prefix, including the bucket root.

mc undo

The mc undo command reverses changes due to either a PUT or DELETE operation at a specified path.

mc update

The mc update compatibility command reports that self-update is disabled. Upgrade through the Silo download page, the Pigsty package repository, or GitHub Releases.

mc version enable
mc version info
mc version suspend

The mc version commands enable, disable, and retrieve the versioning status for a MinIO bucket.

mc watch

The mc watch command watches for events on the specified MinIO bucket or local filesystem path. For S3 services, use mc event add to configure bucket event notifications on S3-compatible services.

Configuration File

mc uses a JSON formatted configuration file used for storing certain kinds of information, such as the aliases for each configured S3-compatible service.

For Linux and macOS, the default configuration file location is ~/.mc/config.json.

For Windows, mc attempts to construct a default file path by trying specific environment variables. If a variable is unset, mc moves to the next variable. If all attempts fail, mc returns an error. The following list describes each possible file path location in the order mc checks them:

  1. HOME\.mc\config.json
  2. USERPROFILE\.mc\config.json
  3. HOMEDRIVE+HOMEPATH\.mc\config.json

You can use the --config-dir

Certificates

The MinIO Client stores certificates and CAs for deployments to the following paths:

Linux, macOS, and other Unix-like systems:

~/.mc/certs/ # certificates
~/.mc/certs/CAs/ # Certificate Authorities

Windows systems:

C:\Users\[username]\mc\certs\ # certificates
C:\Users\[username]\mc\certs\CAs\ # Certificate Authorities

When creating a new alias, the MinIO Client fetches the peer certificate, computes the public key fingerprint, and asks the user whether to accept the deployment’s certificate. If you decide to trust the certificate, the MinIO Client adds the certificate to the certificate authority path listed above.

Note

Note

In testing environments, you can bypass the certificate check for selected MinIO Client commands by passing the --insecure flag.

Pattern Matching

Some commands and flags allow for pattern matching. When enabled, a pattern can include either of these wildcards for character replacement:

  • * to represent a string of characters to match, either in the middle or end.
  • ? to represent a single character.

For example, refer to the following examples for wildcard uses and their results.

Pattern Text Match Result
abc* ab Match
abc* abd Not a match
abc*c abcd Match
ab*??d abxxc Match
ab*??d abxc Match
ab??d abxc Match
ab??d abc Match
ab??d abcxdd Not a match

Global Options

All commands support the following global options. You can also define some of these options using Environment Variables.

--config-dir

option

The path to a JSON formatted configuration file that mc uses for storing data. See Configuration File for more information on how mc uses the configuration file.

Alternatively, set the environment variable MC_CONFIG_DIR.

--debug

option

Enables verbose output to the console.

For example, the following operation adds verbose output to the mc ls command:

mc --debug ls play

Alternatively, set the environment variable MC_DEBUG.

--disable-pager --dp

option

Note

Added: mc

RELEASE.2024-04-29T09-56-05Z

Disable the pager functionality of the MinIO Client in the CLI. When used, output prints to raw STDOUT instead.

--insecure

option

Disables TLS/SSL certificate verification. Allows TLS connectivity to servers with invalid certificates. Exercise caution when using this option against untrusted S3 hosts.

Alternatively, set the environment variable MC_INSECURE.

--json

option

Enables JSON lines formatted output to the console.

For example, the following operation adds JSON Lines output to the mc ls command:

mc --json ls play

Alternatively, set the environment variable MC_JSON.

--no-color

option

Disables the built-in color theme for console output. Useful for dumb terminals.

Alternatively, set the environment variable MC_NO_COLOR.

--quiet

option

Suppresses console output.

Alternatively, set the environment variable MC_QUIET.

--resolve

option

Note

Added: mc

RELEASE.2024-08-13T05-33-17Z

Creates a custom DNS mapping to resolve a HOST to a specified IP address.

Use the following syntax:

--resolve HOST[:PORT]=IP

For example:

mc alias set --resolve myminio.example.com:9000=192.168.188.118 'myminio' 'https://myminio.example.com:9000' 'miniouser' 'miniosecret'

Repeat the flag multiple times to add additional custom DNS mappings.

--version

option

Displays the current version of mc.

--help

mc-cmd

Optional

Displays a summary of command usage on the terminal.

4.1 - mc alias list

Syntax

The mc alias list command lists all aliases in the local mc configuration.

The command output includes the configured access key and secret key associated to each alias.

The following command lists all aliases configured on the local host machine:

mc alias list

The mc alias list command has the following syntax:

mc [GLOBALFLAGS] alias list [ALIAS]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Optional The name of a specific alias to display.

Global Flags

This command supports any of the global flags.

Examples

List All Configured Aliases

The following mc alias list command lists all configured aliases in the local mc configuration.

mc alias list
mc alias list

List a Specific Alias

The following mc alias list command lists the details of a specific alias in the local mc configuration.

mc alias list myminio
mc alias list ALIAS
  • Replace ALIAS with the name of the alias to return.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.2 - mc anonymous set

Syntax

The mc anonymous set command sets anonymous (i.e. unauthenticated or public) access policies for a bucket.

Buckets with anonymous policies allow clients to access the bucket contents and perform actions consistent with the specified policy without authentication.

To set anonymous bucket policies using an IAM JSON policy, use the mc anonymous set-json command.

The following command sets anonymous access policies for several buckets on the myminio MinIO deployment:

mc anonymous set upload myminio/uploads
mc anonymous set download myminio/downloads
mc anonymous set public myminio/public

Applications can perform the following operations without authentication:

  • PUT objects to myminio/uploads and myminio/public.
  • GET objects from myminio/downloads and myminio/public.

The command has the following syntax:

mc [GLOBALFLAGS] policy set PERMISSION ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

PERMISSION

mc-cmd

Required Name of the policy to assign to the specified ALIAS. Specify one of the following values:

  • none - Disable anonymous access to the ALIAS.
  • download - Enable download-only access to the ALIAS.
  • upload - Enable upload-only access to the ALIAS.
  • public - Enable download and upload access to the ALIAS.
ALIAS

mc-cmd

Required The full path to the bucket or bucket prefix to which the command applies the specified PERMISSION.

Specify the alias of the MinIO or other S3-compatible service and the full path to the bucket or bucket prefix. For example:

mc anonymous set public play/mybucket

Specify a bucket prefix to set the policy on only that prefix. For example, this command sets distinct anonymous bucket policies on the mybucket/downloads and mybucket/uploads prefixes:

mc anonymous set download play/mybucket/downloads
mc anonymous set upload play/mybucket/uploads

Global Flags

This command supports any of the global flags.

Examples

Set Anonymous Policy for Bucket

Use mc anonymous set to set the anonymous policy for a bucket:

mc anonymous set POLICY ALIAS/PATH
  • Replace POLICY with a supported permission.
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the destination bucket.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.3 - mc batch cancel

Note

Added: mc

RELEASE.2023-03-20T17-17-53Z

Syntax

The mc batch cancel stops an ongoing batch job.

You must specify the job ID. To find the job ID, use mc batch list.

The following command outputs the job definition for the job identified as KwSysDpxcBU9FNhGkn2dCf.

mc batch cancel myminio KwSysDpxcBU9FNhGkn2dCf

The command has the following syntax:

mc [GLOBALFLAGS] batch cancel ALIAS JOBID
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias for the MinIO deployment on which the job is currently running.

JOBID

mc-cmd

Required

The unique identifier of the batch job to cancel. To find the ID of a job, use mc batch list.

Global Flags

This command supports any of the global flags.

Example

Cancel an ongoing batch job

The following command cancels the job with ID KwSysDpxcBU9FNhGkn2dCf on the deployment at alias myminio:

mc batch cancel myminio KwSysDpxcBU9FNhGkn2dCf

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.4 - mc encrypt clear

Syntax

The mc encrypt clear command removes the current default encryption settings for a bucket.

The following command removes the default encryption settings for the mydata bucket on the MinIO deployment associated with the myminio alias:

mc encrypt clear myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] encrypt clear ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

The full path to the bucket on which to remove the default SSE mode. Specify the alias of the MinIO deployment as the prefix to the ALIAS path. For example:

mc encrypt clear play/mybucket

Global Flags

This command supports any of the global flags.

Examples

Remove the Automatic Server-Side Encryption Settings for a Bucket

 mc encrypt clear myminio/data
mc encrypt clear ALIAS
  • Replace ALIAS with the alias of the MinIO deployment on which to remove automatic server-side bucket encryption.

Behavior

Modifying Bucket Encryption Settings Does Not Affect Encrypted Objects

Disabling automatic bucket encryption does not decrypt any objects in the bucket.

To permanently decrypt objects in the bucket, you can perform an in-place copy after disabling object decryption. For versioned buckets, the previous object versions remain encrypted.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.5 - mc event add

Syntax

The mc event add command adds event notification triggers to a bucket.

MinIO automatically sends triggered events to the configured notification target.

The following command creates a new event notification trigger for all PUT and DELETE operations for the mydata bucket on the myminio MinIO deployment:

mc event add --event "put,delete" myminio/mydata arn:aws:sqs::primary:target

The specified ARN corresponds to a configured bucket notification target on the myminio deployment.

The command has the following syntax:

mc [GLOBALFLAGS] event add \
                 [--event "string"]  \
                 [--ignore-existing] \
                 [--prefix "string"] \
                 [--suffix "string"] \
                 ALIAS               \
                 ARN
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The MinIO alias and bucket to which the command adds the new event notification. For example:

mc event add play/mybucket
ARN

mc-cmd

Required

The Amazon Resource Name (ARN) of the notification target.

The MinIO server outputs an ARN for each configured notification target at server startup. See Bucket Notifications for more information.

--event

mc-cmd

Optional

The event(s) for which MinIO generates bucket notifications.

Supports the following values:

  • put
  • get
  • delete

Specify multiple value using a comma , delimiter. Do not add any whitespace between values.

If not specified, defaults to put,delete,get.

See Supported Bucket Events for a detailed list of S3 events associated to each of the supported values.

ignore-existing, p

mc-cmd

Optional

Directs MinIO to ignore the specified event triggers if a matching trigger already exists.

--prefix

mc-cmd

Optional

The bucket prefix in which the specified --event can trigger a bucket notification.

For example, given a ALIAS of play/mybucket and a --prefix of photos, only events in play/mybucket/photos trigger bucket notifications.

Omit to trigger the event for all prefixes and objects in the bucket.

--suffix

mc-cmd

Optional

The bucket suffix in which the specified --event can trigger a bucket notification.

For example, given a ALIAS of play/mybucket and a --suffix of .jpg, only events in play/mybucket/*.jpg trigger bucket notifications.

Omit to trigger the event for all objects regardless of suffix.

Global Flags

This command supports any of the global flags.

Examples

Add an Event Notification to a Bucket

The following command adds a new event notification trigger for all S3 PUT, GET, and DELETE operations on a bucket. The command assumes the MinIO deployment has at least one configured bucket notification target:

mc event add myminio/mydata arn:minio:sqs::primary:webhook
mc event add ALIAS ARN
  • Replace ALIAS with the alias of the MinIO deployment and the bucket on which to add the bucket notification event. For example:

    myminio/mydata

  • Replace ARN with the notification target ARN.

Behavior

Supported Bucket Events

The following table lists the supported mc event add values and their corresponding S3 events:

Supported Value

Corresponding S3 Events

put

s3:ObjectCreated:CompleteMultipartUpload
s3:ObjectCreated:Copy
s3:ObjectCreated:DeleteTagging
s3:ObjectCreated:Post
s3:ObjectCreated:Put
s3:ObjectCreated:PutLegalHold
s3:ObjectCreated:PutRetention
s3:ObjectCreated:PutTagging

get

s3:ObjectAccessed:Head
s3:ObjectAccessed:Get
s3:ObjectAccessed:GetRetention
s3:ObjectAccessed:GetLegalHold

delete

s3:ObjectRemoved:Delete
s3:ObjectRemoved:DeleteMarkerCreated

replica

s3:Replication:OperationCompletedReplication
s3:Replication:OperationFailedReplication
s3:Replication:OperationMissedThreshold
s3:Replication:OperationNotTracked
s3:Replication:OperationReplicatedAfterThreshold

ilm

s3:ObjectTransition:Failed
s3:ObjectTransition:Complete
s3:ObjectRestore:Post
s3:ObjectRestore:Completed

scanner

s3:Scanner:ManyVersions
s3:Scanner:BigPrefix

For more complete documentation on the listed S3 events, see S3 Supported Event Types.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.6 - mc idp ldap accesskey disable

Description

mc idp ldap accesskey disable disables the specified access key on the MinIO deployment.

The following example disables the access key mykey on the minio deployment:

mc idp ldap accesskey disable minio mykey

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap accesskey disable  \
                                 ALIAS       \
                                 KEY
  • Replace ALIAS with the alias of a MinIO deployment configured for AD/LDAP integration.

  • Replace KEY with the access key to disable.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment configured for AD/LDAP.

For example:

mc idp ldap accesskey disable minio
KEY

mc-cmd

Required

The configured access key to disable.

Example

Disable the access key mykey from the minio deployment.

mc idp ldap accesskey disable minio/ mykey

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.7 - mc idp ldap add

Description

The mc idp ldap add command creates an AD/LDAP IDP server configuration.

MinIO supports no more than one (1) AD/LDAP provider per deployment.

The following example sets the AD/LDAP configuration settings for the myminio deployment.

mc idp ldap add                                                            \
            myminio                                                        \
            server_addr=myldapserver:636                                   \
            lookup_bind_dn=cn=admin,dc=min,dc=io                           \
            lookup_bind_password=somesecret                                \
            user_dn_search_base_dn=dc=min,dc=io                            \
            user_dn_search_filter="(uid=%s)"                               \
            group_search_base_dn=ou=swengg,dc=min,dc=io                    \
            group_search_filter="(&(objectclass=groupofnames)(member=%d))"

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap add               \
                          ALIAS             \
                          [CFG_PARAM1]      \
                          [CFG_PARAM2]...
  • Replace ALIAS with the alias of a MinIO deployment to create for AD/LDAP integration.

  • Replace the [CFG_PARAM#] with each of the configuration setting key-value pairs in the format of PARAMETER="value".

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment on which to add an AD/LDAP integration.

For example:

mc idp ldap add myminio                               \
                server_addr=myldapserver:636          \
                lookup_bind_dn=cn=admin,dc=min,dc=io  \
                lookup_bind_password=somesecret       \
                user_dn_search_base_dn=dc=min,dc=io   \
                user_dn_search_filter="(uid=%s)"      \
server_addr

mc-cmd

Required

Specify the hostname for the Active Directory / LDAP server. For example:

ldapserver.com:636
Note

srv_record_name automatically identifies the port

If your AD/LDAP server uses DNS SRV Records, do not append the port number to your server_addr value. SRV requests automatically include port numbers when returning the list of available servers.

This parameter corresponds with the MINIO_IDENTITY_LDAP_SERVER_ADDR environment variable.

lookup_bind_dn

mc-cmd

Required

Specify the Distinguished Name (DN) for an AD/LDAP account MinIO uses when querying the AD/LDAP server. Enables Lookup-Bind authentication to the AD/LDAP server.

The DN account should be a read-only access keys with sufficient privileges to support querying performing user and group lookups.

This parameter corresponds with the MINIO_IDENTITY_LDAP_LOOKUP_BIND_DN environment variable.

lookup_bind_password

mc-cmd

Required

Specify the password for the Lookup-Bind user account.

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

This parameter corresponds with the MINIO_IDENTITY_LDAP_LOOKUP_BIND_PASSWORD environment variable.

user_dn_attributes

mc-cmd

Optional

Note

Added: RELEASE.2024-06-06T09-36-42Z

Comma-separated list of user DN attributes.

Some valid values include, uid,cn,mail,sshPublicKey.

To enable public authentication for LDAP users, pass sshPublicKey as a DN attribute. The user can then use the passed SSH Public Key to log in to SFTP servers.

mc idp ldap update ALIAS user_dn_attributes=sshPublicKey
user_dn_search_base_dn

mc-cmd

Required

Specify the base Distinguished Name (DN) MinIO uses when querying for user credentials matching those provided by an authenticating client.

Separate multiple DNs with a semicolon (;).

For example:

cn=miniousers,dc=myldapserver,dc=net;ou=swengg,dc=min,dc=io

Supports Lookup-Bind mode.

This parameter corresponds with the MINIO_IDENTITY_LDAP_USER_DN_SEARCH_BASE_DN environment variable.

user_dn_search_filter

mc-cmd

Required

Specify the AD/LDAP search filter MinIO uses when querying for user credentials matching those provided by an authenticating client.

Use the %s substitution character to insert the client-specified username into the search string. For example:

(userPrincipalName=%s)

This parameter corresponds with the MINIO_IDENTITY_LDAP_USER_DN_SEARCH_FILTER environment variable.

comment

mc-cmd

Optional

Specify a comment to associate to the AD/LDAP configuration.

This parameter corresponds with the MINIO_IDENTITY_LDAP_COMMENT environment variable.

enabled

mc-cmd

Optional

Set to false to disable the AD/LDAP configuration.

If false, applications cannot generate STS credentials or otherwise authenticate to MinIO using the configured provider.

Defaults to true or “enabled”.

group_search_base_dn

mc-cmd

Optional

Specify a semicolon-separated (;) list of group search base Distinguished Names MinIO uses when performing group lookups.

For example:

cn=miniogroups,dc=myldapserver,dc=net;ou=swengg,dc=min,dc=io

This parameter corresponds with the MINIO_IDENTITY_LDAP_GROUP_SEARCH_BASE_DN environment variable.

group_search_filter

mc-cmd

Optional

Specify an AD/LDAP search filter for performing group lookups for the authenticated user

Use the %s substitution character to insert the client-specified username into the search string. Use the %d substitution character to insert the Distinguished Name of the client-specified username into the search string.

For example:

(&(objectclass=groupOfNames)(memberUid=%s))

When providing an AD/LDAP group search filter, configure a filter that returns the minimum number of relevant groups for the purpose of supporting authentication. Filters that return large group assignments increase the size of associated calls and resources. Functions sensitive to large request or response bodies may exhibit unexpected behaviors as a result.

This parameter corresponds with the MINIO_IDENTITY_LDAP_GROUP_SEARCH_FILTER environment variable.

server_insecure

mc-cmd

Optional

Specify on to allow unsecured (non-TLS encrypted) connections to the AD/LDAP server.

MinIO sends AD/LDAP user credentials in plain text to the AD/LDAP server, such that enabling TLS is required to prevent reading credentials over the wire. Using this option presents a security risk where any user with access to network traffic can observe the unencrypted plaintext credentials.

Defaults to off.

This parameter corresponds with the MINIO_IDENTITY_LDAP_SERVER_INSECURE environment variable.

server_starttls

mc-cmd

Optional

Specify on to enable StartTLS connections to an AD/LDAP server.

Defaults to off

For more about StartTLS, refer to section 4.14 of the LDAP RFC 4511 specification.

This parameter corresponds with the MINIO_IDENTITY_LDAP_SERVER_STARTTLS environment variable.

srv_record_name

mc-cmd

Optional

Note

Added: RELEASE.2022-12-12T19-27-27Z

Specify the appropriate value to enable MinIO to select an AD/LDAP server using a DNS SRV record request.

When enabled, MinIO selects an AD/LDAP server by:

  • Constructing the target SRV record name following standard naming conventions.
  • Requesting a list of available AD/LDAP servers.
  • Choosing an appropriate target based on priority and weight.

The configuration examples below presume the AD/LDAP server address is set to example.com and the SRV record protocol is _tcp.

For SRV record names beginning with _ldap, specify ldap. The constructed DNS SRV record name resembles the following:

_ldap._tcp.example.com

For SRV record names with beginning with _ldaps, specify ldaps. The constructed DNS SRV record name resembles the following:

_ldaps._tcp.example.com

If your DNS SRV record name uses alternate service or protocol names, specify on and provide the full record name as your LDAP server address. Example: _ldapserver._specialtcp.example.com

For more about DNS SRV records, see DNS SRV Records for LDAP.

Note

Server address for DNS SRV record configurations

The specified server name must not include a port number. This is different from a standard AD/LDAP configuration, where the port number is required.

See server_addr or MINIO_IDENTITY_LDAP_SERVER_ADDR for more about configuring an AD/LDAP server address.

This parameter corresponds with the MINIO_IDENTITY_LDAP_SRV_RECORD_NAME environment variable.

tls_skip_verify

mc-cmd

Optional

Specify on to trust the AD/LDAP server TLS certificates without verification. This option may be required if the AD/LDAP server TLS certificates are signed by an untrusted Certificate Authority (e.g. self-signed).

Defaults to off

This parameter corresponds with the MINIO_IDENTITY_LDAP_TLS_SKIP_VERIFY environment variable.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.8 - mc idp ldap policy attach

Description

The mc idp ldap policy attach command attaches one or more polices to an entity.

The following example attaches the policy userpolicy to the user bobfisher on the myminio deployment:

mc idp ldap policy attach myminio                                                  \
                          userpolicy                                               \
                          --user='uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io'

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap policy attach             \
                                 POLICYNAME         \
                                 [POLICY2] ...      \
                                 ALIAS              \
                                 [--user=`USER`]    \
                                 [--group=`GROUP`]
  • Replace ALIAS with the alias of a MinIO deployment to configure for AD/LDAP integration.

  • Replace POLICYNAME with the policy to attach to the entity. You may list multiple policies to attach to the entity.

  • Use must use one of either the --user or --group flag. You may only use the flag once in the command. You cannot use both flags in the same command.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment with the entity to which to attach a policy.

For example:

mc idp ldap policy attach myminio                                                  \
                          userpolicy                                               \
                          --user='uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io'

Example

The following example attaches two policies, policy1 and policy2, to the projectb group on the myminio deployment:

mc idp ldap policy attach myminio                                                 \
                          policy1                                                 \
                          policy2                                                 \
                          --group='cn=projectb,ou=groups,ou=swengg,dc=min,dc=io'

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.9 - mc ilm restore

Syntax

The mc ilm restore command creates a temporary copy of an object archived on a remote tier. The copy automatically expires after 1 day by default.

Use this command to allow applications to access a tiered object through the MinIO deployment (e.g. “hot tier”). The archived object remains on the remote tier, while the temporary copy becomes HEAD for that object.

Note

Added: mc

RELEASE.2023-04-12T02-21-51Z

Use mc stat to display whether a restored object reads from the local temporary copy or the remote tier. Objects currently in the process of restoration from the remote tier show a status of Ongoing : true.

The following command restores a copy of a transitioned object from the remote tier back to the myminio MinIO deployment:

mc ilm restore myminio/mybucket/object.txt

The command has the following syntax:

mc [GLOBALFLAGS] ilm restore         \
                 [--days "int" ]     \
                 [--recursive]       \
                 [--vid "string"]    \
                 [--versions]        \
                 [--enc-c "string"]  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The MinIO alias, bucket, and path to the archived object to restore.

mc ilm restore myminio/mybucket/object.txt
--days

mc-cmd

Optional

The number of days after which MinIO expires the restored copy of the archived object.

--enc-c

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

  • KEY - the full path to the object as alias/bucket/path/object.
  • VALUE - the 32-byte RAW Base64-encoded data key to use for encrypting object(s).

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"
Note

Note

MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.

--recursive, r

mc-cmd

Optional

Restores all objects under the specified prefix.

--versions

mc-cmd

Optional

Restores all versions of the object on the remote tier.

--version-id, vid

mc-cmd

Optional

Restores the specified version of the object on the remote tier.

Global Flags

This command supports any of the global flags.

Examples

Restore an Archived Object

The following command restores an object archived to a remote tier:

mc ilm restore myminio/mybucket/object.txt

Restore a Specific Archived Object Version

The following command restore a specific object version archived to a remote tier:

mc ilm restore --vid "VERSIONID" myminio/mybucket/object.txt

Restore All Archived Objects at a Bucket Prefix

The following command restores all objects archived under a specified prefix on the remote tier:

mc ilm restore --recursive myminio/mybucket/data/

Behavior

Restored Objects Expire Automatically

MinIO automatically expires the restored object copy after the specified number of days (Default: 1 day).

Restored Objects Become HEAD

The restored object copy becomes HEAD for that object namespace regardless of it’s versioning history. This can result in applications returning “stale” data while the local copy exists.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.10 - mc ilm rule add

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm rule rm replaces mc ilm add.

Syntax

The mc ilm rule add command adds an object lifecycle management rule to a bucket.

The command supports adding both Transition (Tiering) and Expiration lifecycle management rules.

The following command adds new lifecycle management rules to the mydata bucket on the myminio deployment:

mc ilm rule add --expire-days 90 --noncurrent-expire-days 30  myminio/mydata

mc ilm rule add --expire-delete-marker myminio/mydata

mc ilm rule add --transition-days 30 --transition-tier "COLDTIER" myminio/mydata

mc ilm rule add --noncurrent-transition-days 7 --noncurrent-transition-tier "COLDTIER"

The configured rules have the following effect:

  • Delete objects more than 90 days old
  • Delete objects 30 days after they become non-current
  • Delete DeleteMarker tombstones if that object has no other versions remaining.
  • Transition objects more than 30 days old to the COLDTIER remote tier.
  • Transition objects 7 days after they become non-current to the COLDTIER remote tier.

The command has the following syntax:

mc [GLOBALFLAGS] ilm rule add                               \
                 [--prefix string]                          \
                 [--tags string]                            \
                 [--expire-days "integer"]                  \
                 [--expire-all-object-versions]             \
                 [--expire-delete-marker]                   \
                 [--transition-days "string"]               \
                 [--transition-tier "string"]               \
                 [--noncurrent-expire-days "integer"]       \
                 [--noncurrent-expire-newer "integer"]      \
                 [--noncurrent-transition-days "integer"]   \
                 [--noncurrent-transition-tier "string"]    \
                 [--site-gt "string"]                       \
                 [--size-lt "string"]                       \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias and bucket on the MinIO deployment to which to add the object lifecycle management rule.

For example:

mc ilm rule add myminio/mydata
--prefix

mc-cmd

Optional

Restrict the management rule to a specific object prefix.

For example:

mc ilm rule add --prefix "meetingnotes/" myminio/mydata --expire-days "90"

The command creates a rule that expires objects in the mydata bucket of the myminio ALIAS after 90 days for any object with the meetingnotes/ prefix.

--tags

mc-cmd

Optional

One or more ampersand &-delimited key-value pairs describing the object tags to use for filtering objects to which the lifecycle configuration rule applies.

This option is mutually exclusive with the following option:

--expire-all-object-versions

mc-cmd

Optional

Note

Added: mc

RELEASE.2024-02-24T01-33-20Z

Expire all current and noncurrent versions of an object. Use with the --expire-days option to specify the number of days after which all versions of an object should be deleted by the scanner process.

After the scanner processes this command, no versions of the object remain on the deployment.

Note

Changed: MinIO

RELEASE.2024-05-01T01-11-10Z

This flag only applies to objects that do not have a delete marker as the latest version.

--expire-days

mc-cmd

Optional

The number of days to retain an object after being created. MinIO marks the object for deletion after the specified number of days pass. Specify the number of days as an integer, for example 30 for 30 days.

For versioned buckets, the expiry rule applies only to the current object version. Use either the --noncurrent-expire-days flag or the --expire-all-object-versions flag to apply expiration behavior to noncurrent object versions.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

Mutually exclusive with the following options:

For more complete documentation on object expiration, see Object Expiration and Object Deletion.

--expire-delete-marker

mc-cmd

Optional

Specify this option to direct MinIO to remove delete markers for objects with no remaining object versions. Specifically, the delete marker is the only remaining “version” of the given object.

This option is mutually exclusive with the following option:

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

For more complete documentation on object expiration, see Object Expiration and Object Deletion.

--transition-days

mc-cmd

Optional

The number of calendar days from object creation after which MinIO marks an object as eligible for transition. MinIO transitions the object to the configured remote tier specified to the --transition-tier. Specify the number of days as an integer, e.g. 30 for 30 days. If the remote tier is another MinIO deployment, you can set the value to 0 to mark new objects as immediately eligible for transition to the remote tier.

For versioned buckets, the transition rule applies only to the current object version. Use the --noncurrent-transition-days option to apply transition behavior to noncurrent object versions.

Requires specifying --transition-tier.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

For more complete documentation on object transition, see Object Transition (“Tiering”).

--transition-tier

mc-cmd

Optional

The remote tier to which MinIO transition objects. Specify an existing remote tier created by mc ilm tier add.

Required if specifying --transition-days.

--noncurrent-expire-days

mc-cmd

Optional

The number of days to retain an object version after becoming non-current (i.e. a different version of that object is now the HEAD). MinIO marks noncurrent object versions for deletion after the specified number of days pass.

This option has the same behavior as the S3 NoncurrentVersionExpiration action.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

--noncurrent-transition-days

mc-cmd

Optional

The number of days an object has been non-current (i.e. replaced by a newer version of that same object) after which MinIO marks the object version as eligible for transition. MinIO transitions the object to the configured remote tier specified to the --transition-tier once the system host datetime passes that calendar date.

This option has no effect on non-versioned buckets. Requires specifying --noncurrent-transition-tier.

This option has the same behavior as the S3 NoncurrentVersionTransition action.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

--noncurrent-transition-tier

mc-cmd

Optional

The remote tier to which MinIO transitions noncurrent objects versions. Specify a remote tier created by mc ilm tier add.

--noncurrent-expire-newer

mc-cmd

Optional

The maximum number of non-current object versions to retain, ordered from newest to oldest.

Use this flag to retain a certain number of past versions of a file in a first in, first out fashion. After retaining the maximum number of non-current versions, MinIO marks any remaining older non-current object versions as eligible for expiration.

The following table lists a number of object versions and their expiration eligibility based on --noncurrent-expire-newer 3:

v5 (current version)

Current version not affected by ILM rules.

v4

retained

v3

retained

v2

retained

v1

marked for expiry

MinIO retains the current version, v5. MinIO also retains the next 3 non-current versions, starting with the newest. This means MinIO marks v4, v3, and v2 for the three non-current version to retain.

v1 would be a fourth non-current version, which falls outside the limit of non-current versions to retain, so MinIO marks v1 for expiration.

Updating the number for this flag only impacts the unmarked versions of objects. Any versions already marked for expiration do not change if you increase the number to retain.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

--size-gt

mc-cmd

Optional

Note

Added: mc

RELEASE.2023-12-02T02-03-28Z

Select objects larger than the specified value. Enter the value as a number and a unit, such as 5GiB for 5 gibibytes.

Valid units include:

Suffix Unit Size
k KB (Kilobyte, 1000 Bytes)
m MB (Megabyte, 1000 Kilobytes)
g GB (Gigabyte, 1000 Megabytes)
t TB (Terrabyte, 1000 Gigabytes)
ki KiB (Kibibyte, 1024 Bites)
mi MiB (Mebibyte, 1024 Kibibytes)
gi GiB (Gibibyte, 1024 Mebibytes)
ti TiB (Tebibyte, 1024 Gibibytes)
--size-lt

mc-cmd

Optional

Note

Added: mc

RELEASE.2023-12-02T02-03-28Z

Select objects smaller than the specified value. Enter the value as a number and a unit, such as 1M for 1 megabyte.

Valid units include:

Suffix Unit Size
k KB (Kilobyte, 1000 Bytes)
m MB (Megabyte, 1000 Kilobytes)
g GB (Gigabyte, 1000 Megabytes)
t TB (Terrabyte, 1000 Gigabytes)
ki KiB (Kibibyte, 1024 Bites)
mi MiB (Mebibyte, 1024 Kibibytes)
gi GiB (Gibibyte, 1024 Mebibytes)
ti TiB (Tebibyte, 1024 Gibibytes)

Global Flags

This command supports any of the global flags.

Examples

Expire All Bucket Contents After Number of Days

Use mc ilm rule add with the --expire-all-object-versions and --expire-days flags to mark all current and non-current bucket contents for expiration after a number of days pass from the object’s creation:

mc ilm rule add ALIAS/PATH --expire-all-object-versions --expire-days "DAYS"
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket on the S3-compatible host.
  • Replace DAYS with the number of days after which to expire each object. For example, specify 30 to expire objects 30 days after creation.

Transition Non-Current Object Versions at a Prefix to a Different Tier

Use the mc ilm rule add with --prefix and --transition-tier to transition older non-current versions of an object to a different storage tier.

mc ilm rule add --prefix "doc/" --transition-days "90" --transition-tier "MINIOTIER-1"  \
       --noncurrent-transition-days "45" --noncurrent-transition-tier "MINIOTIER-2"    \
       myminio/mybucket

This command looks at the contents with the doc/ prefix in the mybucket bucket on the myminio deployment.

  • Current objects in the prefix older than 90 days move to the MINIOTIER-1 storage tier.
  • Non-current objects in the prefix older than 45 days move to the MINIOTIER-2 storage tier.
  • Both MINIOTIER-1 and MINIOTIER-2 have already been created with mc admin tier add.

Expire All Objects at a Prefix, Retain Current Object Versions Longer Than Non-Current Object Versions

Use the mc ilm rule add command with --prefix, --expire-days, and --noncurrent-expire-days to expire current and non-current versions of an object at different times.

mc ilm rule add --prefix "doc/" --expire-days "300" --noncurrent-expire-days "100" myminio/mybucket

This command looks at the contents with the doc/ prefix in the mybucket bucket on the myminio deployment.

  • Current objects expire after 300 days.
  • Non-current objects expire after 100 days.

Transition noncurrent versions in the prefix /doc with a size greater the 1MiB

Use the mc ilm rule add command with --prefix, --size-gt, and --noncurrent-expire-days to expire current and non-current versions of an object at different times.

mc ilm rule add --prefix "doc/" --size-gt 1MiB --transition-days "90" --transition-tier "MINIOTIER-1" \
      --noncurrent-transition-days "45" --noncurrent-transition-tier "MINIOTIER-1" \
      myminio/mybucket/

This command looks at the contents with the doc/ prefix in the mybucket bucket on the myminio deployment.

The command selects the following objects:

  • Current objects older than 90 days larger than 1MiB.
  • Non-current objects older than 45 days larger than 1MiB.

Selected objects transition to MINIOTIER-1.

Remove Delete Markers

The following command removes delete markers for objects where the delete marker is the only version of the object that remains.

mc ilm rule add ALIAS/PATH --expire-delete-marker
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket on the S3-compatible host.
Note

Note

To delete all versions of an object with a delete marker as its latest version, including the delete marker, consider using batch expiration.

Required Permissions

For permissions required to add a rule, refer to the required permissions on the parent command.

Behavior

Lifecycle Management Object Scanner

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

Expiry vs Transition

MinIO supports specifying both expiry and transition rules in the same bucket or bucket prefix. MinIO can execute an expiration rule on an object regardless of its transition status. Use mc ilm rule ls to review the currently configured object lifecycle management rules for any potential interactions between expiry and transition rules.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.11 - mc ilm tier add

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm tier add replaces mc admin tier add.

Description

The mc ilm tier add command creates a new remote storage tier to a supported storage services.

See Object Transition for a complete list.

Supported S3 Services

mc ilm tier add supports only the following S3-compatible services as a remote target for object tiering:

  • MinIO
  • Amazon S3
  • Google Cloud Storage
  • Azure Blob Storage

Permissions

MinIO requires the following administrative permissions on the cluster in which you create remote tiers for object transition lifecycle management rules:

For example, the following policy provides permission for configuring object transition lifecycle management rules on any bucket in the cluster:

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "admin:SetTier",
               "admin:ListTier"
            ],
            "Effect": "Allow",
            "Sid": "EnableRemoteTierManagement"
      },
      {
            "Action": [
               "s3:PutLifecycleConfiguration",
               "s3:GetLifecycleConfiguration"
            ],
            "Resource": [
                        "arn:aws:s3:::*"
            ],
            "Effect": "Allow",
            "Sid": "EnableLifecycleManagementRules"
      }
   ]
}

Syntax

The following example creates a new remote tier called WARM-MINIO-TIER on the myminio deployment. The command creates a tier for a remote MinIO deployment located at the hostname https://warm-minio.com.

 mc ilm tier add minio myminio WARM-MINIO-TIER                     \
                               --endpoint https://warm-minio.com   \
                               --access-key ACCESSKEY              \
                               --secret-key SECRETKEY              \
                               --bucket mybucket                   \
                               --prefix myprefix/

Lifecycle management rules on the myminio deployment can use the new tier to transition objects into the remote location’s myprefix/ prefix in the mybucket bucket.

The command has the following syntax:

mc ilm tier add TIER_TYPE                    \
                TARGET                       \
                TIER_NAME                    \
                --bucket value               \
                [--endpoint string]          \
                [--region string]            \
                [--access-key value^]        \
                [--secret-key value^]        \
                [--use-aws-role^]            \
                [--aws-role-arn^]            \
                [--aws-web-identity-file^]   \
                [--azure-sp-tenant-id^]      \
                [--azure-sp-client-id^]      \
                [--azure-sp-client-secret^]  \
                [--account-name value^]      \
                [--account-key value^]       \
                [--credentials-file value^]  \
                [--prefix value]             \
                [--storage-class value]

^Note: Each supported storage vendor authenticates with different methods. The flags to use for authentication vary by storage vendor. See details under TIER_TYPE below.

  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

The command accepts the following arguments:

TIER_TYPE

mc-cmd

Required

The Cloud Service Provider storage backend (“Tier”) to which MinIO transitions objects. Specify one of the following supported values:

minio

Use a remote MinIO deployment as the storage backend for the new Tier.

Requires also specifying the following parameters:

s3

Use AWS S3 as the storage backend for the new Tier.

Requires also specifying the following parameters:

azure

Use Azure Blob Storage as the storage backend for the new Tier.

Requires also specifying the following parameters:

gcs

Use GCP Cloud Storage as the storage backend for the new Tier.

Requires also specifying the following parameter:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment on which the command creates the new remote tier. You can then create new rules with mc ilm rule add specifying the new remote tier.

TIER_NAME

mc-cmd

Required

The name to associate with the new remote tier. The name must be unique across all configured tiers on the MinIO cluster.

You must specify the tier in all-caps, e.g. WARM_TIER.

--endpoint

mc-cmd

Optional

The URL endpoint for the S3 or MinIO storage. The URL endpoint must resolve to the provider specified to TIER_TYPE.

Required for s3 or minio tier types, optional for azure. This option has no effect for any other value of TIER_TYPE.

--access-key

mc-cmd

Optional

The access key for a user on the remote S3 or minio tier types. The user must have permission to perform read/write/list/delete operations on the remote bucket or bucket prefix.

Required if TIER_TYPE is s3 or minio. This option has no effect for any other value of TIER_TYPE.

--secret-key

mc-cmd

Optional

The secret key for a user on the remote s3 or minio tier types.

Required if TIER_TYPE is s3 or minio. This option has no effect for any other value of TIER_TYPE.

--account-name

mc-cmd

Optional

The Storage Account to use as the remote storage resource.

Required if TIER_TYPE is azure. This option has no effect for any other value of TIER_TYPE.

MinIO does not support changing the storage account name associated to an Azure remote tier. Azure storage backends are tied to the storage account, such that changing this value would change the storage backend and prevent access to any objects transitioned to the original account/backend.

--account-key

mc-cmd

Optional

The corresponding shared account key for the --account-name associated to the remote Azure tier.

The account key must have an assigned Azure policy with the required permissions.

Required if TIER_TYPE is azure. This option has no effect for any other value of TIER_TYPE.

--credentials-file

mc-cmd

Optional

The credential file for a user on the remote Google Cloud Storage tier. The user must have permission to perform read/write/list/delete operations on the remote bucket or bucket prefix.

Required if TIER_TYPE is gcs. This option has no effect for any other value of TIER_TYPE.

--bucket

mc-cmd

Required

The bucket on the remote tier to which MinIO transitions objects.

For azure remote tiers, this value corresponds to the Container name

--prefix

mc-cmd

Optional

The prefix path for the specified --bucket to which MinIO transitions objects.

Omit this field to transition objects into the bucket root.

--storage-class

mc-cmd

Optional

The storage class (“access tier” for Microsoft Azure) MinIO applies to objects transitioned to the remote bucket.

The storage class to apply to objects transitioned by MinIO to the remote bucket. MinIO tiering behavior depends on the remote storage returning objects immediately (milliseconds to seconds) upon request. MinIO therefore cannot support remote storage which requires rehydration, wait periods, or manual intervention.

Select the tab corresponding to the TIER_TYPE for a list of supported values for each tier:

  • STANDARD Recommended
  • REDUCED

For more information, see Erasure Coding storage class.

  • STANDARD
  • STANDARD-IA
  • ONEZONE-IA

For more information, see Using Amazon S3 storage classes.

  • STANDARD
  • NEARLINE
  • COLDLINE

For more information, see GCS storage class.

  • Hot
  • Cool

For more information, see Hot, cool, and archive access tiers for blob data.

If omitted, objects use the default storage class defined for the remote bucket.

--region

mc-cmd

Optional

The S3 backend region for the specified TIER_TYPE, such as us-west-1.

This option only applies if TIER_TYPE is s3 or minio. This option has no effect for any other value of TIER_TYPE.

--use-aws-role

mc-cmd

Optional

Use the access permission for the locally configured AWS Role.

This option only applies if TIER_TYPE is s3 or minio. This option has no effect for any other value of TIER_TYPE.

--aws-role-arn

mc-cmd

Optional

The AWS S3 role name to use when transitioning objects.

This option only applies if TIER_TYPE is s3 and the source is a MinIO pod on Amazon EKS.

--aws-web-identity-file

mc-cmd

Optional

Specify the web identity token file to use when transitioning objects.

This option only applies if TIER_TYPE is s3 and the source is a MinIO pod on Amazon EKS.

--azure-sp-tenant-id

mc-cmd

Optional

Tenant ID for the service principal account to use to log in to Azure storage.

This option only applies if TIER_TYPE is azure and you log in using a service principal identity. This option has no effect for any other value of TIER_TYPE.

--azure-sp-client-id

mc-cmd

Optional

Client ID for the service principal account to use to log in to Azure storage.

This option only applies if TIER_TYPE is azure and you log in using a service principal identity. This option has no effect for any other value of TIER_TYPE.

--azure-sp-client-secret

mc-cmd

Optional

The client secret for the service principal account to use to log in to Azure storage.

This option only applies if TIER_TYPE is azure and you log in using a service principal identity. This option has no effect for any other value of TIER_TYPE.

Global Flags

This command supports any of the global flags.

Examples

Configure a Tier to Transition Objects to a MinIO Deployment

The following example creates a new tier on a local deployment that a configured rule can use to transition objects to a separate, remote MinIO deployment.

mc ilm tier add minio myminio WARM-MINIO-TIER --endpoint https://warm-minio.com \
     --access-key ACCESSKEY --secret-key SECRETKEY --bucket mybucket --prefix myprefix/

This command creates a new tier called WARM-MINIO-TIER for a minio type of remote storage on the myminio deployment.

  • The remote MinIO storage is located at https://warm-minio.com.
  • The command includes credentials for a user with read, write, list, and delete privileges to the bucket and prefix.
  • The tier transitions objects to the mybucket bucket and the myprefix prefix on the remote MinIO storage.

Configure a Tier to Transition Objects to an Azure Blob Storage Location

The following example creates a new tier on a local deployment that a configured rule can use to transition objects to Azure Blob Storage.

mc ilm tier add azure myminio AZTIER --account-name ACCOUNT-NAME --account-key ACCOUNT-KEY \
     --bucket myazurebucket --prefix myazureprefix/

This command creates a new tier called AZTIER for an azure type of remote storage on the myminio deployment.

  • The remote Azure storage is accessed by the provided account name and key.
  • The tier transitions objects to the myazurebucket bucket and the myazureprefix prefix on the Azure storage.

Configure a Tier to Transition Objects to Google Cloud Storage

The following example creates a new tier on a local deployment that a configured rule can use to transition objects to Google Cloud Storage.

 mc ilm tier add gcs myminio GCSTIER --credentials-file /path/to/credentials.json \
     --bucket mygcsbucket  --prefix mygcsprefix/

This command creates a new tier called GCSTIER for a gcs type of remote storage on the myminio deployment.

  • The remote GCS storage is accessed by the provided credentials file.
  • The tier transitions objects to the mygcsbucket bucket and the mygcsprefix prefix on the GCS storage.

Configure a Tier to Transition Objects to Amazon Simple Storage Service (S3)

The following example creates a new tier on a local deployment that a configured rule can use to transition objects to a STANDARD storage on S3.

 mc ilm tier add s3 myminio S3TIER --endpoint https://s3.amazonaws.com \
     --access-key ACCESSKEY --secret-key SECRETKEY --bucket mys3bucket --prefix mys3prefix/ \
     --storage-class "STANDARD" --region us-west-2

This command creates a new tier called S3TIER for a s3 type of remote storage on the myminio deployment.

  • The S3 storage is located at the provided endpoint.
  • The remotes S3 storage is accessed by the provided access key and secret key.
  • The tier transitions objects to the mys3bucket bucket and the mys3prefix prefix on the GCS storage.
  • The tier utilizes S3 STANDARD storage class located in the us-west-2 S3 region.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Required Permissions

For permissions required to add a tier, refer to the required permissions on the parent command.

4.12 - mc legalhold clear

Syntax

The mc legalhold clear command removes the current legal hold setting for an object or objects.

Removing the legal hold on object(s) does not remove any other GOVERNANCE Mode and COMPLIANCE Mode retention settings in place for the object(s)

The following command removes the legal hold on all objects in the mydata bucket on the myminio MinIO deployment:

mc legalhold clear --recursive myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] legalhold clear \
                 [--recursive]   \
                 [--rewind]      \
                 [--version-id]  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The MinIO alias and path to the object or objects on which to remove the legal hold. For example:

mc legalhold clear play/mybucket/myobjects/objects.txt
--recursive, r

mc-cmd

Optional

Removes the legal hold on all objects in the ALIAS bucket or bucket prefix.

--rewind

mc-cmd

Optional

Directs mc legalhold clear to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--version-id, vid

mc-cmd

Optional

Directs mc legalhold clear to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Global Flags

This command supports any of the global flags.

Examples

Use mc legalhold clear to retrieve the legal hold status of an object. Include --recursive to return the legal hold status of the contents of a bucket:

mc legalhold clear [--recursive] ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket or object on the S3-compatible host. If specifying the path to a bucket or bucket prefix, include the --recursive option.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.13 - mc license info

Description

The mc license info command displays information about the MinIO deployment’s license status. Specifically, whether the deployment uses the AGPLv3 Open Source license of the MinIO Commercial License.

You must register your deployment with MinIO MinIO SUBNET to activate your commercial license.

For example, the command returns the following information for an unregistered deployment:

You are using GNU AFFERO GENERAL PUBLIC LICENSE Version 3 (https://www.gnu.org/licenses/agpl-3.0.txt)

If you are building proprietary applications, you may want to choose the commercial license
included as part of the Standard and Enterprise subscription plans. (https://min.io/signup?ref=mc)

Applications must otherwise comply with all the GNU AGPLv3 License & Trademark obligations.

Use mc license register to associate your deployment with your SUBNET account. If you are not already signed up for SUBNET, see the Registration page.

Examples

Display the Current License for a Deployment with Alias minio1

mc license info minio1

If a deployment uses an expired MinIO Commercial License, the command outputs an error message.

Syntax

The command has the following syntax:

mc [GLOBALFLAGS] license info       \
                         ALIAS      \
                         [--airgap]

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

--airgap

mc-cmd

Optional

Use in environments where the client machine running the minio client does not have network access to SUBNET (for example, airgapped, firewalled, or similar configuration) to display instructions for how to register the deployment with SUBNET.

If the deployment is airgapped, but the local device has network access, you do not need to use the --airgap flag.

Global Flags

This command supports any of the global flags.

4.14 - mc replicate add

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc replicate add replaces the mc admin bucket remote add command.

MinIO automatically creates remote targets based on a given file path or resource location (such as an IP or DNS address). Users defining a remote target no longer need to determine an ARN for the remote bucket.

Syntax

The mc replicate add command creates a new server-side replication rule for a bucket on a MinIO deployment.

The remote bucket must be on a MinIO deployment running the same version of MinIO as the local deployment.

Note

Note

Where mc mirror only synchronizes the current version of an object, mc replicate synchronizes all versions, version information, and metadata for the objects.

The MinIO deployment automatically begins synchronizing new objects to the remote MinIO deployment after creating the rule. You can optionally configure synchronization of existing objects, delete operations, and fully-deleted objects.

The following command adds a new replication rule for the mydata bucket on the myminio MinIO deployment:

mc replicate add                                                     \
   --remote-bucket https://user:[email protected]:9001/bucket  \
   --replicate "delete,delete-marker,existing-objects"               \
   myminio/mydata

The replication rule synchronizes versioned delete operations, delete markers, and existing objects to the remote MinIO deployment.

Note

Changed: mc

RELEASE.2024-03-03T00-13-08Z

You can use a configured ALIAS to the --remote-bucket flag.

The command has the following syntax:

mc [GLOBALFLAGS] replicate add                     \
                 --remote-bucket string          \
                 [--bandwidth "string"]            \
                 [--disable]                       \
                 [--disable-proxy]                 \
                 [--healthcheck-seconds integer]   \
                 [--id "string"]                   \
                 [--limit-upload "string"]         \
                 [--limit-download "string"]       \
                 [--path "string"]                 \
                 [--region "string"]               \
                 [--replicate "string"]            \
                 [--storage-class "string"]        \
                 [--sync]                          \
                 [--tags "string"]                 \
                 [--priority int]                  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment and full path to the bucket or bucket prefix on which to create the replication rule. For example:

mc replicate add --remote-bucket https://user:[email protected]:9001/bucket play/mybucket
--remote-bucket

mc-cmd

Required

Note

Changed: mc

RELEASE.2024-03-03T00-13-08Z

The --remote-bucket supports specifying an existing alias.

Specify the credentials, destination deployment, and bucket of the remote location. Value may be an IP address, URL, or alias/bucket.

For example, a URL based target might look like the following:

https://user:[email protected]:9001/bucket

An alias based target might look like the following:

--remote-bucket minio-target/my-bucket
--bandwidth

mc-cmd

Optional

Limit bandwidth rates to no more than the specified rate in KiB/s, MiB/s, or GiB/s. Valid units include:

  • B for bytes
  • K for kilobytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit bandwidth rates to no more than 1 GiB/s, use the following:

--limit-upload 1Gi

If not specified, MinIO does not limit the bandwidth rate.

--disable

mc-cmd

Optional

Creates the replication rule in the “disabled” state. MinIO does not begin replicating objects using the rule until it is enabled using mc replicate update.

Objects created while replication is disabled are not immediately eligible for replication after enabling the rule. You must explicitly enable replication of existing objects by including "existing-objects" to the list of replication features specified to mc replicate update --replicate. See Replication of Existing Objects for more information.

--disable-proxy

mc-cmd

Optional

When defining active-active replication between buckets, do not proxy.

By default, MinIO proxies.

--healthcheck-seconds

mc-cmd

Optional

The length of time in seconds between checks on the health of the remote bucket.

If not specified, MinIO uses an interval of 60 seconds.

--id

mc-cmd

Optional

Specify a unique ID for the replication rule. MinIO automatically generates an ID if one is not specified.

--limit-download

mc-cmd

Optional

Limit download rates to no more than a specified rate in KiB/s, MiB/s, or GiB/s. Valid units include:

  • B for bytes
  • K for kilobytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit download rates to no more than 1 GiB/s, use the following:

--limit-download 1G

If not specified, MinIO uses an unlimited download rate.

--limit-upload

mc-cmd

Optional

Limit upload rates to no more than the specified rate in KiB/s, MiB/s, or GiB/s. Valid units include:

  • B for bytes
  • K for kilobytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit upload rates to no more than 1 GiB/s, use the following:

--limit-upload 1G

If not specified, MinIO uses an unlimited upload rate.

--path

mc-cmd

Optional

Enable path-style lookup support for the remote bucket.

Valid values include:

  • on - use a path lookup to find the remote bucket
  • off - use a resource locator style (such as a domain or IP address) lookup to find the remote bucket
  • auto - ask MinIO to identify the correct type of lookup to use to find the remote bucket

When not defined, MinIO uses the auto value.

--priority

mc-cmd

Optional

Specify the integer priority of the replication rule. The value must be unique among all other rules on the source bucket. Higher values imply a higher priority than all other rules.

The default value is 0.

--region

mc-cmd

Optional

The region of the destination bucket to replicate contents to.

--replicate

mc-cmd

Optional

Specify a comma-separated list of the following values to enable extended replication features.

  • delete - Directs MinIO to replicate DELETE operations to the destination bucket.

  • delete-marker - Directs MinIO to replicate delete markers to the destination bucket.

  • existing-objects - Directs MinIO to replicate objects created before replication was enabled or while replication was suspended.

  • metadata-sync - Directs MinIO to replicate metadata for each object. For active-active replication situations only.

    Omitting this value directs MinIO to stop replicating metadata-only changes back to the source.

If not specified, MinIO syncs all options.

--storage-class

mc-cmd

Optional

Specify the MinIO storage class to apply to replicated objects.

--sync

mc-cmd

Optional

Enable synchronous replication for this remote target.

By default, MinIO uses asynchronous replication.

--tags

mc-cmd

Optional

Specify one or more ampersand & separated key-value pair tags which MinIO uses for filtering objects to replicate. For example:

mc replicate add --tags "TAG1=VALUE&TAG2=VALUE&TAG3=VALUE" ALIAS

MinIO applies the replication rule to any object whose tag set contains the specified replication tags.

Global Flags

This command supports any of the global flags.

Examples

Configure Bucket Replication

The following mc replicate add command creates a replication configuration that synchronizes all new objects, existing objects, delete operations, and delete markers to the remote target:

mc replicate add myminio/mybucket \
   --remote-bucket https://user:[email protected]/remotebucket \
   --replicate "delete,delete-marker,existing-objects"
  • Replace myminio/mybucket with the ALIAS and full bucket path for which to create the replication configuration.
  • Replace the --remote-bucket value with the URL or path of the remote target. If using a file path format location, use the --path on option.
  • The --replicate flag directs MinIO to replicate all delete operations, delete markers, and existing objects to the remote. See Replication of Delete Operations and Replication of Existing Objects for more information on replication behavior.

Configure Bucket Replication for Historical Data Record

The following mc replicate add command creates a new bucket replication configuration that synchronizes all new and existing objects to the remote target:

mc replicate add myminio/mybucket \
   --remote-bucket https://user:[email protected]/remotebucket \
   --replicate "existing-objects"
  • Replace myminio/mybucket with the ALIAS and full bucket path for which to create the replication configuration.
  • Replace the --remote-bucket value with the location of the remote target. If using a file path format location, use the --path on option.
  • The --replicate flag directs MinIO to replicate all existing objects to the remote. See Replication of Existing Objects for more information on replication behavior.

The resulting remote copy represents a historical record of objects on the remote, where delete operations on the source have no effect on the remote copy.

Behavior

Server-Side Replication Requires MinIO Source and Destination

MinIO server-side replication only works between MinIO deployments. Both the source and destination deployments must run MinIO.

To configure replication between arbitrary S3-compatible services, use mc mirror.

Enable Versioning on Source and Destination Buckets

MinIO relies on the immutability protections provided by versioning to synchronize objects between the source and replication target.

Use the mc version enable command to enable versioning on both the source and destination bucket before starting this procedure:

mc version enable ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the bucket on which to enable versioning.

Required Permissions

MinIO strongly recommends creating users specifically for supporting bucket replication operations. See mc admin user and mc admin policy for more complete documentation on adding users and policies to a MinIO deployment.

The following policy provides permissions for configuring and enabling replication on a deployment.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "admin:SetBucketTarget",
                "admin:GetBucketTarget",
                "admin:ListBatchJobs",
                "admin:DescribeBatchJob",
                "admin:StartBatchJob",
                "admin:CancelBatchJob"
            ],
            "Effect": "Allow",
            "Sid": "EnableRemoteBucketConfiguration"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetReplicationConfiguration",
                "s3:ListBucket",
                "s3:ListBucketMultipartUploads",
                "s3:GetBucketLocation",
                "s3:GetBucketVersioning",
                "s3:GetObjectRetention",
                "s3:GetObjectLegalHold",
                "s3:PutReplicationConfiguration"
            ],
            "Resource": [
                "arn:aws:s3:::*"
            ],
            "Sid": "EnableReplicationRuleConfiguration"
        }
    ]
}
  • The "EnableRemoteBucketConfiguration" statement grants permission for creating a remote target for supporting replication.
  • The "EnableReplicationRuleConfiguration" statement grants permission for creating replication rules on a bucket. The "arn:aws:s3:::* resource applies the replication permissions to any bucket on the source deployment. You can restrict the user policy to specific buckets as-needed.

Use the mc admin policy create to add this policy to each deployment acting as a replication source. Use mc admin user add to create a user on the deployment and mc admin policy attach to associate the policy to that new user.

The following policy provides permissions for enabling synchronization of replicated data into the deployment.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetReplicationConfiguration",
                "s3:ListBucket",
                "s3:ListBucketMultipartUploads",
                "s3:GetBucketLocation",
                "s3:GetBucketVersioning",
                "s3:GetBucketObjectLockConfiguration",
                "s3:GetEncryptionConfiguration"
            ],
            "Resource": [
                "arn:aws:s3:::*"
            ],
            "Sid": "EnableReplicationOnBucket"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetReplicationConfiguration",
                "s3:ReplicateTags",
                "s3:AbortMultipartUpload",
                "s3:GetObject",
                "s3:GetObjectVersion",
                "s3:GetObjectVersionTagging",
                "s3:PutObject",
                "s3:PutObjectRetention",
                "s3:PutBucketObjectLockConfiguration",
                "s3:PutObjectLegalHold",
                "s3:DeleteObject",
                "s3:ReplicateObject",
                "s3:ReplicateDelete"
            ],
            "Resource": [
                "arn:aws:s3:::*"
            ],
            "Sid": "EnableReplicatingDataIntoBucket"
        }
    ]
}
  • The "EnableReplicationOnBucket" statement grants permission for a remote target to retrieve bucket-level configuration for supporting replication operations on all buckets in the MinIO deployment. To restrict the policy to specific buckets, specify those buckets as an element in the Resource array similar to "arn:aws:s3:::bucketName".
  • The "EnableReplicatingDataIntoBucket" statement grants permission for a remote target to synchronize data into any bucket in the MinIO deployment. To restrict the policy to specific buckets, specify those buckets as an element in the Resource array similar to "arn:aws:s3:::bucketName/*".

Use the mc admin policy create to add this policy to each deployment acting as a replication target. Use mc admin user add to create a user on the deployment and mc admin policy attach to associate the policy to that new user.

Replication of Existing Objects

Starting with mc RELEASE.2021-06-13T17-48-22Z and minio RELEASE.2021-06-07T21-40-51Z, MinIO supports automatically replicating existing objects in a bucket. MinIO existing object replication implements functionality similar to AWS Replicating existing objects between S3 buckets without the overhead of contacting technical support.

  • To enable replication of existing objects when creating a new replication rule, include "existing-objects" to the list of replication features specified to mc replicate add --replicate.
  • To enable replication of existing objects for an existing replication rule, add "existing-objects" to the list of existing replication features using mc replicate add --replicate. You must specify all desired replication features when editing the replication rule.

See Replication of Existing Objects for more complete documentation on this behavior.

Synchronization of Metadata Changes

MinIO supports two-way active-active replication configurations, where MinIO synchronizes new and modified objects between a bucket on two MinIO deployments. Starting with mc RELEASE.2021-05-18T03-39-44Z, MinIO by default synchronizes metadata-only changes to a replicated object back to the “source” deployment. Prior to the this update, MinIO did not support synchronizing metadata-only changes to a replicated object.

With metadata synchronization enabled, MinIO resets the object replication status to indicate replication eligibility. Specifically, when an application performs a metadata-only update to an object with the REPLICA status, MinIO marks the object as PENDING and eligible for replication.

To disable metadata synchronization, use the mc replicate update --replicate command and omit replica-metadata-sync from the replication feature list.

Replication of Delete Operations

MinIO supports replicating delete operations onto the target bucket. Specifically, MinIO can replicate both Delete Markers and the deletion of specific versioned objects:

  • For delete operations on an object, MinIO replication also creates the delete marker on the target bucket.
  • For delete operations on versions of an object, MinIO replication also deletes those versions on the target bucket.

MinIO does not replicate objects deleted due to lifecycle management expiration rules. MinIO only replicates explicit client-driven delete operations.

MinIO requires explicitly enabling replication of delete operations using the mc replicate add --replicate flag. This procedure includes the required flags for enabling replication of delete operations and delete markers. See Replication of Delete Operations for more complete documentation on this behavior.

Replication of Encrypted Objects

MinIO supports replicating objects encrypted with automatic Server-Side Encryption (SSE-S3). Both the source and destination buckets must have automatic SSE-S3 enabled for MinIO to replicate an encrypted object.

As part of the replication process, MinIO decrypts the object on the source bucket and transmits the unencrypted object. The destination MinIO deployment then re-encrypts the object using the destination bucket SSE-S3 configuration. MinIO strongly recommends enabling TLS on both source and destination deployments to ensure the safety of objects during transmission.

MinIO does not support replicating client-side encrypted objects (SSE-C).

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.15 - mc retention set

Syntax

The mc retention set command configures the Write-Once Read-Many (WORM) locking settings for an object or object(s) in a bucket. You can also set the default object lock settings for a bucket, where all objects without explicit object lock settings inherit the bucket default.

To lock an object under legal hold, use mc legalhold set.

mc retention set requires that the specified bucket has object locking enabled. You can only enable object locking at bucket creation. See mc mb --with-lock for documentation on creating buckets with object locking enabled.

The following command sets a default 30 day GOVERNANCE object lock on the mydata bucket on the myminio MinIO deployment:

mc retention set --default GOVERNANCE "30d" myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] retention set                         \
                 [--bypass]                            \
                 [--default]                           \
                 [--recursive]                         \
                 [--rewind "string"]                   \
                 [--versions]                          \
                 [--version-id "string"]*              \
                 MODE                                  \
                 "VALIDITY"                            \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

mc retention set --version-id is mutually exclusive with multiple other parameters. See the reference documentation for more information.

Parameters

MODE

mc-cmd

Required

Sets the locking mode for the ALIAS. Specify one of the following supported values:

  • governance
  • compliance

See the AWS S3 documentation on Object Lock Overview for more information on the supported modes.

Requires specifying VALIDITY.

VALIDITY

mc-cmd

Required

The duration which objects remain in the specified MODE after creation.

  • For days, specify a string formatted as Nd. For example,

    30d for 30 days after object creation.

  • For years, specify a string formatted as Ny. For example,

    1y for 1 year after object creation.

ALIAS

mc-cmd

Required

The full path to the object or objects for which to set object lock configuration. Specify the alias for the MinIO or S3-compatible service and the full path to bucket. For example:

mc retention set play/mybucket/object.txt MODE VALIDITY
  • If the ALIAS specifies a bucket or bucket prefix, include --recursive to apply the object lock settings to the bucket contents.
  • mc retention set by default applies to only the latest object version. Use --version-id or --versions to apply the object lock settings to a specific version or to all versions of the object respectively.
--bypass

mc-cmd

Optional

Allows a user with the s3:BypassGovernanceRetention permission to modify the object. Requires the governance retention MODE

--default

mc-cmd

Optional

Sets the default object lock settings for the bucket specified to ALIAS using the MODE and VALIDITY. Any objects created in the bucket inherit the default object lock settings unless explicitly overriden using mc retention set.

If specifying --default, mc retention set ignores all other flags.

--recursive, --r

mc-cmd

Optional

Recursively applies the object lock settings to all objects in the specified ALIAS path.

Mutually exclusive with --version-id.

--rewind

mc-cmd

Optional

Directs mc retention set to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--version-id, --vid

mc-cmd

Optional

Directs mc retention set to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Mutually exclusive with any of the following flags:

--versions

mc-cmd

Optional

Directs mc retention set to operate on all object versions that exist in the bucket.

--versions requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --versions and --rewind together to apply the retention settings to all object versions that existed at a specific point-in-time.

Global Flags

This command supports any of the global flags.

Examples

Set Default Bucket Retention Settings

Use mc retention set with the --recursive and --default to set the default bucket retention settings.

mc retention set  --recursive --default MODE DURATION ALIAS/PATH
  • Replace MODE with the retention mode to enable. MinIO supports the AWS S3 retention modes governance and compliance.
  • Replace DURATION with the duration which the object lock should remain in effect. For example, to set a retention period of 30 days, specify 30d.
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the path to the bucket.

The bucket must have object locking enabled to use this command. You can only enable object locking when creating a bucket. See mc mb --with-lock for more information on creating buckets with object locking enabled.

Set Object Lock Configuration for Versioned Object

Use mc retention set with --version-id to apply the retention settings to a specific object version:

mc retention set --version-id VERSION MODE DURATION ALIAS/PATH
  • Replace VERSION with the version of the object.
  • Replace MODE with the retention mode to enable. MinIO supports the AWS S3 retention modes governance and compliance.
  • Replace DURATION with the duration which the object lock should remain in effect. For example, to set a retention period of 30 days, specify 30d.
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the path to the object.

Use mc retention set with --versions to apply the retention settings to a specific object version:

mc retention set --versions  MODE DURATION ALIAS/PATH
  • Replace MODE with the retention mode to enable. MinIO supports the AWS S3 retention modes governance and compliance.
  • Replace DURATION with the duration which the object lock should remain in effect. For example, to set a retention period of 30 days, specify 30d.
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the path to the object.

The bucket must have object locking enabled to use this command. You can only enable object locking when creating a bucket. See mc mb --with-lock for more information on creating buckets with object locking enabled.

Behavior

Retention of Object Versions

For buckets with versioning enabled, mc retention set by default operates on the latest version of the target object or object(s). mc retention set includes specific options that when explicitly specified direct the command to operate on either a specific object version or all versions of an object:

To direct mc retention set to operate on a specific version of an object, include the --version-id argument:

To direct mc retention set to operate on all versions of an object, include the --versions argument:

Locking an object prevents any modification or deletion of that object, similar to the COMPLIANCE object locking mode. Objects can have simultaneous retention-based locks and legal hold locks.

The legal hold lock overrides any retention locking, such that an object under legal hold remains locked even if the retention period expires. Setting, modifying, or clearing retention settings for an object under legal hold has no effect until the legal hold either expires or is explicitly disabled.

For more information on object legal holds, see mc legalhold.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.16 - mc share download

Syntax

The mc share download command generates a temporary presigned URL with integrated access credentials for downloading objects from a MinIO bucket. The temporary URL expires after a configurable time limit.

  • Applications can perform a GET to retrieve the object from the URL.
  • Users can open the URL in a browser to download the object.

For more information on shareable object URLs, see the Amazon S3 documentation on Pre-Signed URLs.

The following command generates a new presigned download URL for the mydata bucket on the myminio MinIO deployment:

mc share download --recursive myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] share download           \
                 [--expire "string"]      \
                 [--recursive]            \
                 [--version-id "string"]  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of a MinIO deplyment and the full path to the object for which to generate a download URL. For example:

mc share download play/mybucket/object.txt

You can specify multiple objects on the same or different MinIO deployments. For example:

mc share download play/mybucket/object.txt play/mybucket/otherobject.txt

If specifying the path to a bucket or bucket prefix, you must also specify the --recursive argument. For example:

mc share download --recursive play/mybucket/

mc share download --recursive play/mybucket/myprefix/
--expire, E

mc-cmd

Optional

Set the expiration time limit for all generated URLs.

Specify a string with format ##h##m##s format. For example: 12h34m56s for an expiry of 12 hours, 34 minutes, and 56 seconds after URL generation.

Defaults to 168h or 168 hours (7 days).

--recursive, r

mc-cmd

Optional

Recursively generate URLs for all objects in a mc share download ALIAS bucket or bucket prefix.

Required if any ALIAS specifies a path to a bucket or bucket prefix.

--version-id, vid

mc-cmd

Optional

Directs mc share download to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Global Flags

This command supports any of the global flags.

Examples

Generate a URL to Download Object(s)

Use mc share download to generate a URL that supports GET requests for an object:

mc share download --expire DURATION ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the object on the MinIO deployment.
  • Replace DURATION with the duration after which the URL expires. For example, to set a 30 day expiry, specify 30d.

Use mc share download with the --recursive option to generate a URL for each object in a bucket. Each URL supports GET requests for its associated object:

mc share download --recursive --expire DURATION ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or bucket prefix on the MinIO deployment.
  • Replace DURATION with the duration after which the URL expires. For example, to set a 30 day expiry, specify 30d.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.17 - mc support callhome

Description

The mc support callhome command allows the enabling or disabling of diagnostic information from a deployment to MinIO SUBNET.

All mc support commands require an active SUBNET subscription.

When enabled, MinIO sends diagnostic information to SUBNET.

MinIO disables this functionality by default, regardless of registration status. You must explicitly enable the callhome function to begin information upload.

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Syntax

mc support callhome enable

mc-cmd

Begin sending a deployment’s diagnostics, logs, or both to SUBNET.

mc support callhome enable    \
                    ALIAS     \
                    [--logs]  \
                    [--diag]
Note

Note

The --logs and --diag flags are no longer supported in SUBNET and will be removed in a future release.

mc support callhome disable

mc-cmd

Stop sending a deployment’s diagnostics, logs, or both to SUBNET.

mc support callhome disable  \
                    ALIAS    \
                    [--logs] \
                    [--diag]
Note

Note

The --logs and --diag flags are no longer supported in SUBNET and will be removed in a future release.

mc support callhome status

mc-cmd

Output whether a deployment currently sends diagnostics, logs, or both to SUBNET.

mc support callhome status   \
                    ALIAS    \
                    [--diag]
Note

Note

The --diag flag is no longer supported in SUBNET and will be removed in a future release.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

--diag

mc-cmd

Optional

Note

Note

This option is no longer supported in SUBNET and will be removed in a future release.

Send or stop sending deployment diagnostic information to SUBNET every 24 hours.

Examples

Enable callhome reporting

Enable sending diagnostic information to SUBNET for a deployment registered to SUBNET with an alias of minio1.

mc support callhome enable minio1

Disable callhome reporting

Disable sending diagnostic information to SUBNET for a deployment registered to SUBNET with an alias of minio1.

mc support callhome disable minio1

Display Current callhome settings

Display whether a deployment with the alias minio1 sends information to SUBNET.

mc support callhome status minio1

Global Flags

This command supports any of the global flags.

4.18 - mc support top api

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Syntax

The mc support top api command summarizes the real-time API events on a MinIO deployment server.

The following command displays the current in-progress S3 API calls on the alias myminio.

mc support top api myminio/

The command has the following syntax:

mc [GLOBALFLAGS] support top api    \
                 TARGET             \
                 [--name "string"]  \
                 [--path "string"]  \
                 [--node "string"]  \
                 [--errors, -e]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The full path to the alias, prefix, or object where the command should run. The path must include at least an ALIAS.

--name

mc-cmd

Optional

Outputs a summary of current API calls matching the entered string.

--path

mc-cmd

Optional

Outputs a summary of current API calls for a specified path.

--node

mc-cmd

Optional

Outputs a summary of the current API calls on matching servers.

--errors, -e

mc-cmd

Optional

Outputs a summary of current API calls returning errors.

Global Flags

This command supports any of the global flags.

Examples

Display All Current In-progress S3 API Calls

The following command displays all in-progress S3 calls for the myminio deployment:

mc support top api myminio/

Display Current, In-progress s3.PutObject Calls

The following command displays all in-progress s3.PutObject calls for the myminio deployment:

mc support top api --name s3.PutObject myminio/

4.19 - mc tag set

Syntax

The mc tag set command sets one or more tags to a bucket or object.

MinIO supports adding up to 10 custom tags to an object.

The following command sets tags for the mydata bucket on the myminio MinIO deployment:

mc tag set myminio/mydata "tag1=value1&tag2=value2"

The command has the following syntax:

mc [GLOBALFLAGS] tag set                   \
                 [--rewind "string"]       \
                 [--versions]              \
                 [--version-id "string"]*  \
                 ALIAS                     \
                 "TAGS"
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

mc tag set --version-id is mutually exclusive with multiple parameters. See the reference documentation for more information.

Parameters

ALIAS

mc-cmd

Required

The alias for a MinIO deployment and the full path to the object on which to apply the tag (e.g. bucket and path to object). For example:

mc tag set myminio/mybucket/object.txt
TAGS

mc-cmd

Required

An ampersand-seperated (&) list of key-value pairs (KEY=VALUE), where each pair represents one tag to assign to the object. For example:

mc tag set myminio/mybucket/object.txt "key1=value1&key2=value2"
--exclude-folders

mc-cmd

Optional

Note

Added: RELEASE.2024-01-11T05-49-32Z

When used with --recursive, causes mc tag set to not traverse child prefixes. Tags are only applied to objects at the specified path. Requires --recursive.

The following example applies the tag destination=international to objects at vacation-photos/cancun/ but not vacation-photos/cancun/ocean/ or other prefixes.

For example, the above would add the tags to the object at vacation-photos/cancun/pretty-beach.jpg but not to the object at vacation-photos/cancun/ocean/tropical-fish.jpg.

mc tag set myminio/vacation-photos/cancun "destination=international" --exclude-folders --recursive
--recursive, r

mc-cmd

Optional

Note

Added: RELEASE.2023-05-04T18-10-16Z

Recursively applies the tag to all objects at the path specified to ALIAS.

--rewind

mc-cmd

Optional

Directs mc tag set to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--versions

mc-cmd

Optional

Directs mc tag set to operate on all object versions that exist in the bucket.

--versions requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --versions and --rewind together to apply the tag all object versions which existed at a specific point in time.

--version-id, --vid

mc-cmd

Optional

Directs mc tag set to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Mutually exclusive with the following parameters:

Global Flags

This command supports any of the global flags.

Examples

Apply Tags to a Bucket or Object

Use mc tag set to apply tags to a bucket or object:

mc tag set ALIAS/PATH "TAGS"
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or object on the MinIO deployment.
  • Replace TAGS with one or more ampersand-separated (&) key-value pairs for each tag and its corresponding value.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.20 - mc version enable

Syntax

The mc version enable command enables versioning on the specified bucket.

The following command enables versioning for the mybucket bucket on the myminio MinIO deployment:

 mc version enable myminio/mybucket

The command has the following syntax:

mc [GLOBALFLAGS] version enable ALIAS                \
                                --exclude-folders    \
                                --excluded-prefixes
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of a MinIO deployment and the full path to the bucket for which to enable versioning. For example:

mc version enable myminio/mybucket
--exclude-folders

mc-cmd

Optional

Disable versioning on all folders (objects whose name ends with /) in the specified bucket.

--excluded-prefixes

mc-cmd

Optional

Disable versioning on objects matching a list of prefixes, up to 10. The list of prefixes match all objects containing the specified strings in their prefix or name, similar to a regular expression of the form prefix*. To match objects by prefix only, use prefix/*.

For example, the following command excludes any objects containing _test or _temp in their prefix or name from versioning:

mc version enable --excluded-prefixes "_test, _temp" myminio/mybucket

Global Flags

This command supports any of the global flags.

Example

Enable Bucket Versioning

Use mc version enable to enable versioning for a bucket:

mc version enable ALIAS/PATH
  • Replace ALIAS with the alias of a configured MinIO deployment.
  • Replace PATH with the bucket on which to enable versioning.

Behavior

Bucket Versioning with Existing Data

Enabling bucket versioning on a bucket with existing data immediately creates a NULL value version ID for each unversioned object.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.21 - Silo Client Settings

This page covers settings for the MinIO Client.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Settings

Host Credentials

Use this setting to add a temporary alias to use for mc commands. For example, for use with scripting.

The temporary alias uses the AWS s3v4 signature.

MC_HOST_<ALIAS>

envvar

Replace <ALIAS> at the end of the environment variable with the alias to set the host for.

This setting does not have a configuration setting option.

Use mc alias set to configure an alias.

Examples

Static Credentials

Syntax
export MC_HOST_<alias>=https://<Access Key>:<Secret Key>@<YOUR-S3-ENDPOINT>
Example
export MC_HOST_myalias=https://Q3AM3UQ867SPQQA43P2F:[email protected]

Security Token Service (STS) Credentials

Syntax
export MC_HOST_<alias>=https://<Access Key>:<Secret Key>:<Session Token>@<YOUR-S3-ENDPOINT>
Example
export MC_HOST_myalias=https://Q3AM3UQ867SPQQA43P2F:zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG:eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NLZXkiOiJOVUlCT1JaWVRWMkhHMkJNUlNYUiIsImF1ZCI6IlBvRWdYUDZ1Vk80NUlzRU5SbmdEWGo1QXU1WWEiLCJhenAiOiJQb0VnWFA2dVZPNDVJc0VOUm5nRFhqNUF1NVlhIiwiZXhwIjoxNTM0ODk2NjI5LCJpYXQiOjE1MzQ4OTMwMjksImlzcyI6Imh0dHBzOi8vbG9jYWxob3N0Ojk0NDMvb2F1dGgyL3Rva2VuIiwianRpIjoiNjY2OTZjZTctN2U1Ny00ZjU5LWI0MWQtM2E1YTMzZGZiNjA4In0.eJONnVaSVHypiXKEARSMnSKgr-2mlC2Sr4fEGJitLcJF_at3LeNdTHv0_oHsv6ZZA3zueVGgFlVXMlREgr9LXA@play.min.io

STS Service

Note

Added: mc

RELEASE.2023-11-06T04-19-23Z

Use this setting to add an STS endpoint to use for mc commands.

Note

Changed: mc

RELEASE.2023-12-02T02-03-28Z

Supports adding multiple environment variables by alias.

MC_STS_ENDPOINT_<alias>

envvar

export MC_STS_ENDPOINT_myalias=https://sts.minio-operator.svc.cluster.local:4223/sts/ns-1

This setting does not have a configuration setting option.

Web Token Identity

Note

Added: mc

RELEASE.2023-11-06T04-19-23Z

Use this setting to add a web token identity to use for mc commands.

Note

Changed: mc

RELEASE.2023-12-02T02-03-28Z

Supports adding multiple environment variables by alias.

MC_WEB_IDENTITY_TOKEN_<alias>

envvar

export MC_WEB_IDENTITY_TOKEN_FILE_myalias=/var/run/secrets/kubernetes.io/serviceaccount/token

This setting does not have a configuration setting option.

Configuration Directory

Specify the path to the configuration folder the MinIO Client should use.

MC_CONFIG_DIR

envvar

This setting does not have a configuration setting option.

Progress Bar

Disable the MinIO Client progress bar.

MC_QUIET

envvar

This setting does not have a configuration setting option.

Pager

Note

Added: mc

RELEASE.2024-04-29T09-56-05Z

Disable the pager functionality of the MinIO Client in the CLI. When used, output prints to raw STDOUT instead.

MC_DISABLE_PAGER

envvar

This setting does not have a configuration setting option.

Color Theme

Disable the color theme used for MinIO Client output.

MC_NO_COLOR

envvar

This setting does not have a configuration setting option.

JSON

Enable formatting the output as JSON lines.

MC_JSON

envvar

This setting does not have a configuration setting option.

Debug

Enable the debug output.

MC_DEBUG

envvar

This setting does not have a configuration setting option.

Disable SSL

Disable SSL certificate verification.

MC_INSECURE

envvar

This setting does not have a configuration setting option.

Limit Download Bandwidth

Limit the download bandwidth the MinIO Client uses for certain commands.

MC_LIMIT_DOWNLOAD

envvar

This setting does not have a configuration setting option.

If not specified, the MinIO Client uses all available bandwidth.

Limit client-side download rates to no more than the specified rate in KiB/s, MiB/s, or GiB/s. This affects only the download from the local device running the MinIO Client. Valid units include:

  • B for bytes
  • K for kilobytes
  • M for megabytes
  • G for gigabytes
  • Ki for kibibytes
  • Mi for mibibytes
  • Gi for gibibytes

For example, to limit download rates to no more than 1 GiB/s, use the following on a Linux system:

export MC_LIMIT_DOWNLOAD=1G

Refer to your operating system instructions for equivalent commands on non-Linux systems.

Limit Upload Bandwidth

Limit the upload bandwidth the MinIO Client uses for certain commands.

MC_LIMIT_UPLOAD

envvar

This setting does not have a configuration setting option.

If not specified, the MinIO Client uses all available bandwidth.

Limit client-side upload rates to no more than the specified rate in KiB/s, MiB/s, or GiB/s. This affects only the upload from the local device running the MinIO Client. Valid units include:

  • B for bytes
  • K for kilobytes
  • M for megabytes
  • G for gigabytes
  • Ki for kibibytes
  • Mi for mibibytes
  • Gi for gibibytes

For example, to limit upload rates to no more than 1 GiB/s, use the following on a Linux system:

export MC_LIMIT_UPLOAD=1G

Refer to your operating system instructions for equivalent commands on non-Linux systems.

SSE-KMS Encryption

Encrypt and decrypt options using SSE-KMS with server managed keys.

MC_ENC_KMS

envvar

Specify the key with the MC_ENC_KMS environment variable.

This setting does not have a configuration setting option.

SSE-S3 Encryption

Encrypt and decrypt options using SSE-KMS with server managed keys.

MC_ENC_S3

envvar

Specify the key to use for performing SSE-S3 encryption. The specified value must match the encryption key set in MINIO_KMS_KES_KEY_NAME.

This setting does not have a configuration setting option.

4.22 - mc alias

Description

The mc alias commands provide a convenient interface for managing the list of S3-compatible hosts that mc can connect to and run operations against.

Warning

Important

mc commands that operate on S3-compatible services require specifying an alias for that service.

Subcommands

mc alias includes the following subcommands:

Subcommand

Description

list

The mc alias list command lists all aliases in the local mc configuration.

remove

The mc alias remove removes an existing alias from the local mc configuration.

set

The mc alias set command adds or updates an alias to the local mc configuration.

import

The mc alias import command imports an alias configuration from a JSON document.

export

The mc alias export command exports an alias configuration from the existing configuration.

4.23 - mc alias remove

Syntax

The mc alias remove removes an existing alias from the local mc configuration.

The following command removes the myminio alias for a MinIO deployment from the host machine:

mc alias remove myminio

The mc alias remove command has the following syntax:

mc [GLOBALFLAGS] alias remove ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The alias to remove from the local mc configuration.

Global Flags

This command supports any of the global flags.

Examples

Remove an Alias from the mc Configuration

Use mc alias remove to remove an existing alias from the mc configuration:

The following command removes the myminio alias.

mc alias remove myminio
mc alias remove ALIAS

Replace ALIAS with the name of the alias to remove.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.24 - mc anonymous get

Syntax

The mc anonymous get command gets the anonymous (i.e. unauthenticated or public) access policies for a bucket.

Buckets with anonymous policies allow clients to access the bucket contents and perform actions consistent with the specified policy without authentication.

To get the JSON policy assigned to the bucket, use the mc anonymous get-json command.

The following command retrieves the anonymous access policy for the mydata bucket on the myminio MinIO deployment:

mc anonymous get myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] policy get ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The full path to the bucket or bucket prefix for which the command retrieves the anonymous bucket policy.

Specify the alias of the MinIO or other S3-compatible service and the full path to the bucket or bucket prefix. For example:

mc anonymous get public play/mybucket

Global Flags

This command supports any of the global flags.

Examples

Get Anonymous Policy for Bucket

Use mc anonymous get to get the anonymous policy for a bucket:

mc anonymous get ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the destination bucket.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.25 - mc batch describe

Note

Changed: MinIO

RELEASE.2022-10-09T21-10-59Z or later

Syntax

The mc batch describe command outputs the job definition for a specified job ID.

You must specify the job ID. To find the job ID, use mc batch list.

The following command outputs the job definition for the job identified as KwSysDpxcBU9FNhGkn2dCf.

mc batch describe myminio KwSysDpxcBU9FNhGkn2dCf

The command has the following syntax:

mc [GLOBALFLAGS] batch describe TARGET           \
                                JOBID
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The alias for the MinIO deployment to look for the Job ID.

JOBID

mc-cmd

Required

The unique identifier of a job to describe. To find the ID of a job, use mc batch list.

Global Flags

This command supports any of the global flags.

Example

Show the Definition of an In Progress Batch Job

The following command provides the full job definition of a specific job at alias myminio:

mc batch describe myminio KwSysDpxcBU9FNhGkn2dCf
  • Replace myminio with the alias of the MinIO deployment that should run the job.
  • Replace KwSysDpxcBU9FNhGkn2dCf with the ID of the job to define.

The output of the above command is similar to the following:

mc batch describe myminio KwSysDpxcBU9FNhGkn2dCf
replicate:
  apiVersion: v1
...

Note, this example is truncated. The output is the full job definition for the specified job.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Permissions

You must have the admin:DescribeBatchJobs permission to describe jobs on the deployment.

4.26 - mc encrypt info

Syntax

The mc encrypt info command returns the current default encryption settings for a bucket.

The following command returns the default encryption setting for the mydata bucket on the myminio MinIO deployment.

mc encrypt info myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] encrypt info ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

The full path to the bucket on which to retrieve the default SSE mode. Specify the alias of the MinIO deployment as the prefix to the ALIAS path. For example:

mc encrypt info play/mybucket

Global Flags

This command supports any of the global flags.

Examples

Retrieve the Automatic Server-Side Encryption Settings for a Bucket

 mc encrypt info myminio/data
mc encrypt info ALIAS
  • Replace ALIAS with the alias of the MinIO deployment on which to configure automatic server-side bucket encryption.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.27 - mc event ls

Syntax

The mc event ls command lists all event notification triggers for a bucket.

The alias mc event list has equivalent functionality to mc event ls.

The following command lists all configured event notifications for the specified bucket notification target for the mydata bucket on the myminio MinIO deployment:

mc event ls myminio myminio/mydata arn:aws:sqs::primary:target

The command has the following syntax:

mc [GLOBALFLAGS]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

mc [GLOBALFLAGS] event ls [FLAGS] ALIAS ARN

Parameters

ALIAS

mc-cmd

Required

The S3 service alias and bucket to which the command lists event notification. For example:

mc event ls play/mybucket ARN...
ARN

mc-cmd

Required

The Amazon Resource Name (ARN) of the bucket resource.

The MinIO server outputs an ARN at startup for each configured notification target. See Bucket Notifications for more information.

Global Flags

This command supports any of the global flags.

Examples

List Event Notifications on a Bucket

The following command lists all event notification triggers on a bucket.

mc event ls myminio/mydata
mc event ls ALIAS ARN
  • Replace ALIAS with the alias of the MinIO deployment on which to add the bucket notification event. For example:

    myminio/mydata

  • Replace ARN with the notification target ARN.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.28 - mc idp ldap accesskey edit

Description

mc idp ldap accesskey edit modifies the specified access key on the local server.

The following example modifies the secret for the access key mykey on the minio deployment:

mc idp ldap accesskey edit myminio/ mykey --secret-key 'xxxxxxx'

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap accesskey rm                        \
                                 ALIAS                        \
                                 KEY                          \
                                 [--secret-key <string>]      \
                                 [--policy <string>]          \
                                 [--name <string>]            \
                                 [--description <string>]     \
                                 [--expiry-duration <string>] \
                                 [--expiry <string>]
  • Replace ALIAS with the alias of a MinIO deployment configured for AD/LDAP integration.

  • Replace KEY with the access key to delete.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment configured for AD/LDAP.

For example:

mc idp ldap accesskey ls minio
KEY

mc-cmd

Required

The configured access key to delete.

--description

mc-cmd

Optional

Add a description for the service account. For example, you might specify the reason the access key exists.

--expiry

mc-cmd

Optional

The date after which the access key expires. Enter the date in YYYY-MM-DD format.

For example, to expire the credentials after December 31, 2024, enter 2024-12-31.

Mutually exclusive with --expiry-duration.

--expiry-duration

mc-cmd

Optional

Length of time the access key pair should remain valid for use in #d#h#s format.

For example, 7d, 24h, 5d12h30s are valid strings.

Mutually exclusive with --expiry.

--name

mc-cmd

Optional

A human-readable name to use for the account.

--policy

mc-cmd

Optional

File path to the JSON-formatted policy to use for the account.

If not specified, the account uses the same policy as the authenticated user.

--secret-key

mc-cmd

Optional

A secret to use for the account.

Example

Modify a secret for an access key

Modify the secret for the access key mykey on the minio deployment.

mc idp ldap accesskey edit myminio/ mykey --secret-key 'xxxxxxx'

Modify the expiration duration for an accesskey

Modify the expiration duration for the access key mykey on the minio deployment.

mc idp ldap accesskey edit myminio/ mykey ---expiry-duration 24h

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.29 - mc idp ldap disable

Description

The mc idp ldap disable command disables the currently configured AD/LDAP provider.

The following example disables the AD/LDAP configurations on the myminio deployment.

mc idp ldap disable  \
            myminio

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap disable  \
                          ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to disable the AD/LDAP integration.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment for which to disable the AD/LDAP integration.

For example:

mc idp ldap disable myminio

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.30 - mc idp ldap policy detach

Description

The mc idp ldap policy detach command detaches one or more polices from an entity.

The following example detaches the policy userpolicy from the user bobfisher on the myminio deployment.

mc idp ldap policy detach myminio                                                  \
                          userpolicy                                               \
                          --user='uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io'

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap policy detach             \
                                 POLICYNAME         \
                                 [POLICY2] ...      \
                                 ALIAS              \
                                 [--user=`USER`]    \
                                 [--group=`GROUP`]
  • Replace ALIAS with the alias of a MinIO deployment to configure for AD/LDAP integration.

  • Replace POLICYNAME with the policy to detach from the entity. You may list multiple policies to detach from the entity.

  • Use must use one of either the --user or --group flag. You may only use the flag once in the command. You cannot use both flags in the same command.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment with the entity from which to detach a policy.

For example:

mc idp ldap policy detach myminio                                                  \
                          userpolicy                                               \
                          --user='uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io'

Example

The following example detaches two policies, policy1 and policy2, from the projectb group on the myminio deployment:

mc idp ldap policy detach myminio                                                 \
                          policy1                                                 \
                          policy2                                                 \
                          --group='cn=projectb,ou=groups,ou=swengg,dc=min,dc=io'

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.31 - mc ilm rule

Note

Changed: RELEASE.2022-12-24T15-21-38Z

The following commands have moved to subcommands under mc ilm rule:

Description

The mc ilm rule command and its subcommands configure the rules used to transition objects between storage tiers in MinIO’s Lifecycle Management.

Before creating rules with this command, use mc ilm tier and its subcommands to create the tier or tiers of other object storage locations where objects move.

For more information, see the overview of lifecycle management.

Subcommands

mc ilm rule includes the following subcommands:

Subcommand

Description

add

The mc ilm rule add command adds an object lifecycle management rule to a bucket.

edit

The mc ilm rule edit command modifies an existing object lifecycle management rule on a MinIO bucket.

export

The mc ilm rule export command exports the object lifecycle management configuration for a MinIO bucket.

import

The mc ilm rule import command imports an object lifecycle management configuration and applies it to a MinIO bucket.

ls

The mc ilm rule ls command summarizes all configured object lifecycle management rules on a MinIO bucket in a tabular format.

rm

The mc ilm rule rm command removes an object lifecycle management rule from a MinIO Bucket.

Permissions

MinIO requires the following permissions scoped to the bucket or buckets for which you create lifecycle management rules.

For example, the following policy provides permission for configuring object transition lifecycle management rules on any bucket in the cluster:.

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "admin:SetTier",
               "admin:ListTier"
            ],
            "Effect": "Allow",
            "Sid": "EnableRemoteTierManagement"
      },
      {
            "Action": [
               "s3:PutLifecycleConfiguration",
               "s3:GetLifecycleConfiguration"
            ],
            "Resource": [
                        "arn:aws:s3:::*"
            ],
            "Effect": "Allow",
            "Sid": "EnableLifecycleManagementRules"
      }
   ]
}

Transition Permissions

Object transition lifecycle management rules require additional permissions on the remote storage tier. Specifically, MinIO requires the remote tier credentials provide read, write, list, and delete permissions.

For example, if the remote storage tier implements AWS IAM policy-based access control, the following policy provides the necessary permission for transitioning objects into and out of the remote tier:

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "s3:ListBucket"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:s3:::MyDestinationBucket"
            ],
            "Sid": ""
      },
      {
            "Action": [
               "s3:GetObject",
               "s3:PutObject",
               "s3:DeleteObject"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:s3:::MyDestinationBucket/*"
            ],
            "Sid": ""
      }
   ]
}

Modify the Resource for the bucket into which MinIO tiers objects.

Defer to the documentation for the supported tiering targets for more complete information on configuring users and permissions to support MinIO tiering:

4.32 - mc ilm rule edit

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm rule edit replaces mc ilm edit.

Syntax

The mc ilm rule edit command modifies an existing object lifecycle management rule on a MinIO bucket.

The following command modifies existing lifecycle management rules for the mydata bucket on the myminio deployment:

mc ilm rule edit --id "c79ntj94b0t6rukh6lr0" --expiry-days 90  myminio/mydata

mc ilm rule edit --id "c79nu2p4b0t6qko19rgg" --expired-object-delete-marker myminio/mydata

mc ilm rule edit --id "c79n19dn10dnab109fg1" --transition-days 30 --tier "COLDTIER"

The command modifies the specified rules as follows:

  • Delete objects more than 90 days old.
  • Delete DeleteMarker tombstones if that object has no other versions remaining.
  • Transition objects more than 30 days old to the COLDTIER remote tier.

The command has the following syntax:

mc [GLOBALFLAGS] ilm rule edit                                       \
                 --id "string"                                       \
                 [--prefix "string"]                                 \
                 [--enable]                                          \
                 [--disable]                                         \
                 [--expire-all-object-versions]                      \
                 [--expire-days "string"]                            \
                 [--expire-delete-marker]                            \
                 [--transition-days "string"]                        \
                 [--transition-tier "string"]                        \
                 [--noncurrent-expire-days "string"]                 \
                 [--noncurrent-expire-newer "string"]                \
                 [--noncurrent-transition-days "string"]             \
                 [--noncurrent-transition-tier "string"]             \
                 [--tags]                                            \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias and full path to the bucket on the MinIO deployment to which to modify the object lifecycle management rule. For example:

mc ilm rule edit myminio/mydata
--id

mc-cmd

Required

The unique ID of the rule. Use mc ilm rule ls to list bucket rules and retrieve the id for the rule you want to modify.

--disable

mc-cmd

Optional

Stop using the rule, but retain the rule for future use. Objects do not transition or expire when a rule is disabled.

--enable

mc-cmd

Optional

Use a rule to transition or expire objects.

--prefix

mc-cmd

Optional

Restrict the management rule to a specific bucket prefix.

For example:

mc ilm rule edit --prefix "meetingnotes/" myminio/mydata --expire-days "90"

The command modifies a rule that expires objects in the mydata bucket of the myminio ALIAS after 90 days for any object with the meetingnotes/ prefix.

--expire-all-object-versions

mc-cmd

Optional

Note

Added: mc

RELEASE.2024-02-24T01-33-20Z

Expire all current and noncurrent versions of an object. Use with the --expire-days option to specify the number of days after which all versions of an object should be deleted by the scanner process.

After the scanner processes this command, no versions of the object remain on the deployment.

Note

Added: MinIO

RELEASE.2024-05-01T01-11-10Z

This flag only applies to objects that do not have a delete marker as the latest version.

--expire-days

mc-cmd

Optional

The number of days to retain an object after being created. MinIO marks the object for deletion after the specified number of days pass.

Exercise caution when using this option, as its behavior can result in immediate expiration of uploaded objects. Any objects created after the specified expiration date are automatically eligible for expiration. Similarly, specifying a calendar date that is prior to the current system host datetime marks all objects covered by the rule for deletion. Consider immediately removing any ILM rule using this option once the specified calendar date has passed.

For versioned buckets, the expiry rule applies only to the current object version. Use the --noncurrent-expire-days option to apply expiration behavior to noncurrent object versions.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

Mutually exclusive with the following options:

--expire-delete-marker

mc-cmd

Optional

Specify this option to direct MinIO to remove delete markers for objects with no remaining object versions. Specifically, the delete marker is the only remaining “version” of the given object.

This option is mutually exclusive with the following options:

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner and Object Deletion for more information.

--noncurrent-expire-days

mc-cmd

Optional

The number of days to retain an object version after becoming non-current (i.e. a different version of that object is now the HEAD). MinIO marks noncurrent object versions for deletion after the specified number of days pass.

This option has the same behavior as the S3 NoncurrentVersionExpiration action.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

--noncurrent-expire-newer

mc-cmd

Optional

The number of non-current versions of an object to retain before applying expiration. Older non-current versions beyond the specified number expire.

By default, MinIO does not retain any non-current versions when an expiration rule applies.

--noncurrent-transition-days

mc-cmd

Optional

The number of days an object has been non-current (i.e. replaced by a newer version of that same object) after which MinIO marks the object version as eligible for transition. MinIO transitions the object to the configured remote storage tier specified to the --transition-tier once the system host datetime passes that calendar date.

This option has no effect on non-versioned buckets. Requires specifying --noncurrent-transition-tier.

This option has the same behavior as the S3 NoncurrentVersionTransition action.

If the remote tier is another MinIO deployment, you can set the value to 0 to mark new objects as immediately eligible for transition to the remote tier.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

--noncurrent-transition-tier

mc-cmd

Optional

The remote storage tier to which MinIO transitions noncurrent objects versions. Specify a remote storage tier created by mc ilm tier add.

MinIO does not automatically migrate objects from the previously specified remote tier to the new remote tier. MinIO continues to route requests for objects stored on the old remote tier.

--tags

mc-cmd

Optional

One or more ampersand &-delimited key-value pairs describing the object tags to which to apply the lifecycle configuration rule.

This option is mutually exclusive with the following option:

--transition-days

mc-cmd

Optional

The number of calendar days from object creation after which MinIO marks an object as eligible for transition. MinIO transitions the object to the configured remote storage tier specified to the --transition-tier. Specify the number of days as an integer, e.g. 30 for 30 days. If the remote tier is another MinIO deployment, you can set the value to 0 to mark new objects as immediately eligible for transition to the remote tier.

For versioned buckets, the transition rule applies only to the current object version. Use the --noncurrent-transition-days option to apply transition behavior to noncurrent object versions.

Requires specifying --transition-tier.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

--transition-tier

mc-cmd

Optional

The remote storage tier to which MinIO transition objects. Specify a remote storage tier created by mc ilm tier add.

Required if specifying --transition-days.

MinIO does not automatically migrate objects from the previously specified remote tier to the new remote tier. MinIO continues to route requests for objects stored on the old remote tier.

Global Flags

This command supports any of the global flags.

Examples

Modify an Existing Lifecycle Management Rule

Use mc ilm rule edit with --id to modify an existing object expiration rule:

mc ilm rule edit ALIAS/PATH --id "RULEID" [FLAGS]
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket on the S3-compatible host.
  • Replace RULEID with the unique ID of the object lifecycle management rule. Use mc ilm rule ls to find the RULEID.
  • Specify any additional flags to add or modify the lifecycle management rule. For example, specify --transition-days to override the existing transition days value for the rule.

Disable a Lifecycle Management Rule

Use mc ilm rule edit with --disable to stop using an existing management rule.

mc ilm rule edit --id "RULEID" --disable myminio/mybucket
  • Replace RULEID with the unique ID of the object lifecycle management rule. Use mc ilm rule ls to find the RULEID.
  • Replace myminio with the ALIAS of the deployment where the rule exists.
  • Replace mybucket with the bucket for the rule.

Required Permissions

For permissions required to edit a rule, refer to the required permissions on the parent command.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.33 - mc ilm tier check

Description

The mc ilm tier check command displays the configuration for remote tier on a deployment.

Syntax

The command has the following syntax:

The following example displays the configuration for an existing remote tier called WARM-TIER on the myminio deployment.

 mc ilm tier check myminio WARM-TIER

The command has the following syntax:

mc ilm tier add TARGET TIER_NAME
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

The command accepts the following arguments:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment on which the desired tier exists.

TIER_NAME

mc-cmd

Required

The name of an existing remote tier to display.

You must specify the tier in all-caps, e.g. WARM_TIER.

Global Flags

This command supports any of the global flags.

Example

Display the Configuration for an Existing Tier

The following example displays the configuration of the tier WARM-TIER on the myminio deployment.

mc ilm tier check myminio WARM-TIER

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Required Permissions

For permissions required to review a tier, refer to the required permissions on the parent command.

4.34 - mc legalhold info

Syntax

The mc legalhold info command returns the current legal hold setting for an object or objects.

mc legalhold requires that the specified bucket has object locking enabled. You can only enable object locking at bucket creation. See mc mb --with-lock for documentation on creating buckets with object locking enabled.

The following command retrieves the current legalhold status for objects in the mydata bucket on the myminio MinIO deployment:

mc legalhold info --recursive myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] legalhold info  \
                 [--recursive]   \
                 [--rewind]      \
                 [--version-id]  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The MinIO alias and path to the object or objects on which to enable the legal hold. For example:

mc legalhold info play/mybucket/myobjects/objects.txt
--recursive, r

mc-cmd

Optional

Returns the legal hold status of all objects in the ALIAS bucket or bucket prefix.

--rewind

mc-cmd

Optional

Directs mc legalhold info to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--version-id, vid

mc-cmd

Optional

Directs mc legalhold info to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Global Flags

This command supports any of the global flags.

Examples

Use mc legalhold info to retrieve the legal hold status of an object. Include --recursive to return the legal hold status of the contents of a bucket:

mc legalhold clear [--recursive] ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket or object on the S3-compatible host. If specifying the path to a bucket or bucket prefix, include the --recursive option.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.35 - mc license register

Warning

Important

mc license register requires MinIO Client version RELEASE.2023-11-20T16-30-59Z or later. While not strictly required, best practice keeps the MinIO Client version in alignment with the MinIO Server version.

Description

The mc license register command connects your deployment with your MinIO SUBNET account.

After registration, you can upload deployment health reports directly to SUBNET using the mc support diag command.

The following example registers the minio alias with MinIO SUBNET:

mc license register minio

The command has the following syntax:

mc [GLOBALFLAGS] license register ALIAS                      \
                         [--airgap]                          \
                         [--api-key <string>]                \
                         [--license <path to license file>]  \
                         [--name <value>]

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

--airgap

mc-cmd

Optional

Use in environments without network access to SUBNET (for example, airgapped, firewalled, or similar configuration).

For instructions, see the airgap example.

If the deployment is airgapped, but the local device where you are using the minio client has network access, you do not need to use the --airgap flag.

--api-key

mc-cmd

API key of the account on SUBNET.

Corresponds with the MC_SUBNET_API_KEY environment variable.

To find the API key:

  1. Log in to MinIO SUBNET
  2. Go to the Deployments tab
  3. Select the API Key button near the top of the page on the right side of the account statistics information box
  4. Select copy button to the right of the key field to copy the key value to your clipboard
--license

mc-cmd

Optional

Path to the license file to use for registering the deployment.

You must first download the license file for the account from MinIO SUBNET.

  1. Log in to MinIO SUBNET
  2. Go to the Deployments tab
  3. Select the License button near the top of the page on the right side of the account statistics information box
  4. Select the copy button to the right of the license field to copy the key value to your clipboard or select the Download button to save a txt file of the license locally
--name

mc-cmd

Optional

Specify a name other than the alias to associate to the MinIO deployment in SUBNET.

Use --name <value> replacing <value> with the name you want to use for the deployment on SUBNET.

Examples

Register a Deployment Using the Deployment’s Name

Register the MinIO deployment at alias minio1 on SUBNET, using minio1 as the deployment name:

mc license register minio1

If not already registered, a prompt asks for SUBNET credentials for the deployment.

Register a Deployment Using the Account’s License File

Register a new MinIO deployment at alias minio5 on SUBNET, using the license file downloaded for the account:

mc license register minio5 /path/to/minio.license

If not already downloaded, you can download the license file from SUBNET.

  1. Log in to MinIO SUBNET
  2. Go to the Deployments tab
  3. Select the License button near the top of the page on the right side of the account statistics information box
  4. Select the Download button to save a txt file of the license locally

Register a Deployment with a Different Deployment Name

Register a MinIO deployment at alias minio2 on SUBNET, using second-deployment as the name:

mc license register minio2 --name second-deployment

Register a Deployment Without Direct Internet Access

Register a MinIO deployment at alias minio3 on SUBNET that does not have direct Internet access due to a firewall, airgap, or the like.

Note

Changed: mc

RELEASE.2022-07-29T19-17-16Z

The airgap registration process works with MinIO Client version RELEASE.2022-07-29T19-17-16Z or later. Earlier versions of the MinIO Client cannot register an airgapped deployment.

mc license register minio3 --airgap
  1. Run the command to return a registration link with token

  2. Open the copied registration link in a web browser and sign in to SUBNET

  3. Select the ? button to the right of the License number for the deployment

  4. In the popup, select the download link and save the key to a path you have access to

  5. In the command line, run the following command

    mc license update minio3 <path-to-file>

    Replace <path-to-file> with the path to the file you downloaded from SUBNET.

Syntax

The command has the following syntax:

mc [GLOBALFLAGS] license register       \
                         ALIAS          \
                         [--name value] \
                         [--airgap]

Global Flags

This command supports any of the global flags.

Behavior

Automatic License Updates

Note

Added: RELEASE.2023-01-18T04-36-38Z

Once registered for MinIO SUBNET, MinIO automatically checks for and updates the license every month.

In airgapped or other environments where the server does not have direct access to the internet, use mc license update with the path to the file to update the registration.

4.36 - mc replicate backlog

Note

Changed: mc.RELEASE.2023-07-18T21-05-38Z

mc replicate diff has been renamed mc replicate backlog. No functionality has changed.

Description

The mc replicate backlog shows a list of unreplicated new or deleted objects.

You can list the replication status of objects for a particular remote target. To do so, you must have the ARN of the remote target. You can use retrieve the remote targets configured for a bucket to find the ARN.

Syntax

The following command shows new or deleted objects in the notes bucket of the teamorange/projects prefix on the myminio alias that have not yet replicated to a specific remote target bucket. The remote target’s ARN is arn:minio:replication::3bb8c736-4014-42c5-b3cb-d64e3ebaa75e:notes.

mc replicate backlog myminio/notes/teamorange/projects --arn arn:minio:replication::3bb8c736-4014-42c5-b3cb-d64e3ebaa75e:notes

If any new or deleted objects have not yet replicated, the command outputs something similar to the following:

[0001-01-01 00:00:00 UTC] [2022-10-06 17:18:59 UTC]          478efe49-aa9d-46ab-8268-45b70cc4c341 PUT agenda.docx
[0001-01-01 00:00:00 UTC] [2022-10-06 17:18:15 UTC]          b283bf43-319f-455a-a779-3c2e669fad88 PUT budget-meeting.docx

In the output, PUT corresponds to a new object. Deleted objects or versions would show DEL.

The command has the following syntax:

mc [GLOBALFLAGS] replicate backlog   \
                 [--arn "string"]    \
                 TARGET
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The path to the alias, prefix, or object.

arn

mc-cmd

Optional

The ARN of the remote bucket to check for new or deleted objects that have not yet replicated.

When specified, the command returns a list of any new or deleted objects that have not replicated to the remote target. If not specified, the command returns a list of new or deleted objects on the source deployment that have not replicated to any remote target.

Global Flags

This command supports any of the global flags.

Examples

View Unreplicated Versions of Objects at a Prefix

Display unreplicated PUT and DELETE actions for a prefix:

mc replicate backlog myminio/mybucket/path/to/prefix
  • Replace myminio/mybucket with the ALIAS and full bucket path for which to create the replication configuration.
  • Replace path/to/prefix with the prefix or object to use for the request.

If unreplicated objects exist, the output returns a list of the actions that created or removed objects at the prefix that have not replicated to a remote target:

[0001-01-01 00:00:00 UTC] [2022-10-06 17:18:59 UTC]          478efe49-aa9d-46ab-8268-45b70cc4c341 PUT agenda.docx
[0001-01-01 00:00:00 UTC] [2022-10-06 17:18:15 UTC]          b283bf43-319f-455a-a779-3c2e669fad88 PUT budget-meeting.docx

View Unreplicated Objects at a Specific Remote Target

The following mc replicate backlog command shows unreplicated objects at an alias/bucket/prefix path for a specific remote target:

mc replicate backlog myminio/mybucket/path/to/prefix --arn <remote-arn>
  • Replace myminio/mybucket with the ALIAS and full bucket path for which to show unreplicated objects.
  • Replace the path/to/prefix with the desired prefix or object path.
  • Replace <remote-arn> with the resource number for a specific remote target.

If unreplicated objects exist, the output returns a list of the actions that created or removed objects that have not replicated to the remote target:

[0001-01-01 00:00:00 UTC] [2022-10-06 17:18:59 UTC]          478efe49-aa9d-46ab-8268-45b70cc4c341 PUT agenda.docx
[0001-01-01 00:00:00 UTC] [2022-10-06 17:18:15 UTC]          b283bf43-319f-455a-a779-3c2e669fad88 PUT budget-meeting.docx

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.37 - mc retention info

Syntax

The mc retention info command configures the Write-Once Read-Many (WORM) locking settings for an object or object(s) in a bucket. You can also set the default object lock settings for a bucket, where all objects without explicit object lock settings inherit the bucket default.

To lock an object under legal hold, use mc legalhold set.

mc retention info requires that the specified bucket has object locking enabled. You can only enable object locking at bucket creation. See mc mb --with-lock for documentation on creating buckets with object locking enabled.

The following command returns the default object lock configuration for the mydata bucket on the myminio MinIO deployment:

mc retention info --default myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] retention info            \
                 [--default]               \
                 [--recursive]             \
                 [--rewind "string"]       \
                 [--version-id "string"]*  \
                 [--versions]              \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

mc retention info --version-id is mutually exclusive with multiple other parameters. See the reference documentation for more information.

Parameters

ALIAS

mc-cmd

Required

The full path to the object for which to retrieve the object lock configuration. Specify the alias of a configured S3-compatible service as the prefix to the ALIAS bucket path. For example:

mc retention info play/mybucket/object.txt
  • If the ALIAS specifies a bucket or bucket prefix, include

    --recursive to return the object lock settings for all objects in the bucket or bucket prefix.

  • If the ALIAS bucket has versioning enabled,

    mc retention info by default applies to only the latest object version. Use --version-id or --versions to return the object lock settings for a specific version or for all versions of the object.

--default

mc-cmd

Optional

Returns the default object lock settings for the bucket specified to ALIAS.

If specifying --default, mc retention info ignores all other flags.

--recursive, r

mc-cmd

Optional

Recursively returns the object lock settings for all objects in the specified ALIAS path.

Mutually exclusive with --version-id.

--rewind

mc-cmd

Optional

Directs mc retention info to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--version-id, vid

mc-cmd

Optional

Directs mc retention info to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Mutually exclusive with any of the following flags:

--versions

mc-cmd

Optional

Directs mc retention info to operate on all object versions that exist in the bucket.

--versions requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --versions and --rewind together to retrieve the retention settings for all object versions that existed at a specific point-in-time.

Global Flags

This command supports any of the global flags.

Examples

Retrieve Object Lock Settings for an Object or Object(s)

mc retention info ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the path to the object.

Use mc retention info with --recursive to retrieve the retention settings for all objects in a bucket:

mc retention info --recursive ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the path to the bucket.

The bucket must have object locking enabled to use this command. You can only enable object locking when creating a bucket. See mc mb --with-lock for more information on creating buckets with object locking enabled.

Retrieve Default Object Lock Settings for a Bucket

Use mc retention info with --default to retrieve the default object lock settings for a bucket:

mc retention info --default ALIAS/PATH
  • Replace ALIAS with the

    alias of a configured S3-compatible host.

  • Replace PATH with the path to the bucket.

The bucket must have object locking enabled to use this command. You can only enable object locking when creating a bucket. See mc mb --with-lock for more information on creating buckets with object locking enabled.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.38 - mc share upload

Syntax

The mc share upload command generates a temporary presigned URL with integrated access credentials for uploading objects to a MinIO bucket. The temporary URL expires after a configurable time limit.

Applications can perform a PUT to upload an object using the URL.

For more information on shareable object URLs, see the Amazon S3 documentation on Pre-Signed URLs.

The following command generates a new presigned upload URL for the mydata bucket on the myminio MinIO deployment:

mc share upload --recursive myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] share upload               \
                 [--content-type "string"]  \
                 [--expire "string"]        \
                 [--recursive]              \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The alias of a MinIO deplyment and the full path to the object for which to generate an upload URL. For example:

mc share upload play/mybucket/object.txt

You can specify multiple objects on the same or different MinIO deployments. For example:

mc share upload play/mybucket/object.txt play/mybucket/otherobject.txt

If specifying the path to a bucket or bucket prefix, you must also specify the --recursive argument. For example:

mc share upload --recursive play/mybucket/

mc share upload --recursive play/mybucket/myprefix/
--content-type, T

mc-cmd

Optional Restrict uploads to only requests with a specific Content-Type header.

Specify a string with the desired Content-Type value to accept. For example, video/mp4.

If configured, clients using the generated URL must include a Content-Type header for the specified type. MinIO rejects requests that do not have the correct Content-Type header.

Content types are also known as media types.

--expire, E

mc-cmd

Optional Set the expiration time limit for all generated URLs.

Specify a string with format ##h##m##s format. For example: 12h34m56s for an expiry of 12 hours, 34 minutes, and 56 seconds after URL generation.

Defaults to 168h or 168 hours (7 days).

--recursive, r

mc-cmd

Optional Modifies the CURL URL to support uploading objects to a bucket or bucket prefix. Required if any ALIAS specifies a path to a bucket or bucket prefix. The modified CURL output resembles the following:

curl ... -F key=<NAME> -F file=@<FILE>

Replace <FILE> with the path to the file to upload.

Replace <NAME> with the object name once uploaded. This may include prefixes.

Global Flags

This command supports any of the global flags.

Examples

Generate a URL to Upload Object(s)

Use mc share upload to generate a URL that supports POST requests for uploading a file to a specific object location on a MinIO deployment:

mc share upload --expire DURATION ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the object on the MinIO deployment.
  • Replace DURATION with the duration after which the URL expires. For example, to set a 30 day expiry, specify 30d.

Use mc share upload with the --recursive and --expire options to generate a temporary URL that supports POST requests for uploading files to a bucket on a MinIO deployment:

mc share upload --recursive --expire DURATION ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or bucket prefix on the MinIO deployment.
  • Replace DURATION with the duration after which the URL expires. For example, to set a 30 day expiry, specify 30d.

The command returns a CURL command for uploading an object to the specified bucket prefix.

  • Replace the <FILE> string in the returned CURL command with the path to the file to upload.
  • Replace the <NAME> string in the returned CURL command with the name of the object in the bucket. This may include prefixes.

You can use a shell script loop to recursively upload the contents of a filesystem directory to the S3-compatible service:

#!/bin/sh

for file in ~/Documents/photos/
do
   curl https://play.min.io/mybucket/ \
   -F policy=AAAAA -F x-amz-algorithm=AWS4-HMAC-SHA256 \
   -F x-amz-credential=AAAA/us-east-1/s3/aws4_request \
   -F x-amz-date=20200812T202556Z \
   -F x-amz-signature=AAAA \
   -F bucket=mybucket -F key=photos/${file} -F file=@${file}

done

This example will upload each file in the directory ~/Documents/photos/ to the mybucket bucket under the prefix photos. Defer to the documented best practices for your preferred scripting language for iterating through files in a directory.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.39 - mc support diag

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Command History

The command used to create the diagnostic report has changed over time.

MinIO Client Release Command Notes
RELEASE.2022-02-13T23-26-13Z mc support diag Command moved to mc support
RELEASE.2020-11-17T00-39-14Z mc admin subnet health Command made a SUBNET subcommand
RELEASE.2020-10-03T02-54-56Z mc admin health Command renamed to health
Original Command mc admin obd Command renamed mc admin health

Description

The mc support diag command generates a health report for a MinIO deployment.

For deployments registered with the MinIO subscription network (SUBNET), the command generates and uploads the health report for analysis. Optionally, automate generating and uploading the report every 24 hours by enabling callhome.

The resulting health report is intended for use by MinIO Engineering via SUBNET and may contain internal or private data points. Exercise caution before sending a health report to a third party or posting the health report in a public forum.

MinIO recommends that you run the health diagnostics when first provisioning the cluster and again at any failure scenario.

Use the mc support diag command to trigger the diagnostic test. For clusters registered with SUBNET, the command uploads the results as part of SUBNET Health reports.

For airgapped or firewalled environments, or other environments that prevent direct network access from the deployment, you can save the report locally with the --airgap flag. After saving, you can then upload the results of the test to SUBNET manually.

Sample Output

● CPU Info ... ✔
● Disk Info ... ✔
● Net Info ... ✔
● Os Info ... ✔
● Mem Info ... ✔
● Process Info ... ✔
● Server Config ... ✔
● System Errors ... ✔
● System Services ... ✔
● System Config ... ✔
● Admin Info ... ✔
*********************************************************************************
                                WARNING!!
     ** THIS FILE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR ENVIRONMENT **
     ** PLEASE INSPECT CONTENTS BEFORE SHARING IT ON ANY PUBLIC FORUM **
*********************************************************************************
mc: MinIO diagnostics report saved to myminio-health_20231111053323.json.gz

The gzipped output contains the requested health information.

Examples

Generate Health Data for a Cluster and Automatically Upload to SUBNET

Generate health data for a MinIO cluster and automatically for a MinIO cluster at alias minio1 for transmission to SUBNET.

mc support diag minio1

The automatic upload of data only occurs for deployments under a Commerical License.

Generate Health Data for a Cluster to Upload Manually

Generate a diagnostic report for a MinIO deployment at alias minio2 and save it for manual upload to SUBNET:

mc support diag minio2 --airgap
  1. Run the command to download the .gzip file
  2. Login to https://subnet.min.io and select the Deployments section
  3. Select the deployment for the report
  4. Select the Upload button
  5. Drag and drop the file or browse to the .gzip file location to upload it

Upload Data to SUBNET with Strict Anonymization

Generates health data for a MinIO cluster at alias myminio and anonymizes all sensitive data, including host names.

mc support diag myminio --anonymize=strict

Syntax

The command has the following syntax:

mc [GLOBALFLAGS] support diag                   \
                         ALIAS                  \
                         [--airgap]             \
                         [--anonymize=<string>] \
                         [--api-key string]

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

--airgap

mc-cmd

Optional

Use in environments without network access to SUBNET (for example, airgapped, firewalled, or similar configuration). Generates the diagnostic report and saves it to the location where you ran the command.

You must manually upload the report to SUBNET.

For instructions, see the airgap example.

If the deployment is airgapped, but the local device where you are using the minio client has network access, you do not need to use the --airgap flag.

--anonymize

mc-cmd

Note

Added: mc

RELEASE.2023-11-10T21-37-17Z

MinIO anonymizes data loaded to SUBNET. Beginning with mc RELEASE.2023-11-10T21-37-17Z, MinIO does not anonymize host names. This is the default standard anonymization mode.

Valid values are =strict or =standard.

To anonymize all data, including host names, pass this parameter with the strict mode.

mc support diag minio --anonymize=strict
--api-key

mc-cmd

Optional

Takes the account’s API key value from SUBNET.

This value is only required for airgapped environments where MinIO has not already stored the API key for the deployment.

Global Flags

This command supports any of the global flags.

4.40 - mc support top locks

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Syntax

The mc support top locks command lists the ten oldest locks on a MinIO deployment.

The command outputs the age of the lock, type of lock, owner, and resource. The output resembles the following:

Since                 Type    Owner                 Resource
13 hours ago          WRITE   10.68.100.18:9000     .minio.sys/leader.lock
13 hours ago          WRITE   10.68.100.18:9000     .minio.sys/callhome/runCallhome.lock
13 hours ago          WRITE   10.68.100.23:9000     .minio.sys/new-drive-healing/0/0

The following command displays the current in-progress S3 API calls on the alias myminio.

mc support top locks myminio/

The command has the following syntax:

mc [GLOBALFLAGS] support top locks  \
                 [--stale]          \
                 TARGET
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The full path to the alias or prefix where the command should run.

--stale

mc-cmd

Optional

Return only stale locks.

Global Flags

This command supports any of the global flags.

Examples

Display the 10 Oldest Locks on the myminio Deployment

mc support top locks myminio/

Display Stale Locks on the myminio Deployment

The following command displays all in-progress s3.PutObject calls for the myminio deployment:

mc support top locks --stale myminio/

4.41 - mc tag list

Syntax

The mc tag list command lists all tags from a bucket or object.

The following command lists tags for the mydata bucket on the myminio MinIO deployment:

mc tag list myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] tag set                   \
                 [--rewind "string"]       \
                 [--versions]              \
                 [--version-id "string"]*  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

mc tag list --version-id is mutually exclusive with multiple parameters. See the reference documentation for more information.

Parameters

ALIAS

mc-cmd

Required

The alias for a MinIO deployment and the full path to the object for which to list all tags (e.g. bucket and path to object). For example:

mc tag list myminio/mybucket/object.txt
--recursive, r

mc-cmd

Optional

Note

Added: RELEASE.2023-05-04T18-10-16Z

Recursively lists the tags for all objects at the path specified to ALIAS.

--rewind

mc-cmd

Optional

Directs mc tag list to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--versions

mc-cmd

Optional

Directs mc tag list to operate on all object versions that exist in the bucket.

--versions requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --versions and --rewind together to list tags from all object versions which existed at a specific point in time.

--version-id, vid

mc-cmd

Optional

Directs mc tag list to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Mutually exclusive with the following parameters:

Global Flags

This command supports any of the global flags.

Examples

List Tags for a Bucket or Object

Use mc tag list to list tags for a bucket or object:

mc tag list ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or object on the MinIO deployment.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.42 - mc version info

Syntax

The mc version info command returns the versioning status for the specified bucket.

The following command returns the versioning status for the mybucket bucket on the myminio MinIO deployment:

mc version info myminio/mybucket

The command has the following syntax:

mc [GLOBALFLAGS] version info ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

The full path to the bucket on which to retrieve the versioning status. For example:

mc version info myminio/mybucket

Global Flags

This command supports any of the global flags.

Example

Get Bucket Versioning Status

Use mc version info to retrieve the versioning status for a bucket:

mc version info ALIAS/PATH
  • Replace ALIAS with the alias of a configured MinIO deployment.
  • Replace PATH with the bucket on which to retrieve the versioning status.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.43 - mc alias set

Syntax

The mc alias set command adds or updates an alias to the local mc configuration.

The following command adds an alias for a MinIO deployment myminio running at the URL https://myminio.example.net. mc uses the specified username and password for authenticating to the MinIO deployment:

mc alias set myminio https://myminio.example.net minioadminuser minioadminpassword

If the myminio alias already exists, the command overwrites that alias with the new URL, access key, and secret key.

The mc alias set command has the following syntax:

mc [GLOBALFLAGS] alias set \
                 [--api "string"]                           \
                 [--path "string"]                          \
                 ALIAS                                      \
                 URL                                        \
                 ACCESSKEY                                  \
                 SECRETKEY
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The name to associate with the S3-compatible service. Aliases are case-sensitive and must meet the following requirements:

  • Contain only ASCII lower case letters (a-z), upper case letters (A-Z), numbers ([0-9]), hyphen (-), or underscore (_).
  • 2 or more characters in length.
  • The first character must be a letter.
Note

Changed: RELEASE.2024-01-11T05-49-32Z

An alias may also be a single letter (a-z or A-Z).

Examples of some valid alias values include:

  • myminio
  • Test-1
  • A
  • a
URL

mc-cmd

Required The URL to the S3-compatible service endpoint. For example:

https://minio.example.net

ACCESSKEY

mc-cmd

Required

The access key for authenticating to the S3 service.

SECRETKEY

mc-cmd

Required

The secret key for authenticating to the S3 service.

--api

mc-cmd

Optional

Specifies the signature calculation method to use when connecting to the S3-compatible service. Supports the following values:

  • S3v4 (Default)
  • S3v2
Note

Note

AWS Signature V2 is considered deprecated by AWS. mc alias set includes this option only for S3 buckets or services still reliant on the Signature V2.

Use S3v4 unless explicitly required by the S3-compatible service. MinIO server does not rely on nor require S3v2, nor are all API operations available on S3v2.

--path

mc-cmd

Optional

Specifies the bucket path lookup setting used by the server. Supports the following values:

  • "auto" (Default)
  • "on"
  • "off"

Global Flags

This command supports any of the global flags.

Examples

Add or Update an Alias for a MinIO Deployment

Use mc alias set to add an S3-compatible service for use with mc:

The following command creates a new alias myminio pointing at a MinIO deployment at https://minio.example.net. The alias uses the miniouser and miniopassword credentials for performing operations against the deployment.

mc alias set myminio https://minio.example.net miniouser miniopassword

If the myminio alias already exists, the mc alias set command overwrites that alias with the specified arguments.

mc alias set ALIAS HOSTNAME ACCESSKEY SECRETKEY
  • Replace ALIAS with the name to associate with the MinIO service.
  • Replace HOSTNAME with the URL for any node in the MinIO deployment. You can alternatively specify the URL for a load balancer or reverse proxy managing connections to the MinIO deployment.
  • Replace ACCESSKEY and SECRETKEY with credentials for a user on the MinIO deployment.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Required Credentials and Access Control

mc alias set requires specifying an access key and corresponding secret key for the S3-compatible host. mc functionality is limited based on the policies associated to the specified credentials. For example, if the specified credentials do not have read/write access to a specific bucket, mc cannot perform read or write operations on that bucket.

For more information on MinIO Access Control, see Access Management.

For more complete documentation on S3 Access Control, see Amazon S3 Security.

For all other S3-compatible services, defer to the documentation for that service.

Certificates

The MinIO Client fetches the peer certificate, computes the public key fingerprint, and asks the user whether to accept the deployment’s certificate.

If trusted, the MinIO Client automatically adds the certificate authority to:

  • ~/.mc/certs/CAs/ on Linux and other Unix-like systems.
  • C:\Users\[username]\mc\certs\CAs\ on Windows systems.

4.44 - mc anonymous

Description

The mc anonymous command supports setting or removing anonymous policies to a bucket and its contents. Buckets with anonymous policies allow public access where clients can perform any action granted by the policy without authentication.

Subcommands

mc anonymous includes the following subcommands:

Subcommand

Description

get

The mc anonymous get command gets the anonymous (i.e. unauthenticated or public) access policies for a bucket.

get-json

The mc anonymous get-json command gets anonymous (i.e. unauthenticated or public) access policies for a bucket.

links

The mc anonymous links retrieves the HTTP URL for anonymous (i.e. unauthenticated or public) access to a bucket.

list

The mc anonymous list retrieves all anonymous (i.e. unauthenticated or public) access policies for a bucket.

set

The mc anonymous set command sets anonymous (i.e. unauthenticated or public) access policies for a bucket.

set-json

The mc anonymous set-json command sets anonymous (i.e. unauthenticated or public) access policies for a bucket using an IAM JSON policy document.

4.45 - mc anonymous list

Syntax

The mc anonymous list retrieves all anonymous (i.e. unauthenticated or public) access policies for a bucket.

Buckets with anonymous policies allow clients to access the bucket contents and perform actions consistent with the specified policy without authentication.

The following command lists all anonymous access policies for the mydata bucket on the myminio MinIO deployment:

mc anonymous list myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The full path to the bucket or bucket prefix for which the command retrieves the anonymous bucket policies.

Specify the alias of the MinIO or other S3-compatible service and the full path to the bucket or bucket prefix. For example:

mc anonymous list public play/mybucket

Global Flags

This command supports any of the global flags.

Examples

List Anonymous Policies for Bucket

Use mc anonymous list to list the anonymous policies for a bucket:

mc anonymous list ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the destination bucket.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.46 - mc batch generate

Note

Changed: MinIO

RELEASE.2022-10-09T21-10-59Z or later

Syntax

The mc batch generate command creates a basic YAML-formatted template file for the specified job type.

After MinIO creates the file, open it in your preferred text editor tool to further customize. You can define one job task definition per batch file.

See job types for the supported jobs you can generate.

The following command creates a basic YAML file for a replicate job on the mybucket bucket of the myminio alias.

mc batch generate myminio replicate

The command has the following syntax:

mc [GLOBALFLAGS] batch generate \
                       ALIAS   \
                       JOBTYPE
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias used to generate the YAML template file. The specified alias does not restrict the deployment(s) where you can use the generated file.

For example:

mc batch generate myminio replicate
JOBTYPE

mc-cmd

Required

The type of job to generate a YAML document for.

Supports the following values:

Global Flags

This command supports any of the global flags.

Examples

Generate a yaml File for a Replicate Job Type

The following command generates a YAML blueprint for a replicate type batch job and names the file replicate with the .yaml extension:

mc batch generate alias replicate > replicate.yaml
  • Replace alias with the alias to use to generate the yaml file.

  • Replace replicate with the type of job to generate a yaml file for.

    :mc:mc batch supports the replicate and keyrotate job types.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Job Types

mc batch currently supports the following job task types:

  • replicate

    Replicate objects between two MinIO deployments. Provides similar functionality to bucket replication as a batch job rather than continual scanning function.

  • keyrotate

    Note

    Added: MinIO

    RELEASE.2023-04-07T05-28-58Z

    Rotate the sse-s3 or sse-kms keys for objects at rest on a MinIO deployment.

  • expire

    Note

    Added: MinIO

    RELEASE.2023-12-02T10-51-33Z

    Expire objects based using similar semantics as Automatic Object Expiration.

replicate

You can use the following example configuration as the starting point for building your own custom replication batch job:

replicate:
  apiVersion: v1
  # source of the objects to be replicated
  source:
    type: TYPE # valid values are "s3" or "minio"
    bucket: BUCKET
    prefix: PREFIX # 'PREFIX' is optional
    # If your source is the 'local' alias specified to 'mc batch start', then the 'endpoint' and 'credentials' fields are optional and can be omitted
    # Either the 'source' or 'remote' *must* be the "local" deployment
    endpoint: "http[s]://HOSTNAME:PORT" 
    # path: "on|off|auto" # "on" enables path-style bucket lookup. "off" enables virtual host (DNS)-style bucket lookup. Defaults to "auto"
    credentials:
      accessKey: ACCESS-KEY # Required
      secretKey: SECRET-KEY # Required
    # sessionToken: SESSION-TOKEN # Optional only available when rotating credentials are used
    snowball: # automatically activated if the source is local
      disable: false # optionally turn-off snowball archive transfer
      batch: 100 # upto this many objects per archive
      inmemory: true # indicates if the archive must be staged locally or in-memory
      compress: false # S2/Snappy compressed archive
      smallerThan: 5MiB # create archive for all objects smaller than 5MiB
      skipErrs: false # skips any source side read() errors

  # target where the objects must be replicated
  target:
    type: TYPE # valid values are "s3" or "minio"
    bucket: BUCKET
    prefix: PREFIX # 'PREFIX' is optional
    # If your source is the 'local' alias specified to 'mc batch start', then the 'endpoint' and 'credentials' fields are optional and can be omitted

    # Either the 'source' or 'remote' *must* be the "local" deployment
    endpoint: "http[s]://HOSTNAME:PORT"
    # path: "on|off|auto" # "on" enables path-style bucket lookup. "off" enables virtual host (DNS)-style bucket lookup. Defaults to "auto"
    credentials:
      accessKey: ACCESS-KEY
      secretKey: SECRET-KEY
    # sessionToken: SESSION-TOKEN # Optional only available when rotating credentials are used

  # NOTE: All flags are optional
  # - filtering criteria only applies for all source objects match the criteria
  # - configurable notification endpoints
  # - configurable retries for the job (each retry skips successfully previously replaced objects)
  flags:
    filter:
      newerThan: "7d" # match objects newer than this value (e.g. 7d10h31s)
      olderThan: "7d" # match objects older than this value (e.g. 7d10h31s)
      createdAfter: "datetime" # match objects created after this date and time in RFC3339 format
      createdBefore: "datetime" # match objects created before this date and time in RFC3339 format

      ## NOTE: tags are not supported when "source" is remote.
      # tags:
      #   - key: "name"
      #     value: "pick*" # match objects with tag 'name', with all values starting with 'pick'

      # metadata:
      #   - key: "content-type"
      #     value: "image/*" # match objects with 'content-type', with all values starting with 'image/'

    notify:
      endpoint: "https://notify.endpoint" # notification endpoint to receive job status events
      token: "Bearer xxxxx" # optional authentication token for the notification endpoint

    retry:
      attempts: 10 # number of retries for the job before giving up
      delay: "500ms" # least amount of delay between each retry

See Replicate Batch Job Reference for more complete documentation on each key.

keyrotate

You can use the following example configuration as the starting point for building your own custom key rotation batch job:

keyrotate:
  apiVersion: v1
  bucket: BUCKET
  prefix: PREFIX
  encryption:
    type: sse-s3 # valid values are sse-s3 and sse-kms
    key: <new-kms-key> # valid only for sse-kms
    context: <new-kms-key-context> # valid only for sse-kms

  # optional flags based filtering criteria
  # for all objects
  flags:
    filter:
      newerThan: "7d" # match objects newer than this value (e.g. 7d10h31s)
      olderThan: "7d" # match objects older than this value (e.g. 7d10h31s)
      createdAfter: "date" # match objects created after this date and time in RFC3339 format
      createdBefore: "date" # match objects created before this date and time in RFC3339 format
      tags:
        - key: "name"
          value: "pick*" # match objects with tag 'name', with all values starting with 'pick'
      metadata:
        - key: "content-type"
          value: "image/*" # match objects with 'content-type', with all values starting with 'image/'
      kmskey: "key-id" # match objects with KMS key-id (applicable only for sse-kms)
    notify:
      endpoint: "https://notify.endpoint" # notification endpoint to receive job status events
      token: "Bearer xxxxx" # optional authentication token for the notification endpoint
    retry:
      attempts: 10 # number of retries for the job before giving up
      delay: "500ms" # least amount of delay between each retry

See Key Rotate Batch Job Reference for more complete documentation on each key.

expire

You can use the following example configuration as a starting point for building your own custom expiration batch job:

expire:
  apiVersion: v1
  bucket: mybucket # Bucket where this job will expire matching objects from
  prefix: myprefix # (Optional) Prefix under which this job will expire objects matching the rules below.
  rules:
    - type: object  # objects with zero ore more older versions
      name: NAME # match object names that satisfy the wildcard expression.
      olderThan: 70h # match objects older than this value
      createdBefore: "2006-01-02T15:04:05.00Z" # match objects created before this date and time in RFC3339 format
      tags:
        - key: name
          value: pick* # match objects with tag 'name', all values starting with 'pick'
      metadata:
        - key: content-type
          value: image/* # match objects with 'content-type', all values starting with 'image/'
      size:
        lessThan: 10MiB # match objects with size less than this value (e.g. 10MiB)
        greaterThan: 1MiB # match objects with size greater than this value (e.g. 1MiB)
      purge:
          # retainVersions: 0 # (default) delete all versions of the object. This option is the fastest.
          # retainVersions: 5 # keep the latest 5 versions of the object.

    - type: deleted # objects with delete marker as their latest version
      name: NAME # match object names that satisfy the wildcard expression.
      olderThan: 10h # match objects older than this value (e.g. 7d10h31s)
      createdBefore: "2006-01-02T15:04:05.00Z" # match objects created before this date and time in RFC3339 format
      purge:
          # retainVersions: 0 # (default) delete all versions of the object. This option is the fastest.
          # retainVersions: 5 # keep the latest 5 versions of the object including delete markers.

  notify:
    endpoint: https://notify.endpoint # notification endpoint to receive job completion status
    token: Bearer xxxxx # optional authentication token for the notification endpoint

  retry:
    attempts: 10 # number of retries for the job before giving up
    delay: 500ms # least amount of delay between each retry

See Expire Batch Job Reference for more complete documentation on each key.

4.47 - mc encrypt set

Syntax

The mc encrypt set encrypt command sets or updates the default bucket Server-Side Encryption (SSE) mode. MinIO automatically encrypts objects written to that bucket using the specified SSE mode.

mc encrypt set only supports SSE-KMS and SSE-S3.

The following command sets the default SSE-KMS encryption key for the bucket mydata on the myminio MinIO deployment:

mc encrypt set sse-kms "minio-encryption-key" myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] encrypt set  ENCRYPTION [KMSKEY] ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ENCRYPTION

mc-cmd

Specify the server-side encryption type to use as the default SSE mode. Supports the following values:

  • sse-kms - Encrypt objects using the key specified in KMSKEY. MinIO must have access to the specified key on the external KMS to successfully encrypt or decrypt objects protected using SSE-KMS.
  • sse-s3 - Encrypt objects using the key specified to MINIO_KMS_KES_KEY_NAME. MinIO must have access to the specified key on the external KMS to successfully encrypt or decrypt objects protected using SSE-S3.
KMSKEY

mc-cmd

Specify the KMS Master Key to use for performing SSE object encryption. This option only applies if ENCRYPTION is sse-kms.

Omit this option to direct MinIO to use the MINIO_KMS_KES_KEY_NAME.

ALIAS

mc-cmd

The full path to the bucket on which to set the default SSE mode. Specify the alias of the MinIO deployment as the prefix to the TARGET path. For example:

mc encrypt set ENCRYPTION [KMSKEY] play/mybucket

Global Flags

This command supports any of the global flags.

Examples

Enable Automatic Server-Side Bucket Encryption

The following commands assumes that:

  • The MinIO server configuration supports SSE-KMS
  • The root has an encryption key minio-encryption-key.
 mc encrypt set sse-kms minio-encryption-key myminio/data
mc encrypt set ENCRYPTION KMSKEY TARGET
  • Replace ENCRYPTION with sse-kms or sse-s3 depending on the preferred encryption mode.
  • Replace KMSKEY with the name of the encryption key on the configured root KMS. This argument has no effect with sse-s3.
  • Replace TARGET with the alias of the MinIO deployment on which to configure automatic server-side bucket encryption.

Behavior

mc encrypt set makes no assumptions about the MinIO server’s current encryption state. Specifying default encryption settings which the server cannot support may result in undesired behavior.

Setting or modifying the default server-side encryption settings does not automatically encrypt or decrypt the existing bucket contents. If the bucket contents must have consistent encryption, use the mc mv command with --enc-kms, --enc-s3, or --enc-c to specify the type of encryption to use for the moved contents. This manually modifies the encryption settings or encrypted state of the bucket contents before changing the bucket default.

4.48 - mc event rm

Syntax

The mc event rm command removes an event notification trigger from a bucket.

The mc event remove command has equivalent functionality to mc event rm.

The following command removes a configured event notifications for the specified bucket notification target for the mydata bucket on the myminio MinIO deployment:

mc event rm myminio/mydata arn:aws:sqs::primary:target

The command has the following syntax:

mc [GLOBALFLAGS] event remove        \
                 ALIAS               \
                 [ARN]               \
                 [--event "string"]  \
                 [--force]           \
                 [--prefix "string"] \
                 [--suffix "string"]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

mc [GLOBALFLAGS] event remove [FLAGS] ALIAS ARN

Parameters

ALIAS

mc-cmd

Required

The S3 service alias and bucket from which the command removes the event notification. For example:

mc event rm play/mybucket
ARN

mc-cmd

Required

The Amazon Resource Name (ARN) of the notification target.

The MinIO server outputs an ARN at startup for each configured notification target. See Bucket notifications for more information.

Retrieve the ARN by running mc event ls on the bucket.

--event

mc-cmd

Optional

The event type(s) specified when the event was added. The entries must match the values used when adding the event. If no event matches the list of event types, the command returns a no notification configuration matched error.

Specify multiple events using a comma , delimiter. See Supported Bucket Events for supported event types.

Defaults to removing an event that triggers for all event types on the ALIAS bucket with the ARN notification target.

Retrieve the event types used by running mc event ls on the bucket. Use the following table to convert event types in the command’s output to the entry required for the mc event rm command:

Output of mv event ls Event type to use
s3:objectAccessed get
s3:objectCreated put
s3:objectRemoved delete

For example, if the mc event ls returns the following:

arn:minio:sqs::mytest:webhook   s3:ObjectAccessed:*,s3:ObjectCreated:*   Filter:

Use the following command to remove the event:

mc event rm alias/bucket arn:minio:sqs::mytest:webhook --event get,put

The order of event types does not matter, only that you include the same ones that exist for the event.

--force

mc-cmd

Optional

Removes all events on the ALIAS bucket with the ARN notification target.

--prefix

mc-cmd

Optional

The bucket prefix in which the command removes bucket notifications.

For example, given a ALIAS of play/mybucket and a --prefix of photos, the command only removes bucket notifications in play/mybucket/photos.

--suffix

mc-cmd

Optional

The bucket suffix in which the command removes bucket notifications.

For example, given a ALIAS of play/mybucket and a --suffix of .jpg, the command only removes bucket notifications in play/mybucket/*.jpg.

Global Flags

This command supports any of the global flags.

Examples

Remove Event Notifications from a Bucket

The following command removes all event notification triggers on a bucket. The command assumes the MinIO deployment has at least one configured bucket notification target:

mc event rm myminio/mydata arn:minio:sqs::primary:webhook
mc event rm ALIAS ARN
  • Replace ALIAS with the alias of the MinIO deployment on which to add the bucket notification event. For example:

    myminio/mydata

  • Replace ARN with the notification target ARN.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.49 - mc idp ldap accesskey enable

Description

The mc idp ldap accesskey enable enables the specified access key on the local server.

The following example enables the access key mykey from the minio deployment:

mc idp ldap accesskey enable minio/ mykey

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap accesskey enable  \
                                 ALIAS      \
                                 KEY
  • Replace ALIAS with the alias of a MinIO deployment configured for AD/LDAP integration.

  • Replace KEY with the access key to enable.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment configured for AD/LDAP.

For example:

mc idp ldap accesskey enable minio mykey
KEY

mc-cmd

Required

The configured access key to enable.

Example

Enable the access key mykey from the minio deployment.

mc idp ldap accesskey enable minio/ mykey

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.50 - mc idp ldap enable

Description

The mc idp ldap enable command enables the currently configured AD/LDAP provider.

The following example enables the AD/LDAP configurations on the myminio deployment.

mc idp ldap enable   \
            myminio

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap enable  \
                          ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to enable the AD/LDAP integration.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment for which to enable the AD/LDAP integration.

For example:

mc idp ldap enable myminio

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.51 - mc idp ldap policy entities

Description

The mc idp ldap policy entities command displays a list of mappings for a user, group, and/or policy.

The following example lists all mappings for a specific policy, a set of groups, and a selection of users on the myminio deployment.

Specifically, it lists:

  • Users mapped to the finteam-policy policy.
  • Policies assigned to the uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io user.
  • Policies assigned to the cn=projectb,ou=groups,ou=swengg,dc=min,dc=io group.
mc idp ldap policy entities myminio                                                  \
                            --policy finteam-policy                                  \
                            --user 'uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io'  \
                            --group 'cn=projectb,ou=groups,ou=swengg,dc=min,dc=io'

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap policy entities                       \
                                 ALIAS                          \
                                 [--group `value`, -g `value`]  \
                                 [--policy value]               \
                                 [--user `value`, -u `value`]
  • Replace ALIAS with the alias of a MinIO deployment to configure for AD/LDAP integration.

  • You may use each of the --user, --group, and/or --policy flags as many times as desired in the command.

  • For each flag, the output lists the entities mapped to the specified policy, user, or group.

  • Omit all flags to return a list of mappings for all policies.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment for which to display the entity mappings.

For example:

mc idp ldap policy entities myminio
--group

mc-cmd

Optional

Returns a list of users and policies associated with the specified group. Repeat the flag to return a list for multiple groups.

--policies

mc-cmd

Optional

Returns a list of users and groups associated with the specified policy. Repeat the flag to return a list for multiple policies.

--user

mc-cmd

Optional

Returns a list of groups to which the user belongs and the policies associated with each group. The output includes only groups assigned to policies.

Repeat the flag to return a list for multiple users.

Example

The following example lists the entities mapped to each of two policies, policy1 and policy2 and entities mapped to the projectb group on the myminio deployment:

mc idp ldap policy entities myminio                                                 \
                          policy1                                                 \
                          policy2                                                 \
                          --group='cn=projectb,ou=groups,ou=swengg,dc=min,dc=io'

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.52 - mc ilm rule export

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm rule export replaces mc ilm export.

Syntax

The mc ilm rule export command exports the object lifecycle management configuration for a MinIO bucket.

The mc ilm rule export command outputs to STDOUT by default. You can output the contents to a .json file for archival or ingestion using mc ilm rule import.

The following command exports the lifecycle management configuration of the mydata bucket on the myminio deployment to the mydata-lifecycle-config.json file:

mc ilm rule export myminio/mydata > mydata-lifecycle-config.json

The command has the following syntax:

mc [GLOBALFLAGS] ilm rule export ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias and full path to the bucket on the MinIO deployment for which to export object lifecycle management rules. For example:

mc ilm rule export myminio/mydata > bucket-lifecycle.json

Global Flags

This command supports any of the global flags.

Examples

Export the Bucket Lifecycle Management Configuration

The following command exports the bucket lifecycle management configuration to the bucket-lifecycle.json file:

mc ilm rule export myminio/mybucket > bucket-lifecycle.json
mc ilm rule export ALIAS > file.json
  • Replace ALIAS with the alias of the MinIO deployment and the bucket for which to export object lifecycle management rules:

    myminio/mydata

  • Replace file.json with the name of the file to which to export the lifecycle management rules.

Required Permissions

For permissions required to export a rule, refer to the required permissions on the parent command.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.53 - mc ilm tier

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm tier replaces mc admin tier.

Description

The mc ilm tier command and its subcommands configure a remote supported S3-compatible service for MinIO Lifecycle Management: Object Transition (“Tiering”).

After creating one or more tiers with this command, use mc ilm rule and its subcommands to create the rules that move objects to other storage.

For more information, see the overview of lifecycle management.

Subcommands

mc ilm tier includes the following subcommands:

Subcommand

Description

add

The mc ilm tier add command creates a new remote storage tier to a supported storage services.

check

The mc ilm tier check command displays the configuration for remote tier on a deployment.

info

The mc ilm tier info command outputs statistics about a tier or all tiers for a deployment.

ls

The mc ilm tier ls command shows the remote tiers configured on a deployment.

rm

The mc ilm tier rm command removes an remote tier that has not been used to transition any objects.

update

The mc ilm tier update command modifies an existing configured remote tier.

Required Permissions

To create tiers for object transition, MinIO requires the following administrative permissions on the cluster:

For example, the following policy provides sufficient permissions for configuring object transition lifecycle management rules on any bucket in the cluster:

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "admin:SetTier",
               "admin:ListTier"
            ],
            "Effect": "Allow",
            "Sid": "EnableRemoteTierManagement"
      },
      {
            "Action": [
               "s3:PutLifecycleConfiguration",
               "s3:GetLifecycleConfiguration"
            ],
            "Resource": [
                        "arn:aws:s3:::*"
            ],
            "Effect": "Allow",
            "Sid": "EnableLifecycleManagementRules"
      }
   ]
}

Transition Permissions

Object transition lifecycle management rules require additional permissions on the remote storage tier. Specifically, MinIO requires the remote tier credentials provide read, write, list, and delete permissions.

For example, if the remote storage tier implements AWS IAM policy-based access control, the following policy provides the necessary permissions for transitioning objects into and out of the remote tier:

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "s3:ListBucket"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:s3:::MyDestinationBucket"
            ],
            "Sid": ""
      },
      {
            "Action": [
               "s3:GetObject",
               "s3:PutObject",
               "s3:DeleteObject"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:s3:::MyDestinationBucket/*"
            ],
            "Sid": ""
      }
   ]
}

Modify the Resource for the bucket into which MinIO tiers objects.

Note

Avoid enabling versioning in the remote tier

MinIO strongly recommends against enabling bucket versioning for remote tiers. If the remote tier bucket is versioned, each source object version is transitioned to a unique object in the remote tier.

If your environment requires versioning for the remote tier, you must also allow the s3:DeleteObjectVersion permission.

Defer to the documentation for the supported tiering targets for more complete information on configuring users and permissions to support MinIO tiering:

4.54 - mc ilm tier info

Description

The mc ilm tier info command outputs statistics about a tier or all tiers for a deployment.

Required Permissions

MinIO requires the following permissions scoped to the bucket or buckets for which you are creating lifecycle management rules.

MinIO also requires the following administrative permissions on the cluster in which you are creating remote tiers for object transition lifecycle management rules:

For example, the following policy provides permission for configuring object transition lifecycle management rules on any bucket in the cluster:.

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "admin:SetTier",
               "admin:ListTier"
            ],
            "Effect": "Allow",
            "Sid": "EnableRemoteTierManagement"
      },
      {
            "Action": [
               "s3:PutLifecycleConfiguration",
               "s3:GetLifecycleConfiguration"
            ],
            "Resource": [
                        "arn:aws:s3:::*"
            ],
            "Effect": "Allow",
            "Sid": "EnableLifecycleManagementRules"
      }
   ]
}

Syntax

The command has the following syntax:

The following example outputs the configuration for an existing remote tier called WARM-TIER on the myminio deployment.

 mc ilm tier info myminio WARM-TIER

The command has the following syntax:

mc ilm tier info TARGET TIER_NAME

Parameters

The command accepts the following arguments:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment on which the desired tier exists.

TIER_NAME

mc-cmd

Optional

The name of an existing remote tier to display.

You must specify the tier in all-caps, e.g. WARM_TIER.

If not specified, MinIO lists statistics for all existing tiers on the deployment.

Global Flags

This command supports any of the global flags.

Example

Display the Statistics for an Existing Tier

The following example displays the statistics of the tier WARM-TIER on the myminio deployment.

mc ilm tier info myminio WARM-TIER

Display the Statistics for all Existing Tiers on a Deployment

The following example displays the statistics of all existing tiers on the myminio deployment.

mc ilm tier info myminio

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Required Permissions

For permissions required to review a tier, refer to the required permissions on the parent command.

4.55 - mc legalhold set

Syntax

The mc legalhold set command enables legal hold Write-Once Read-Many (WORM) object locking on an object or objects.

mc legalhold requires that the specified bucket has object locking enabled. You can only enable object locking at bucket creation. See mc mb --with-lock for documentation on creating buckets with object locking enabled.

The following command enables legalhold WORM locking on all existing objects in the mydata bucket on the myminio MinIO deployment:

mc legalhold set --recursive myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] legalhold set  \
                 [--recursive]  \
                 [--rewind]     \
                 [--version-id] \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The MinIO alias and path to the object or objects on which to enable the legal hold. For example:

mc legalhold set play/mybucket/myobjects/objects.txt
--recursive, r

mc-cmd

Optional

Applies the legal hold to all existing objects in the ALIAS bucket or bucket prefix.

Note

--recursive only applies to existing objects

To enable legal hold for future objects, periodically repeat the mc legalhold command as new objects are created.

--rewind

mc-cmd

Optional

Directs mc legalhold set to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--version-id, vid

mc-cmd

Optional

Directs mc legalhold set to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Global Flags

This command supports any of the global flags.

Examples

Use mc legalhold set to enable legal hold on objects:

mc legalhold set [--recursive] ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket or object on the S3-compatible host. If specifying the path to a bucket or bucket prefix, include the --recursive option.

Behavior

Legal holds are indefinite and enforce complete immutability for locked objects. Only privileged users with the s3:PutObjectLegalHold can set or lift the legal hold.

Legal holds are complementary to both GOVERNANCE Mode and COMPLIANCE Mode retention settings. An object held under both legal hold and a GOVERNANCE/COMPLIANCE retention rule remains WORM locked until the legal hold is lifed and the rule expires.

For GOVERNANCE locked objects, the legal hold prevents mutating the object even if the user has the necessary privileges to bypass retention.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.56 - mc license update

Description

Use the mc license update command to replace a license key for a deployment.

For deployments registered for MinIO SUBNET, MinIO automatically checks for and updates the license every month.

Examples

Update the License Key for a Deployment with Alias minio1

mc license update minio1 license.key

Syntax

The command has the following syntax:

mc [GLOBALFLAGS] license update                   \
                         ALIAS                    \
                         [LICENSE-FILE-WITH-PATH] \
                         [--airgap]

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

LICENSE-FILE-WITH-PATH

mc-cmd

Optional

The path (relative to the current working directory) and file name of the key to use to update the deployment’s license.

To download the API key from SUBNET:

  1. Log in to MinIO SUBNET
  2. Go to the Deployments tab
  3. Select the API Key button near the top of the page on the right side of the account statistics information box
  4. Select copy button to the right of the key field to copy the key value to your clipboard
--airgap

mc-cmd

Optional

Use in environments without network access to SUBNET (for example, airgapped, firewalled, or similar configuration).

If the deployment is airgapped, but the local device where you are using the minio client has network access, you do not need to use the --airgap flag.

Global Flags

This command supports any of the global flags.

4.57 - mc replicate ls

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc replicate ls replaces the mc admin bucket remote ls command.

Syntax

The mc replicate ls command lists all replication rules on a MinIO bucket.

The mc replicate list command has equivalent functionality to mc replicate ls.

The following command lists all enabled replication rules for the mydata bucket on the myminio MinIO deployment:

mc replicate ls --status "enabled" myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] replicate ls         \
                 [--status "string"]  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment and full path to the bucket or bucket prefix for which to list the replication rules. For example:

mc replicate ls myminio/mybucket
--status

mc-cmd

Optional

Filter replication rules on the bucket based on their status. Specify one of the following values:

  • enabled - Show only enabled replication rules.
  • disabled - Show only disabled replication rules.

If omitted, mc replicate ls defaults to showing all replication rules.

Global Flags

This command supports any of the global flags.

Examples

List Existing Replication Rules

Use mc replicate ls to list bucket replication rules:

mc replicate ls ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or bucket prefix.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.58 - mc retention clear

Syntax

The mc retention clear command removes the Write-Once Read-Many (WORM) locking settings for an object or object(s) in a bucket. You can also remove the default object lock settings for a bucket.

To change the retention status of an object under legal hold, use mc legalhold clear.

The following command removes the default object lock configuration for the mydata bucket on the myminio MinIO deployment:

mc retention clear --default myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] retention clear           \
                 [--default]               \
                 [--recursive]             \
                 [--rewind "string"]       \
                 [--version-id "string"]*  \
                 [--versions]              \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

mc retention clear --version-id is mutually exclusive with multiple other parameters. See the reference documentation for more information.

Parameters

ALIAS

mc-cmd

Required

The full path to the object or objects for which to clear the object lock configuration. Specify the alias of a configured S3-compatible service as the prefix to the ALIAS bucket path. For example:

mc retention clear play/mybucket/object.txt
  • If the ALIAS specifies a bucket or bucket prefix, include

    --recursive to clear the object lock settings to the bucket contents.

  • If the ALIAS bucket has versioning enabled,

    mc retention clear by default applies to only the latest object version. Use --version-id or --versions to clear the object lock settings for a specific version or for all versions of the object.

--default

mc-cmd

Optional

Clears the default object lock settings for the bucket specified to ALIAS.

If specifying --default, mc retention clear ignores all other flags.

--recursive, r

mc-cmd

Optional

Recursively clears the object lock settings for all objects in the specified ALIAS path.

Mutually exclusive with --version-id.

--rewind

mc-cmd

Optional

Directs mc retention clear to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--version-id, vid

mc-cmd

Optional

Directs mc retention clear to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Mutually exclusive with any of the following flags:

--versions

mc-cmd

Optional

Directs mc retention clear to operate on all object versions that exist in the bucket.

--versions requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --versions and --rewind together to remove the retention settings from all object versions that existed at a specific point-in-time.

Global Flags

This command supports any of the global flags.

Examples

Clear Object Lock Settings for an Object or Object(s)

mc retention clear ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the path to the object.

Use mc retention clear with --recursive to clear the retention settings from all objects in a bucket:

mc retention clear --recursive ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the path to the bucket.

The bucket must have object locking enabled to use this command. You can only enable object locking when creating a bucket. See mc mb --with-lock for more information on creating buckets with object locking enabled.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.59 - mc share ls

Syntax

The mc share ls command displays any unexpired presigned URLs generated by mc share upload or mc share download

The mc share list command has equivalent functionality to mc share ls.

Applications can perform a PUT to retrieve the object from the URL.

For more information on shareable object URLs, see the Amazon S3 documentation on Pre-Signed URLs.

The following command lists all upload and download presigned URLs respectively for the mydata bucket on the myminio MinIO deployment:

mc share ls upload myminio/mydata
mc share ls download myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] share list           \
                 [download | upload]  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

download

mc-cmd

Required Lists all unexpired presigned download (GET) URLs.

Mutually exclusive with mc share ls upload

upload

mc-cmd

Required Lists all unexpired presigned upload (PUT) URLs.

Mutually exclusive with mc share ls download

ALIAS

mc-cmd

Required The alias of a MinIO deplyment and the full path to the object for which to list unexpired presigned URLs.

Global Flags

This command supports any of the global flags.

Examples

List Generated Download and Upload URLs

Use mc share ls download to generate a URL that supports POST requests for uploading a file to a specific object location on an S3-compatible host:

mc share ls download ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.

Use mc share ls upload to generate a URL that supports POST requests for uploading a file to a specific object location on an S3-compatible host:

mc share ls upload ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.60 - mc support inspect

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Description

The mc support inspect command collects the data and metadata associated to objects at the specified path.

MinIO assembles this data from each backend drive storing an erasure shard for each specified object. The command produces an encrypted zip file that includes all matching files with their respective host+drive+path.

If this information is required to diagnose a MinIO SUBNET issue, MinIO Engineering will provide the appropriate command. The resulting report is intended for use by MinIO Engineering via SUBNET and may contain internal or private data points associated to the object. Exercise caution before sending a report to a third party or posting the report in a public forum.

Note

Changed: RELEASE.2023-01-11T03-14-16Z

The file uploads to MinIO for use by the engineering team in support efforts. If the upload fails, such as in an air-gapped environment, the command saves the file to the current working directory.

Note

Changed: RELEASE.2022-12-12T19-27-27Z

When writing the zip archive, MinIO also encrypts the zip index of file names included in the archive.

Note

Changed: RELEASE.2024-10-29T15-34-59Z

Inspect now generates unique file names to help distinguish one inspect file from another. The file name reflects the inspected path.

Warning

Important

mc support inspect requires a MinIO deployment server from October 2021 or later.

Wildcards

The command supports wildcard * pattern matching for prefixes or objects when using the Bash shell. For non-Bash shells, a message displays indicating that wildcard patterns are only supported in Bash.

mc support inspect ALIAS/bucket/path/**/xl.meta

This command collects all xl.meta associated to objects at ALIAS/bucket/path/.

Examples

Download Metadata for an Object

You can download the metadata for an object. Metadata stores in an xl.meta binary file.

The following command downloads the xl.meta from mybucket/myobject on the minio1 deployment.

The file downloads from all drives as a zip archive file.

mc support inspect minio1/mybucket/myobject/xl.meta

The contents of the xl.meta file are not human readable. You can convert the contents of an xl.meta file to JSON format.

Download All Objects at a Prefix Recursively

The following command downloads all objects recursively found at a prefix.

Caution

Caution

This can be an expensive operation. Proceed with caution.

mc support inspect minio1/mybucket/myobject/**

Syntax

The command has the following syntax:

mc [GLOBALFLAGS] support inspect       \
                         [--legacy]   \
                         TARGET

Parameters

--legacy

mc-cmd

Optional

Use the older method of exporting inspection data, which does not encrypt data by default.

TARGET

mc-cmd

Required

The path to the location or object to inspect. The path should include the alias <alias> of the MinIO deployment and, if needed, the prefix and/or object name.

Global Flags

This command supports any of the global flags.

4.61 - mc support top disk

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Syntax

The mc support top disk command displays current drive statistics.

The following command displays the current in-progress S3 API calls on the alias myminio.

mc support top disk myminio/

The command has the following syntax:

mc [GLOBALFLAGS] support top disk                     \
                             [--count, -c "integer"]  \
                             TARGET
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The full path to the alias or prefix where the command should run.

--count, -c

mc-cmd

Optional

Display statistics for up to the entered number of drives.

If no entry is made, the command returns statistics for up to 10 drives.

Global Flags

This command supports any of the global flags.

4.62 - mc tag remove

Syntax

The mc tag remove command removes all tags from a bucket or object.

The following command removes tags for the mydata bucket on the myminio MinIO deployment:

mc tag remove myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] tag remove                \
                 [--rewind "string"]       \
                 [--versions]              \
                 [--version-id "string"]*  \
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

mc tag remove --version-id is mutually exclusive with multiple parameters. See the reference documentation for more information.

Parameters

ALIAS

mc-cmd

Required

The alias for a MinIO deployment and the full path to the object on which to remove all tags (e.g. bucket and path to object). For example:

mc tag remove myminio/mybucket/object.txt
--recursive, r

mc-cmd

Optional

Note

Added: RELEASE.2023-05-04T18-10-16Z

Recursively removes all tags from all objects at the specified ALIAS.

--rewind

mc-cmd

Optional

Directs mc tag remove to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--versions

mc-cmd

Optional

Directs mc tag remove to operate on all object versions that exist in the bucket.

--versions requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --versions and --rewind together to remove tags from all object versions which existed at a specific point in time.

--version-id, vid

mc-cmd

Optional

Directs mc tag remove to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Mutually exclusive with the following parameters:

Global Flags

This command supports any of the global flags.

Examples

Remove Tags from a Bucket or Object

Use mc tag remove to remove tags from a bucket or object:

mc tag remove ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or object on the MinIO deployment.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.63 - mc version suspend

Syntax

The mc version suspend command disables versioning on the specified bucket.

The following command disables versioning for the mybucket bucket on the myminio MinIO deployment:

mc version suspend myminio/mybucket

The command has the following syntax:

mc [GLOBALFLAGS] version suspend ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

The full path to the bucket on which to disable versioning. For example:

mc version suspend myminio/mybucket

Global Flags

This command supports any of the global flags.

Example

Disable Bucket Versioning

Use mc version suspend to disable versioning for a bucket:

mc version suspend ALIAS/PATH
  • Replace ALIAS with the alias of a configured MinIO deployment.
  • Replace PATH with the bucket on which to disable versioning.

Behavior

Bucket Versioning with Existing Data

Disabling bucket versioning on a bucket with existing versioned data does not remove any versioned objects. Applications can continue to access versioned data after disabling bucket versioning. Use mc rm --versions ALIAS/BUCKET/OBJECT to delete an object and all its versions.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.64 - mc alias import

Syntax

The mc alias import command imports an alias configuration from a JSON document.

You can use mc alias export to create the necessary JSON for import.

The following command imports an alias configuration from a JSON document:

mc alias import newalias ./credentials.json

Use mc alias list newalias to confirm the import succeeded.

The mc alias import command has the following syntax:

mc [GLOBALFLAGS] alias import ALIAS PATH|STDIN
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The name of the alias to assign to the imported configuration.

PATH

mc-cmd

Required

The full path to the JSON object representing the alias configuration to import.

Mutually exclusive with the STDIN parameter.

STDIN

mc-cmd

Required

Directs the command to use the Standard Input (STDIN) as the source of the JSON object for import.

Mutually exclusive with the PATH parameter.

Global Flags

This command supports any of the global flags.

Behavior

JSON Format

The JSON object must have the following format:

{
   "url" : "https://hostname:port",
   "accessKey": "<STRING>",
   "secretKey": "<STRING>",
   "api": "s3v4",
   "path": "auto"
}

You can use the mc alias export command to export an existing alias from the local host configuration. Alternatively, you can manually extract the necessary JSOn fields from the mc configuration file.

Examples

Import an Alias Using Standard Input

The following example imports a custom alias for the play.min.io sandbox. You can modify this example to use user credentials you have already created or validated as existing on the sandbox:

echo '
{
 "url": "https://play.min.io",
 "accessKey": "minioadmin",
 "secretKey": "minioadmin",
 "api": "s3v4",
 "path": "auto"
}' | mc alias import play-minioadmin

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.65 - mc anonymous links

Syntax

The mc anonymous links retrieves the HTTP URL for anonymous (i.e. unauthenticated or public) access to a bucket.

Buckets with anonymous policies allow clients to access the bucket contents and perform actions consistent with the specified policy without authentication.

The following command retrieves HTTP URLs for the mydata bucket on the myminio MinIO deployment:

mc anonymous links --recursive myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] policy links   \
                 [--recursive]  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The full path to the bucket or bucket prefix for which the command retrieves the anonymous bucket policies.

Specify the alias of the MinIO or other S3-compatible service and the full path to the bucket or bucket prefix. For example:

mc anonymous links public [FLAGS] play/mybucket
--recursive

mc-cmd

Optional Retrieve the HTTP links recursively.

Global Flags

This command supports any of the global flags.

Examples

List Anonymous Policies for Bucket

Use mc anonymous links to links the anonymous policies for a bucket:

mc anonymous links ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the destination bucket.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.66 - mc batch

Note

Added: mc

RELEASE.2023-03-20T17-17-53Z

Added the ability to cancel jobs with the mc batch cancel command.

Description

The mc batch commands allow you to run one or more job tasks on a MinIO deployment.

Subcommands

mc batch includes the following subcommands:

Subcommand

Description

cancel

The mc batch cancel stops an ongoing batch job.

describe

The mc batch describe command outputs the job definition for a specified job ID.

generate

The mc batch generate command creates a basic YAML-formatted template file for the specified job type.

list

The mc batch list command outputs a list of the batch jobs currently in progress on a deployment.

start

The mc batch start command launches a batch job from a job batch YAML file.

status

The mc batch status command outputs summaries of job events on a MinIO server.

4.67 - mc batch list

Note

Changed: MinIO

RELEASE.2022-10-09T21-10-59Z or later

Syntax

The mc batch list command outputs a list of the batch jobs currently in progress on a deployment.

The following command outputs a list of all jobs currently in progress on the myminio alias.

mc batch list myminio

The command has the following syntax:

mc [GLOBALFLAGS] batch list TARGET           \
                            --type "string"
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The alias of the deployment for which you want to list jobs in progress.

--type

mc-cmd

Optional

List batch jobs only of a certain type.

Global Flags

This command supports any of the global flags.

Example

List all replicate type batch jobs

The following command lists the replicate type job(s) on the deployment at alias myminio:

mc batch list myminio --type "replicate"
  • Replace myminio with the alias of the MinIO deployment that should run the job.

  • Replace replicate with the job type to output.

    Currently, mc batch only supports the replicate job type.

The output of the above command is similar to the following:

ID                      TYPE            USER            STARTED
E24HH4nNMcgY5taynaPfxu  replicate       minioadmin      1 minute ago

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Permissions

You must have the admin:ListBatchJobs permission to list jobs on the deployment.

4.68 - mc idp ldap accesskey info

Description

The mc idp ldap accesskey info outputs information about the specified access key(s).

This command works against access keys created by an AD/LDAP user after authenticating to MinIO.

Create AD/LDAP service accounts with the mc idp ldap accesskey create command.

MinIO supports using AssumeRoleWithLDAPIdentity to generate temporary access keys using the Security Token Service.

The following example outputs details for the access key mykey from the minio deployment:

mc idp ldap accesskey info minio/ mykey

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap accesskey info      \
                                    ALIAS     \
                                    KEY       \
                                    [KEY2] ...
  • Replace ALIAS with the alias of a MinIO deployment configured for AD/LDAP integration.

  • Replace KEY with the access key to delete. You can list more than one access key by separating each key with a space.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment configured for AD/LDAP.

For example:

mc idp ldap accesskey ls minio
KEY

mc-cmd

Required

The configured access key to output information about.

You can list more than one access key by separating each key with a space.

Example

Output information about the access keys mykey and mykey2 from the minio deployment.

mc idp ldap accesskey info minio/ mykey mykey2

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.69 - mc idp ldap info

Description

The mc idp ldap info command outputs the current configuration for an AD/LDAP provider on a specified MinIO deployment.

The following example outputs the AD/LDAP configuration settings on the myminio deployment.

mc idp ldap info     \
            myminio

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap info   \
                          ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to retrieve info on the AD/LDAP integration.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment for which to output the current AD/LDAP configuration.

For example:

mc idp ldap info myminio

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.70 - mc ilm rule import

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm rule import replaces mc ilm import.

Syntax

The mc ilm rule import command imports an object lifecycle management configuration and applies it to a MinIO bucket.

The mc ilm rule import command imports from STDIN by default. You can input the contents from a .json file, such as one produced by mc ilm rule export.

The following command imports the lifecycle management configuration from mydata-lifecycle-config.json and applies it to the mydata bucket on the myminio deployment:

mc ilm rule import myminio/mydata < mydata-lifecycle-config.json

The command has the following syntax:

mc [GLOBALFLAGS] ilm rule import ALIAS < STDIN
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias and full path to the bucket on the MinIO deployment into which to import object lifecycle management rules. For example:

mc ilm rule import myminio/mydata < bucket-lifecycle.json

Global Flags

This command supports any of the global flags.

Examples

Import the Bucket Lifecycle Management Configuration

The following command imports the bucket lifecycle management configuration from the bucket-lifecycle.json file:

mc ilm rule import myminio/mybucket < bucket-lifecycle.json
mc ilm rule import ALIAS < file.json
  • Replace ALIAS with the alias of the MinIO deployment and the bucket into which to import object lifecycle management rules:

    myminio/mydata

  • Replace file.json with the name of the file from which to import the lifecycle management rules.

Required Permissions

For permissions required to import rules, refer to the required permissions on the parent command.

Behavior

Importing Configuration Overrides Existing Rules

mc ilm rule import replaces the current bucket lifecycle management rules with those defined in the imported JSON configuration.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.71 - mc ilm tier ls

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm tier ls replaces mc admin tier ls.

Description

The mc ilm tier ls command shows the remote tiers configured on a deployment.

The mc ilm tier list command has equivalent functionality to mc ilm tier ls.

Syntax

The command has the following syntax:

The following example outputs a list of the existing remote tiers on the myminio deployment.

 mc ilm tier ls myminio

The command has the following syntax:

mc ilm tier ls TARGET TIER_NAME

Parameters

The command accepts the following argument:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment on which the desired tier exists.

Global Flags

This command supports any of the global flags.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Required Permissions

For permissions required for reviewing a tier, refer to the required permissions on the parent command.

4.72 - mc replicate update

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc replicate update replaces the mc admin bucket remote update command.

Note

Changed: RELEASE.2022-11-07T23-47-39Z

mc replicate update replaces the mc replicate edit command.

Syntax

The mc replicate update command modifies an existing bucket replication rule.

mc [GLOBALFLAGS] replicate update FLAGS [FLAGS] ARGUMENTS [ARGUMENTS]

The following command modifies an existing replication rule for the mydata bucket on the myminio MinIO deployment:

mc replicate update --id "c76um9h4b0t1ijr36mug"           \
   --replicate "delete,delete-marker,existing-objects"  \
   myminio/mydata

The new replication configuration synchronizes all versioned delete operations, delete marker creation, and existing objects to the remote MinIO deployment.

The command has the following syntax:

mc [GLOBALFLAGS] replicate update              \
                 --remote-bucket string          \
                 [--bandwidth "string"]            \
                 [--healthcheck-seconds integer]   \
                 [--id "string"]                   \
                 [--limit-upload "string"]         \
                 [--limit-download "string"]       \
                 [--path "string"]                 \
                 [--priority int]                  \
                 [--proxy]
                 [--replicate "string"]            \
                 [--state string]
                 [--storage-class "string"]        \
                 [--sync string]                          \
                 [--tags "string"]                 \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment and full path to the bucket or bucket prefix on which to modify the replication rule. For example:

mc replicate update --id "c75nrap4b0talo3ipthg" [FLAGS]
--id

mc-cmd

Required

Specify the unique ID for a configured replication rule. Use the mc replicate ls command to list the replication rules for a bucket.

--bandwidth

mc-cmd

Optional

Limit bandwidth rates to no more than the specified rate in KiB/s, MiB/s, or GiB/s. Valid units include:

  • B for bytes
  • K for kilobytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit bandwidth rates to no more than 1 GiB/s, use the following:

--limit-upload 1Gi

If not specified, MinIO does not limit the bandwidth rate.

--healthcheck-seconds

mc-cmd

Optional

The length of time in seconds between checks on the health of the remote bucket.

If not specified, MinIO uses an interval of 60 seconds.

--limit-download

mc-cmd

Optional

Limit download rates to no more than a specified rate in KiB/s, MiB/s, or GiB/s. Valid units include:

  • B for bytes
  • K for kilobytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit download rates to no more than 1 GiB/s, use the following:

--limit-download 1G

If not specified, MinIO uses an unlimited download rate.

--limit-upload

mc-cmd

Optional

Limit upload rates to no more than the specified rate in KiB/s, MiB/s, or GiB/s. Valid units include:

  • B for bytes
  • K for kilobytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit upload rates to no more than 1 GiB/s, use the following:

--limit-upload 1G

If not specified, MinIO uses an unlimited upload rate.

--path

mc-cmd

Optional

Enable path-style lookup support for the remote bucket.

Valid values include:

  • on - use a path lookup to find the remote bucket
  • off - use a resource locator style (such as a domain or IP address) lookup to find the remote bucket
  • auto - ask MinIO to identify the correct type of lookup to use to find the remote bucket

When not defined, MinIO uses the auto value.

--priority

mc-cmd

Optional

Specify the integer priority of the replication rule. The value must be unique among all other rules on the source bucket. Higher values imply a higher priority than all other rules.

--proxy

mc-cmd

Optional

When defining active-active replication between buckets, do not proxy.

Valid values include:

  • enable - Enable proxying in active-active replication.
  • disable - Disable proxying in active-active replication.

By default, MinIO defaults to enable.

--remote-bucket

mc-cmd

Optional

Specify the credentials, destination deployment, and bucket of the remote location. Value may be an alias and bucket, location based (IP or URL), or path based.

For example, a URL based target might look like the following:

--remote-bucket https://user:[email protected]:9001/bucket

An alias based target might look like the following:

--remote-bucket minio-target/my-bucket
--replicate

mc-cmd

Optional

Specify a comma-separated list of the following values to enable extended replication features:

  • delete - Directs MinIO to replicate DELETE operations to the destination bucket.

  • delete-marker - Directs MinIO to replicate delete markers to the destination bucket.

  • replica-metadata-sync - Directs MinIO to synchronize metadata-only changes on a replicated object back to the source. This feature only effects two-way active-active replication configurations.

    Omitting this value directs MinIO to stop replicating metadata-only changes back to the source.

  • existing-objects - Directs MinIO to replicate objects created prior to configuring or enabling replication. MinIO by default does not synchronize existing objects to the remote target.

    See Replication of Existing Objects for more information.

--state

mc-cmd

Optional

Enables or disables the replication rule. Specify one of the following values:

  • "enable" - Enables the replication rule.
  • "disable" - Disables the replication rule.

Objects created while replication is disabled are not immediately eligible for replication after enabling the rule. You must explicitly enable replication of existing objects by including "existing-objects" to the list of replication features specified to mc replicate update --replicate.

See Replication of Existing Objects for more information.

--storage-class

mc-cmd

Optional

Specify the MinIO storage class to apply to replicated objects.

--sync

mc-cmd

Optional

Enable synchronous replication for this remote target.

By default, MinIO uses asynchronous replication.

--tags

mc-cmd

Optional

Specify one or more ampersand & separated key-value pair tags which MinIO uses for filtering objects to replicate. For example:

mc replicate update --id "ID" --tags "TAG1=VALUE&TAG2=VALUE&TAG3=VALUE"

MinIO applies the replication rule to any object whose tag set contains the specified replication tags.

Global Flags

This command supports any of the global flags.

Examples

Modify an Existing Replication Rule

Use mc replicate update to modify an existing replication rule.

mc replicate update ALIAS/PATH \
   --id ID                     \
   [--FLAGS]
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or bucket prefix on which the rule exists.
  • Replace ID with the unique identifier for the rule to modify. Use mc replicate ls to retrieve the list of replication rules on the bucket and their corresponding identifiers.
Note

Note

Modifying a replication configuration rule does not affect already replicated objects. For example, modifying the --tags filter does not result in the removal of replicated objects which do not meet the filter.

Update the Credentials for an Existing Replication Rule

Use mc replicate update to modify an existing replication rule.

mc replicate update ALIAS/PATH \
   --id ID                     \
   --remote-bucket https://user:[email protected]:9001/mybucket
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or bucket prefix on which the rule exists.
  • Replace ID with the updated credentials, path, and bucket.

Disable or Enable an Existing Replication Rule

Use mc replicate update with the --state flag to disable or enable a replication rule.

mc replicate update ALIAS/PATH \
   --id ID \
   --state "disable"|"enable"
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or bucket prefix on which the rule exists.
  • Replace ID with the unique identifier for the rule to modify. Use mc replicate ls to retrieve the list of replication rules on the bucket and their corresponding identifiers.
  • Specify either "disable" or "enable" to the --state flag to disable or enable the replication rule.
Note

Note

MinIO requires enabling existing object replication to synchronize objects written or removed after disabling a replication rule.

For rules without existing object replication, MinIO synchronizes only those write or delete operations issued while the replication rule is enabled.

Behavior

Required Permissions

MinIO strongly recommends creating users specifically for supporting bucket replication operations. See mc admin user and mc admin policy for more complete documentation on adding users and policies to a MinIO deployment.

The following policy provides permissions for configuring and enabling replication on a deployment.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "admin:SetBucketTarget",
                "admin:GetBucketTarget",
                "admin:ListBatchJobs",
                "admin:DescribeBatchJob",
                "admin:StartBatchJob",
                "admin:CancelBatchJob"
            ],
            "Effect": "Allow",
            "Sid": "EnableRemoteBucketConfiguration"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetReplicationConfiguration",
                "s3:ListBucket",
                "s3:ListBucketMultipartUploads",
                "s3:GetBucketLocation",
                "s3:GetBucketVersioning",
                "s3:GetObjectRetention",
                "s3:GetObjectLegalHold",
                "s3:PutReplicationConfiguration"
            ],
            "Resource": [
                "arn:aws:s3:::*"
            ],
            "Sid": "EnableReplicationRuleConfiguration"
        }
    ]
}
  • The "EnableRemoteBucketConfiguration" statement grants permission for creating a remote target for supporting replication.
  • The "EnableReplicationRuleConfiguration" statement grants permission for creating replication rules on a bucket. The "arn:aws:s3:::* resource applies the replication permissions to any bucket on the source deployment. You can restrict the user policy to specific buckets as-needed.

Use the mc admin policy create to add this policy to each deployment acting as a replication source. Use mc admin user add to create a user on the deployment and mc admin policy attach to associate the policy to that new user.

The following policy provides permissions for enabling synchronization of replicated data into the deployment.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetReplicationConfiguration",
                "s3:ListBucket",
                "s3:ListBucketMultipartUploads",
                "s3:GetBucketLocation",
                "s3:GetBucketVersioning",
                "s3:GetBucketObjectLockConfiguration",
                "s3:GetEncryptionConfiguration"
            ],
            "Resource": [
                "arn:aws:s3:::*"
            ],
            "Sid": "EnableReplicationOnBucket"
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:GetReplicationConfiguration",
                "s3:ReplicateTags",
                "s3:AbortMultipartUpload",
                "s3:GetObject",
                "s3:GetObjectVersion",
                "s3:GetObjectVersionTagging",
                "s3:PutObject",
                "s3:PutObjectRetention",
                "s3:PutBucketObjectLockConfiguration",
                "s3:PutObjectLegalHold",
                "s3:DeleteObject",
                "s3:ReplicateObject",
                "s3:ReplicateDelete"
            ],
            "Resource": [
                "arn:aws:s3:::*"
            ],
            "Sid": "EnableReplicatingDataIntoBucket"
        }
    ]
}
  • The "EnableReplicationOnBucket" statement grants permission for a remote target to retrieve bucket-level configuration for supporting replication operations on all buckets in the MinIO deployment. To restrict the policy to specific buckets, specify those buckets as an element in the Resource array similar to "arn:aws:s3:::bucketName".
  • The "EnableReplicatingDataIntoBucket" statement grants permission for a remote target to synchronize data into any bucket in the MinIO deployment. To restrict the policy to specific buckets, specify those buckets as an element in the Resource array similar to "arn:aws:s3:::bucketName/*".

Use the mc admin policy create to add this policy to each deployment acting as a replication target. Use mc admin user add to create a user on the deployment and mc admin policy attach to associate the policy to that new user.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.73 - mc support perf

Note

Changed: RELEASE.2022-07-24T02-25-13Z

mc support perf replaces the mc admin speedtest command.

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Description

Use the mc support perf command to review the performance of the S3 API (read/write), network IO, and storage (drive read/write).

The resulting tests can provide general guidance of deployment performance under S3 GET and PUT requests and identify any potential bottlenecks. For more complete performance testing, consider using a combination of load-testing using your staging application environments and the MinIO WARP S3 benchmarking tool.

mc support perf has the following subcommands

  1. drive

    Measure the speed of drives in a MinIO deployment.

    mc support perf drive temporarily suspends S3 API calls during the test. Incoming requests are held in a queue while the command runs. When the command completes or ends, MinIO processes the queued requests and resumes normal operations.

  2. object

    Measure the speed of reading and writing objects in a cluster.

  3. net

    Measure the network throughput of all nodes.

    mc support perf net temporarily suspends S3 API calls during the test. Incoming requests are held in a queue while the command runs. When the command completes or ends, MinIO processes the queued requests and resumes normal operations.

  4. client

    Measure the network throughput to a client.

  5. site-replication

    Measure the speed of site replication operations.

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Examples

Measure Speed of an Object

Measure the performance of S3 read/write of an object on the alias minio1. MinIO autotunes concurrency to obtain maximum throughput and IOPS (Input/Output Per Second).

mc support perf object minio1

Measure Speed of an Object of a Specific Size for a Specific Duration

Run object the S3 read/write performance of an object for 20 seconds with object size of 128MiB on alias minio1. MinIO autotunes concurrency to obtain maximum throughput.

mc support perf object minio1 --duration 20s --size 128MiB

Test Speed of All Drives on All Nodes with Default Specifications

Run drive read/write performance measurements on all drive on all nodes for a cluster with alias minio1. The command does not specify the blocksize, so the default of 4MiB is used.

mc support perf drive minio1

Test Drive Speed Measurements with Custom Specifications

Run drive read/write performance measurements on a cluster with alias minio1 specifying a blocksize of 64KiB and data read/written from each drive of 2GiB.

mc support perf drive minio1 --blocksize 64KiB --filesize 2GiB

Test Network Throughput

Run a network throughput test on a cluster with alias minio1.

mc support perf net minio1

Test Site Replication Speed

Run a test on the speed of site replication operations from the minio1 site to other configured peers.

mc support perf site-replication minio1

Syntax

mc support perf drive

mc-cmd

Measure the read/write speed of the drives in a cluster.

mc [GLOBAL FLAGS] support perf drive   \
                [--concurrent]         \
                [--verbose, -v]        \
                [--filesize]           \
                [--blocksize]          \
                [--serial]             \
                [--airgap]             \
                ALIAS

mc support perf object

mc-cmd

Measure the S3 performance of reading and writing objects in a cluster.

mc [GLOBAL FLAGS] support perf object  \
                [--size]               \
                [--concurrent]         \
                [--verbose, -v]        \
                [--airgap]             \
                ALIAS

mc support perf net

mc-cmd

Measure the network throughput of all nodes in a cluster.

mc [GLOBAL FLAGS] support perf net  \
                [--concurrent]      \
                [--verbose, -v]     \
                [--serial]          \
                [--airgap]          \
                ALIAS

mc support perf client

mc-cmd

Measure the network throughput from the local device running the MinIO Client to the server.

mc [GLOBAL FLAGS] support perf client  \
                --duration             \
                [--verbose, -v]        \
                [--airgap]             \
                ALIAS

mc support perf site-replication

mc-cmd

Measure the speed of site replication operations from the specified ALIAS to other configured peers.

mc [GLOBAL FLAGS] support perf site-replication \
                  --duration                    \
                  [--verbose, -v]               \
                  ALIAS

Parameters

--airgap

mc-cmd

Optional

Use in environments without network access to SUBNET (for example, airgapped, firewalled, or similar configuration).

If the deployment is airgapped, but the local device where you are using the minio client has network access, you do not need to use the --airgap flag.

--size

mc-cmd

Optional

Applies to the object command.

Specify the size of the object to use for upload and download performance test.

If not specified, the default value is 64MiB.

Use --size <value> where <value> is a number and the storage unit, KiB, MiB, or GiB.

--concurrent

mc-cmd

Optional

Applies to the drive, object, and net commands.

Specify the number of concurrent requests to test per server.

If not specified, the default value is 32.

Use --concurrent <value> where <value> is a number.

--verbose, -v

mc-cmd

Optional

Applies to the drive, object, and net commands.

Show per-server stats in the output.

--filesize

mc-cmd

Optional

Applies to the drive command.

Specify the total size of data to read or write to each drive.

If not specified, the default value is 1GiB.

Use --filesize <value> where <value> is a number and storage unit, KiB, MiB, or GiB.

--blocksize

mc-cmd

Optional

Applies to the drive command.

Specify the read/write block size.

If not specified, the default value is 4MiB.

Use --filesize <value> where <value> is a number and a storage unit, using standard storage unit abbreviations.

--serial

mc-cmd

Optional

Applies to the drive and net commands.

Run performance tests on drive(s) one by one.

ALIAS

mc-cmd

Required

Applies to the drive, object, net, and client commands.

The alias of the MinIO deployment.

--duration

mc-cmd

Required

Applies to the client command.

Length of time in seconds to perform the test. Time cannot be 0 or negative.

Global Flags

This command supports any of the global flags.

4.74 - mc support top net

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Syntax

The mc support top net command displays realtime network metrics.

The following command displays the current realtime network metrics for the alias myminio deployment.

mc support top net myminio/

The output returns information such as the server URL, network interface, receive rate, transmit rate, and system messages.

The command has the following syntax:

mc [GLOBALFLAGS] support top disk                \
                             [--interval value]  \
                             TARGET
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The full path to the alias or prefix where the command should run.

--interval

mc-cmd

Optional

The interval in seconds between metric requests.

By default, the command requests metrics every second.

Global Flags

This command supports any of the global flags.

4.75 - mc alias export

Note

Added: mc.RELEASE.2023-11-15T22-45-58Z

Syntax

The mc alias export command exports an alias configuration from the existing configuration.

The command outputs the result to STDOUT where you can either capture the output as a file or perform further modifications to the output as necessary.

Use the mc alias import command to import the resulting JSON configuration.

The following command exports an alias configuration from the existing host and outputs it to a file:

mc alias export play > play.json

The command outputs the file to Standard Out (STDOUT). You can alternatively pipe the output to a utility of your choice for further operations.

The mc alias export command has the following syntax:

mc [GLOBALFLAGS] alias export ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The name of the alias to export.

Global Flags

This command supports any of the global flags.

Behavior

JSON Format

The command outputs a JSON object with the following schema:

{
   "url" : "https://hostname:port",
   "accessKey": "<STRING>",
   "secretKey": "<STRING>",
   "api": "s3v4",
   "path": "auto"
}

You can use the mc alias import to import the JSON document.

Examples

Export and Transform an Alias

The following example exports the alias for the play.min.io sandbox. It then transforms the configuration using the jq utility and creates a new alias from the modified configuration:

mc alias export play | jq '.accessKey = "minioadmin" | .secretKey = "minioadmin"' | mc alias import play-custom

Back Up An Alias Configuration

The following command exports an alias configuration to a JSON file. You can then back up that file using your preferred process.

mc alias export play > play-backup.json

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.76 - mc anonymous get-json

Syntax

The mc anonymous get-json command gets anonymous (i.e. unauthenticated or public) access policies for a bucket.

Buckets with anonymous policies allow clients to access the bucket contents and perform actions consistent with the specified policy without authentication.

The following command retrieves the JSON-formatted anonymous policy for the mydata bucket on the myminio MinIO deployment:

mc anonymous get-json myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] get-json ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The full path to the bucket or bucket prefix for which to get the anonymous bucket policy.

Specify the alias of the MinIO or other S3-compatible service and the full path to the bucket or bucket prefix. For example:

mc anonymous get-json public play/mybucket

Global Flags

This command supports any of the global flags.

Examples

Get Anonymous Policy for Bucket

Use mc anonymous get-json to get the anonymous policy for a bucket:

mc anonymous get-json ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the destination bucket.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.77 - mc batch start

Note

Changed: MinIO

RELEASE.2022-10-09T21-10-59Z or later

Syntax

The mc batch start command launches a batch job from a job batch YAML file.

The batch job runs to completion (or up to the number of retries specified in the file) one time. To run the batch job again after completion, you must start it again.

The following command creates a basic YAML file for a replicate job on the mybucket bucket of the myminio alias.

mc batch start myminio jobfile.yaml

The output of the above command is something similar to:

Successfully start 'replicate' job `B34HHqnNMcg1taynaPfxu` on '2022-10-24 17:19:06.296974771 -0700 PDT'

The command has the following syntax:

mc [GLOBALFLAGS] batch start    \
                       ALIAS   \
                       JOBFILE
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias on which to start the batch job.

For example:

mc batch start myminio replicate.yaml
JOBFILE

mc-cmd

Required

A YAML-defined batch job. The job may have as many tasks as desired; there is no predefined limit.

Global Flags

This command supports any of the global flags.

Example

Start a Batch Job

The following command starts the batch of job(s) defined in the file replication.yaml on the deployment at alias myminio:

mc batch start myminio ./replication.yaml
  • Replace myminio with the alias of the MinIO deployment that should run the job.
  • Replace ./replication.yaml with the yaml-formatted file that describes the batch job. Use the file path relative to your current location.

The output of the above command is similar to the following:

Successfully start 'replicate' job `E24HH4nNMcgY5taynaPfxu` on '2022-09-26 17:19:06.296974771 -0700 PDT'

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Permissions

You must have the admin:StartBatchJob permission on the deployment to start jobs.

4.78 - mc cat

Syntax

The mc cat command concatenates the contents of a file or object to another file or object. You can also use the command to display the contents of the specified file or object to STDOUT. cat has similar functionality to cat.

The following command concatenates the contents of an object on a MinIO deployment to STDOUT:

mc cat play/mybucket/myobject.txt

The mc cat command has the following syntax:

mc [GLOBALFLAGS] cat                       \
                 ALIAS [ALIAS ...]         \
                 [--enc-c "value"]         \
                 [--offset "int"]          \
                 [--part-number "int"]     \
                 [--rewind]                \
                 [--tail "int"]            \
                 [--version-id "string"]   \
                 [--zip]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

You can also use mc cat against a local filesystem to produce similar results to the cat commandline tool.

Parameters

ALIAS

mc-cmd

Required

The alias of a MinIO deployment and the full path to the object. For example:

mc cat myminio/mybucket/myobject.txt

You can specify multiple objects on the same or different MinIO deployment. For example:

mc cat myminio/mybucket/object.txt myminio/myotherbucket/object.txt

For an object on a local filesystem, specify the full path to that object. For example:

mc cat ~/data/object.txt
--enc-c

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

  • KEY - the full path to the object as alias/bucket/path/object.
  • VALUE - the 32-byte RAW Base64-encoded data key to use for encrypting object(s).

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"
Note

Note

MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.

--offset

mc-cmd

Optional

Specify an integer that is the number of bytes from which the command offsets the output.

Mutually exclusive with the --part-number flag.

--part-number

mc-cmd

Optional

Download a specific part number of a multi-part upload. Specify the integer of the part number to download.

Mutually exclusive with the --offset and --tail flags.

--rewind

mc-cmd

Optional

Directs mc cat to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--tail

mc-cmd

Optional

Specify an integer that is the number of bytes from which the command trims the output.

Mutually exclusive with the --part-number flag.

--version-id, vid

mc-cmd

Optional

Directs mc cat to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--zip

mc-cmd

Optional

Extracts the contents from a zip file on the source to the remote. Requires a MinIO deployment as the source ALIAS.

Global Flags

This command supports any of the global flags.

Examples

View an S3 Object

Use mc cat to return the object:

mc cat ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the object on the S3-compatible host.

View an S3 Object at a Point-In-Time

Use mc cat --rewind to return the object at a specific point-in-time in the past:

mc cat ALIAS/PATH --rewind DURATION
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the object on the S3-compatible host.
  • Replace DURATION with the point-in-time in the past at which the command returns the object. For example, specify 30d to return the version of the object 30 days prior to the current date.
Note

Requires Versioning

mc cat requires bucket versioning to use this feature. Use mc version to enable versioning on a bucket.

View an S3 Object with Specific Version

Use mc cat --version-id to return a specific version of the object:

mc cat ALIAS/PATH --version-id VERSION
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the object on the S3-compatible host.
  • Replace VERSION with the specific version of the object to return.
Note

Requires Versioning

mc cat requires bucket versioning to use this feature. Use mc version to enable versioning on a bucket.

Download a particular part

Use mc cat --part-number to download a particular part of a multi-part upload:

mc cat ALIAS/PATH --part-number=#
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the object on the S3-compatible host.
  • Replace # with the integer of the part number to download. For example, to download part 3 of at 16-part multi-part file, use --part-number=3.

You cannot use the --part-number flag if you are using either the --offset or the --tail flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.79 - mc idp ldap accesskey ls

Description

The mc idp ldap accesskey ls displays a list of LDAP access key pairs.

mc idp ldap accesskey ls is also known as mc idp ldap accesskey list.

This command works against access keys created by an AD/LDAP user after authenticating to MinIO.

Create AD/LDAP service accounts with the mc idp ldap accesskey create command.

MinIO supports using AssumeRoleWithLDAPIdentity to generate temporary access keys using the Security Token Service.

The following example returns a list of access keys associated with the authenticated user on the minio alias:

mc idp ldap accesskey ls minio/

If the authenticated user has the admin:ListUsers permission, the example command returns a list of all users and their associated access keys.

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap accesskey ls           \
                                 ALIAS           \
                                 [--all]         \
                                 [--self]        \
                                 [--svcacc-only] \
                                 [--temp-only]   \
                                 [--users-only]  \
                                 [DN] ...
  • Replace ALIAS with the alias of a MinIO deployment configured for AD/LDAP integration.

  • Replace DN with the string of a user’s distinguished name. You may list multiple distinguished names by separating each with a space.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment configured for AD/LDAP.

For example:

mc idp ldap accesskey ls minio
--all

mc-cmd

Optional

Note

Added: mc

RELEASE.2024-07-31T15-58-33Z

List all access keys for all LDAP users.

--self

mc-cmd

Optional

Note

Added: mc

RELEASE.2024-07-31T15-58-33Z

List access keys for the currently authenticated user.

--svcacc-only

mc-cmd

Optional

Output only service account access keys.

Mutually exclusive with --temp-only.

--temp-only

mc-cmd

Optional

Output only temporary access keys.

Mutually exclusive with --svcacc-only.

--users-only

mc-cmd

Optional

Output only the user distinguished names.

Examples

List All Access Keys

To return a list of all access keys, you must first authenticate as the admin user. Once authenticated, the following command returns all AD/LDAP access keys on the minio deployment.

mc idp ldap accesskey ls minio
Note

Note

If the user does not have the admin:ListUsers permission, the command returns a list of access keys for the authenticated user only.

List User Distinguished Names

To return a list of DNs for a deployment, you must first authenticate as a user with the admin:ListUsers permission. Once authenticated, the following command outputs the AD/LDAP distinguished names on the minio deployment.

mc idp ldap accesskey ls minio --users-only

List Temporary Access Keys

To return a list of all temporary access keys for a deployment, you must first authenticate as a user with the admin:ListUsers permission. Once authenticated, the following command outputs a list of distinguished names with their associated temporary access keys.

mc idp ldap accesskey ls minio --temp-only

List a User’s Access Keys

The following command returns the AD/LDAP access keys for the user bobfisher on the minio deployment.

mc idp ldap accesskey list minio/ uid=bobfisher,dc=min,dc=io

List Access Keys for Multiple Users

The following command returns the AD/LDAP access keys for the users bobfisher and cody3 on the minio deployment.

mc idp ldap accesskey list minio/ uid=bobfisher,dc=min,dc=io uid=cody3,dc=min,dc=io

List Access Keys for Authenticated User

The following command returns the AD/LDAP access keys for the currently authenticated user on the minio deployment.

mc idp ldap accesskey list minio/
Note

Note

If the authenticated user has the admin:ListUsers permission, the command returns a list of all users and access keys on the deployment.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.80 - mc idp ldap ls

Description

The mc idp ldap ls command lists the existing set of configurations for an AD/LDAP provider.

mc idp ldap ls is also known as mc idp ldap list.

The following example lists the AD/LDAP configuration settings for the myminio deployment.

mc idp ldap ls       \
            myminio

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap ls     \
                          ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to list the AD/LDAP integration.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment for which to output the current AD/LDAP configuration.

For example:

mc idp ldap ls myminio

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.81 - mc ilm rule ls

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm rule ls replaces mc ilm ls.

Note

Changed: RELEASE.2023-05-26T23-31-54Z

mc ilm rule ls --json output includes the policy modification time in updateAt.

Syntax

The mc ilm rule ls command summarizes all configured object lifecycle management rules on a MinIO bucket in a tabular format.

The mc ilm rule list command has equivalent functionality to mc ilm rule ls.

The following command lists all lifecycle management rules for the mydata bucket on the myminio MinIO deployment:

mc ilm rule ls myminio/mydata

The output of the command might resemble the following:

┌───────────────────────────────────────────────────────────────────────────────┐
│ Transition for latest version (Transition)├────────┬─────────┬────────┬─────────────────────┬──────────────┬──────────────┤
│ ID     │ STATUS  │ PREFIX │ TAGS                │ DAYS TO TIER │ TIER         │
├────────┼─────────┼────────┼─────────────────────┼──────────────┼──────────────┤
│ rule-1 │ Enabled │ doc/   │ key1=val1&key2=val2 │            0 │ WARM-MINIO-1 │
└────────┴─────────┴────────┴─────────────────────┴──────────────┴──────────────┘
┌────────────────────────────────────────────────────────────────┐
│ Transition for older versions (NoncurrentVersionTransition)├────────┬─────────┬────────┬──────┬──────────────┬──────────────┤
│ ID     │ STATUS  │ PREFIX │ TAGS │ DAYS TO TIER │ TIER         │
├────────┼─────────┼────────┼──────┼──────────────┼──────────────┤
│ rule-2 │ Enabled │ logs/  │ -    │           10 │ WARM-MINIO-1 │
└────────┴─────────┴────────┴──────┴──────────────┴──────────────┘
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ Expiration for latest version (Expiration)├────────┬─────────┬────────┬─────────────────────┬────────────────┬─────────────────────┤
│ ID     │ STATUS  │ PREFIX │ TAGS                │ DAYS TO EXPIRE │ EXPIRE DELETEMARKER │
├────────┼─────────┼────────┼─────────────────────┼────────────────┼─────────────────────┤
│ rule-1 │ Enabled │ doc/   │ key1=val1&key2=val2 │             30false└────────┴─────────┴────────┴─────────────────────┴────────────────┴─────────────────────┘
┌──────────────────────────────────────────────────────────────────────────────────┐
│ Expiration for older versions (NoncurrentVersionExpiration)├────────┬─────────┬────────┬─────────────────────┬────────────────┬───────────────┤
│ ID     │ STATUS  │ PREFIX │ TAGS                │ DAYS TO EXPIRE │ KEEP VERSIONS │
├────────┼─────────┼────────┼─────────────────────┼────────────────┼───────────────┤
│ rule-1 │ Enabled │ doc/   │ key1=val1&key2=val2 │             150│ rule-2 │ Enabled │ logs/  │ -                   │              13└────────┴─────────┴────────┴─────────────────────┴────────────────┴───────────────┘

The mc ilm rule ls command has the following syntax:

mc [GLOBALFLAGS] ilm rule ls     \
                 [--expiry]      \
                 [--transition]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias and full path to the bucket on the MinIO deployment for which to list the object lifecycle management rules. For example:

mc ilm rule ls myminio/mydata
--expiry

mc-cmd

Optional

mc ilm rule ls returns only fields related to lifecycle rule expiration.

Mutually exclusive with --transition.

--transition

mc-cmd

Optional

mc ilm rule ls returns only fields related to lifecycle rule transition.

Mutually exclusive with --expiry.

Global Flags

This command supports any of the global flags.

Examples

List Bucket Lifecycle Management Rules

Use mc ilm rule ls to list a bucket’s lifecycle management rules:

mc ilm rule ls ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket on the S3-compatible host.

Show Policy Modification Time

Use mc ilm rule ls with :option::–json <mc.–json> to show the time the policy for a bucket was last updated.

mc ilm rule ls ALIAS/PATH --json
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket on the S3-compatible host.

The updateAt property in the JSON output contains the date and time the policy was updated.

The output resembles the following:

{
 "status": "success",
 "target": "myminio/mybucket",
 "config": {
  "Rules": [
   {
    "Expiration": {
     "Days": 30
    },
    "ID": "ci1o2mg0sko6f1r3krv0",
    "Status": "Enabled"
   }
  ]
 },
 "updatedAt": "2023-06-09T19:45:30Z"
}

Required Permissions

For permissions required to list rules, refer to the required permissions on the parent command.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.82 - mc ilm tier rm

Description

The mc ilm tier rm command removes an remote tier that has not been used to transition any objects.

The mc ilm tier remove command has equivalent functionality to mc ilm tier rm

Note

Note

Once a tier has transitioned objects, it cannot be removed.

Required Permissions

MinIO requires the following permissions scoped to the bucket or buckets for which you are creating lifecycle management rules.

MinIO also requires the following administrative permissions on the cluster in which you are creating remote tiers for object transition lifecycle management rules:

For example, the following policy provides permission for configuring object transition lifecycle management rules on any bucket in the cluster:.

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "admin:SetTier",
               "admin:ListTier"
            ],
            "Effect": "Allow",
            "Sid": "EnableRemoteTierManagement"
      },
      {
            "Action": [
               "s3:PutLifecycleConfiguration",
               "s3:GetLifecycleConfiguration"
            ],
            "Resource": [
                        "arn:aws:s3:::*"
            ],
            "Effect": "Allow",
            "Sid": "EnableLifecycleManagementRules"
      }
   ]
}

Syntax

The command has the following syntax:

The following example removes an existing remote tier called WARM-TIER on the myminio deployment. No objects have transitioned to the WARM-TIER tier.

 mc ilm tier rm myminio WARM-TIER

The command has the following syntax:

mc ilm tier info TARGET TIER_NAME

Parameters

The command accepts the following arguments:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment on which the desired tier exists.

TIER_NAME

mc-cmd

Required

The name of an existing remote tier to remove.

You must specify the tier in all-caps, e.g. WARM_TIER.

No object can have transitioned to the tier.

Global Flags

This command supports any of the global flags.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Required Permissions

For permissions required to remove a tier, refer to the required permissions on the parent command.

4.83 - mc replicate resync

Syntax

The mc replicate resync command resynchronizes all objects in the specified MinIO bucket to a remote replication target.

This command requires first configuring the remote bucket target using the mc replicate add command. You must specify the resulting remote ARN as part of running mc replicate resync.

This command supports rebuilding a MinIO deployment using an active-active replication remote as the “backup” source. See the following tutorials for more information on active-active replication:

The following command resynchronizes the content of the mydata bucket on the myminio MinIO deployment to the remote MinIO deployment associated to the specified --remote-bucket:

mc replicate resync start \
   --remote-bucket "arn:minio:replication::d3c086c7-1d64-40c2-954b-fe8222907033:mydata" \
   myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] replicate resync start|status  \
                 --remote-bucket "string"       \
                 [--older-than "string"]        \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment and full path to the bucket or bucket prefix which MinIO uses as the replication source. For example, the following command starts replication using the data bucket on the MinIO deployment associated to the primary alias.

mc replicate resync start primary/data --remote-bucket "ARN"
start

mc-cmd

Required

Starts the resynchronization procedure using the specified bucket as the source and the --remote-bucket as the remote target.

Mutually exclusive with mc replicate resync status.

status

mc-cmd

Required

Returns the status of resynchronization on the specified bucket to all remote targets.

Include the --remote-bucket argument to filter the status output to only the specified remote target.

--remote-bucket

mc-cmd

Required

Specify the ARN for the destination deployment and bucket.

You can retrieve the ARN using mc replicate ls with the --json option. The rule.Destination.Bucket field contains the ARN for any given replication rule.

older-than

mc-cmd

Optional

Specify a duration in days where MinIO only resynchronizes objects older than the specified duration.

Only valid with mc replicate resync start.

Global Flags

This command supports any of the global flags.

Examples

Resynchronize Remote Replication Target from Source Bucket

The following mc replicate resync command resynchronizes all objects on the specified source bucket to the remote target regardless of their replication status:

mc replicate resync start --remote-bucket "arn:minio:replication::UUID:data" primary/data
  • Replace primary/data with the ALIAS and full bucket path for which to create the replication configuration.
  • Replace the --remote-bucket value with the ARN of the remote target. Use mc replicate ls to list all configured remote replication targets.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.84 - mc support profile

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Description

mc support profile runs a system profile for your deployment. The results of the profile can provide insight into the MinIO server process running on a given node.

The resulting report is intended for use by MinIO Engineering. You can upload the report to MinIO SUBNET. Independent or third-party use of these profiles for diagnostics and remediation is done at your own risk.

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Examples

Fetch CPU Profiling

This command retrieves the CPU profile on a MinIO deployment with the alias minio1. The profile runs for the default of 10 seconds.

mc support profile --type cpu minio1/

Fetch CPU, Memory, and Block Profiling Concurrently

This command fetches the profile of the CPU, memory, and block usage on the alias minio2. The profile runs for the default of 10 seconds.

mc support profile --type cpu,mem,block minio2/

Fetch CPU, Memory, and Block Profiling Concurrently for 10 Minutes

This command fetches the profile of the CPU, memory, and block on the alias minio3. The profile runs for 10 minutes (600 seconds).

mc support profile --type cpu,mem,block --duration 600 minio3/

Syntax

The mc support profile command has the following syntax:

mc [GLOBALFLAGS] support profile       \
                         COMMAND       \
                         [--type]      \
                         [--airgap]    \
                         [--duration]  \
                         ALIAS

Parameters

--duration

mc-cmd

Optional

Run profiling for the specified duration in seconds.

Use --type <value> where <value> is the number of seconds for the profile to run.

If not specified, the command collects data for 10 seconds.

--type

mc-cmd

Optional

Specify the profile(s) to gather data for.

Use --type <value> where <value> is one or more comma-separated types of data to collect.

Valid types are:

  • cpu
  • cpuio
  • mem
  • block
  • mutex
  • trace
  • threads
  • goroutines

If not specified, the command collects data for CPU, memory, block, mutex, threads, and goroutines.

Warning

Important

Do not use the cpuio or trace data types unless directed to by MinIO Support. These profiles require significant resources and may degrade cluster performance if used without guidance.

--airgap

mc-cmd

Optional

Use in environments without network access to SUBNET (for example, airgapped, firewalled, or similar configuration).

If the deployment is airgapped, but the local device where you are using the minio client has network access, you do not need to use the --airgap flag.

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

Global Flags

This command supports any of the global flags.

4.85 - mc support top rpc

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Syntax

The mc support top rpc command displays metrics for remote procedure calls (RPC).

The following command displays the current remote procedure call metrics for the alias myminio deployment.

mc support top rpc myminio/

The output returns information such as the server, number of connections, length of ping, time since last ping (pong), reconnections, string in, string out, messages in, and messages out.

The output resembles

λ mc support top rpc myminio
      SERVER            CONCTD  PING     PONG   OUT.Q   RECONNS STR.IN  STR.OUT MSG.IN  MSG.OUT
 To  127.0.0.1:9002       5     0.7ms   1s ago    0        0     ->0      0->    3269    3212
From 127.0.0.1:9002       5     1.1ms   1s ago    0        0     ->0      0->    3213    3269
 To  127.0.0.1:9003       5     0.6ms   1s ago    0        0     ->0      0->    6001    6076
From 127.0.0.1:9003       5     0.6ms   1s ago    0        0     ->0      0->    6077    6001
 To  127.0.0.1:9004       5     0.6ms   1s ago    0        0     ->0      0->    3243    3160
From 127.0.0.1:9004       5     0.4ms   1s ago    0        0     ->0      0->    3161    3243
 To  127.0.0.1:9005       5     0.6ms   1s ago    0        0     ->0      0->    3150    3094
From 127.0.0.1:9005       5     0.3ms   1s ago    0        0     ->0      0->    3095    3150
 To  127.0.0.1:9006       5     0.3ms   1s ago    0        0     ->0      0->    3185    3221
From 127.0.0.1:9006       5     0.6ms   1s ago    0        0     ->0      0->    3222    3185

The command has the following syntax:

mc [GLOBALFLAGS] support top rpc                 \
                             [--airgap]          \
                             [--in value]        \
                             [--interval value]  \
                             [-n value]          \
                             [--nodes value]     \
                             TARGET
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The full path to the alias or prefix where the command should run.

--airgap

mc-cmd

Optional

Use in environments without network access to SUBNET.

--in

mc-cmd

Optional

Replay a previously saved JSON file. Specify the path to the JSON file to replay, such as one generated by a previous run of this command.

--interval

mc-cmd

Optional

The interval in seconds between metric requests.

By default, the command requests metrics every second.

-n

mc-cmd

Optional

The number of requests to run before existing. Use 0 for endless.

If not specified, the command does not automatically exit.

--nodes

mc-cmd

Optional

Comma-separated list of the node or nodes from which to collect metrics.

Global Flags

This command supports any of the global flags.

4.86 - mc anonymous set-json

Syntax

The mc anonymous set-json command sets anonymous (that is, unauthenticated or public) access policies for a bucket using an IAM JSON policy document.

Buckets with anonymous policies allow clients to access the bucket contents and perform actions consistent with the specified policy without authentication.

The following command applies the JSON-formatted anonymous policy to the mydata bucket on the myminio MinIO deployment:

mc anonymous set-json ~/mydata-anonymous.json myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] set-json POLICY ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

POLICY

mc-cmd

Required The path to the JSON-formatted policy to assign to the specified ALIAS.

ALIAS

mc-cmd

Required The full path to the bucket or bucket prefix to which the command applies the specified POLICY.

Specify the alias of the MinIO or other S3-compatible service and the full path to the bucket or bucket prefix. For example:

mc anonymous set-json public play/mybucket

Global Flags

This command supports any of the global flags.

Examples

Set Anonymous Policy for Bucket

Use mc anonymous set-json to set the anonymous policy for a bucket:

mc anonymous set-json POLICY ALIAS/PATH
  • Replace POLICY with a supported POLICY.
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the destination bucket.

Remove Anonymous Policy for Bucket

Use mc anonymous set to clear the anonymous policy for a bucket:

mc anonymous set none ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the destination bucket.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.87 - mc batch status

Note

Changed: MinIO

RELEASE.2022-10-09T21-10-59Z or later

Syntax

The mc batch status command outputs summaries of job events on a MinIO server.

Note

Changed: mc

RELEASE.2024-07-03T20-17-25Z

Batch status displays summaries for active, in-progress jobs or any batch job completed in the previous three (3) days.

The following command outputs the status of the specified job with JobID KwSysDpxcBU9FNhGkn2dCf currently in progress on the myminio alias.

mc batch status myminio "KwSysDpxcBU9FNhGkn2dCf"

The command has the following syntax:

mc [GLOBALFLAGS] batch list TARGET           \
                            ["JOBID"]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The alias for which to display batch job statuses.

JOBID

mc-cmd

Optional

The unique identifier of a job to summarize. To find the ID of a job, use mc batch list.

If not specified, the command returns a summary for the current active batch job.

Global Flags

This command supports any of the global flags.

Example

Summarize the Events of an Active Replicate Job

The following command provides the real-time summary of an active job on the deployment at alias myminio:

mc batch status myminio "KwSysDpxcBU9FNhGkn2dCf"
  • Replace myminio with the alias of the MinIO deployment that should run the job.

The output of the above command is similar to the following:

●∙∙
JobType:        replicate
Objects:        28766
Versions:       28766
FailedObjects:  0
Transferred:    406 MiB
Elapsed:        2m14.227222868s
CurrObjName:    share/doc/xml-core/examples/foo.xmlcatalogs

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.88 - mc cp

Syntax

The mc cp command copies objects to or from a MinIO deployment, where the source can MinIO or a local filesystem.

You can also use mc cp against the local filesystem to produce similar results to the cp commandline tool.

Note

Note

mc cp only copies the latest version or the specified version of an object without any version information or modification date. To copy all versions, version information, and related metadata, use mc replicate add or mc admin replicate.

The following command copies files from a local filesystem directory to the mydata bucket on the myminio MinIO deployment:

mc cp --recursive ~/mydata/ myminio/mydata/

The mc cp command has the following syntax:

mc [GLOBALFLAGS] cp                                                        \
                 [--attr "string"]                                         \
                 [--disable-multipart]                                     \
                 [--enc-kms "string"]                                      \
                 [--enc-s3 "string"]                                       \
                 [--enc-c "string"]                                        \
                 [--legal-hold "on"]                                       \
                 [--limit-download string]                                 \
                 [--limit-upload string]                                   \
                 [--md5]                                                   \
                 [--newer-than "string"]                                   \
                 [--older-than "string"]                                   \
                 [--preserve]                                              \
                 [--recursive]                                             \
                 [--retention-mode "string" --retention-duration "string"] \
                 [--rewind "string"]                                       \
                 [--storage-class "string"]                                \
                 [--tags "string"]                                         \
                 [--version-id "string"]                                   \
                 [--zip]                                                   \
                 SOURCE [SOURCE ...]                                       \
                 TARGET
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

SOURCE

mc-cmd

Required

The object or objects to copy.

For copying an object from MinIO, specify the alias and the full path to that object (e.g. bucket and path to object). For example:

mc cp play/mybucket/object.txt ~/mydata/object.txt

Specify multiple SOURCE paths to copy multiple objects to the specified TARGET. mc cp treats the last specified alias or filesystem path as the TARGET. For example:

mc cp ~/data/object.txt myminio/mydata/object.txt play/mydata/

For copying an object from a local filesystem, specify the full path to that object. For example:

mc cp ~/mydata/object.txt play/mybucket/object.txt

If you specify a directory or bucket to SOURCE, you must also specify --recursive to recursively copy the contents of that directory or bucket. If you omit the --recursive argument, cp only copies objects in the top level of the specified directory or bucket.

TARGET

mc-cmd

Required

The full path to which mc cp copies the object.

For copying an object to MinIO, specify the alias and the full path to that object (e.g. bucket and path to object). For example:

mc cp ~/mydata/object.txt play/mybucket/object.txt

For copying an object from a local filesystem, specify the full path to that object. For example:

mc cp play/mybucket/object.txt ~/mydata/object.txt
--attr

mc-cmd

Optional

Add custom metadata for the object. Specify key-value pairs as KEY=VALUE\;. For example, --attr key1=value1\;key2=value2\;key3=value3.

--checksum

mc-cmd

Optional

Note

Added: RELEASE.2024-10-02T08-27-28Z

Add a checksum to an uploaded object.

Valid values are: - MD5 - CRC32 - CRC32C - SHA1 - SHA256

The flag requires server trailing headers and works with AWS or MinIO targets.

--disable-multipart

mc-cmd

Optional

Disables multipart upload for the copy session.

--enc-kms

mc-cmd

Encrypt or decrypt objects using server-side SSE-KMS encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify an existing data key on the external KMS.

See the mc admin kms key create reference for creating data keys.

For example:

--enc-kms "myminio/mybucket/prefix/object.obj=mybucketencryptionkey"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-kms "myminio/mybucket/prefix/=mybucketencryptionkey"
--enc-s3

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-S3 encryption with KMS-managed keys. Specify the full path to the object as alias/bucket/prefix/object.

For example:

--enc-s3 "myminio/mybucket/prefix/object.obj"

You can specify the parameter multiple times to denote different object(s) to encrypt:

--enc-s3 "myminio/mybucket/foo/fooobject.obj" --enc-s3 "myminio/mybucket/bar/barobject.obj"

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-s3 "myminio/mybucket/foo"
--enc-c

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

  • KEY - the full path to the object as alias/bucket/path/object.
  • VALUE - the 32-byte RAW Base64-encoded data key to use for encrypting object(s).

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"
Note

Note

MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.

mc-cmd

Optional

Enables indefinite legal hold object locking on the copied objects.

Specify on.

--limit-download

mc-cmd

Optional

Limit client-side download rates to no more than a specified rate in KiB/s, MiB/s, or GiB/s. This affects only the download to the local device running the MinIO Client. Valid units include:

  • B for bytes
  • K for kilobytes
  • M for megabytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Mi for mibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit download rates to no more than 1 GiB/s, use the following:

--limit-download 1G

If not specified, MinIO uses an unlimited download rate.

--limit-upload

mc-cmd

Optional

Limit client-side upload rates to no more than the specified rate in KiB/s, MiB/s, or GiB/s. This affects only the upload from the local device running the MinIO Client. Valid units include:

  • B for bytes
  • K for kilobytes
  • M for megabytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Mi for mibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit upload rates to no more than 1 GiB/s, use the following:

--limit-upload 1G

If not specified, MinIO uses an unlimited upload rate.

--md5

mc-cmd

Optional

Note

Changed: RELEASE.2024-10-02T08-27-28Z

Replaced by the --checksum flag.

Forces all uploads to calculate MD5 checksums.

--newer-than

mc-cmd

Optional

Copy object(s) newer than the specified number of days. Specify a string in #d#hh#mm#ss format. For example: --older-than 1d2hh3mm4ss

Defaults to 0 (all objects).

--older-than

mc-cmd

Optional

Copy object(s) older than the specified time limit. Specify a string in #d#hh#mm#ss format. For example: --older-than 1d2hh3mm4ss

Defaults to 0 (all objects).

--preserve, a

mc-cmd

Optional

Preserve file system attributes and bucket policy rules of the SOURCE directories, buckets, and objects on the TARGET bucket(s).

--recursive, r

mc-cmd

Optional

Recursively copy the contents of each bucket or directory SOURCE to the TARGET bucket.

--retention-duration

mc-cmd

Optional

The duration of the WORM retention mode to apply to the copied object(s).

Specify the duration as a string in #d#hh#mm#ss format. For example: --retention-duration "1d2hh3mm4ss".

Requires specifying --retention-mode.

--retention-mode

mc-cmd

Optional

Enables object locking mode on the copied object(s). Supports the following values:

  • GOVERNANCE
  • COMPLIANCE

Requires specifying --retention-duration.

--rewind

mc-cmd

Optional

Directs mc cp to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified SOURCE be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--storage-class, sc

mc-cmd

Optional

Set the storage class for the new object(s) on the TARGET.

See https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html for more information on S3 storage classes.

--tags

mc-cmd

Optional

Applies one or more tags to the copied objects.

Specify an ampersand-separated list of key-value pairs as KEY1=VALUE1&KEY2=VALUE2, where each pair represents one tag to assign to the objects.

--version-id, vid

mc-cmd

Optional

Directs mc cp to operate only on the specified object version.

--version-id requires that the specified SOURCE be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--zip

mc-cmd

Optional

During copy, extract files from a .zip archive. Only functional when the source archive file exists on a MinIO deployment.

Global Flags

This command supports any of the global flags.

Examples

Copy Object to S3

Use mc cp to copy an object to an S3-compatible host:

mc cp SOURCE ALIAS/PATH
  • Replace SOURCE with the filesystem path to the object.
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the path to the object on the S3-compatible host. You can specify a different object name to “rename” the object on copy.
mc cp SRCALIAS/SRCPATH TGTALIAS/TGTPATH
  • Replace SRCALIAS with the alias of a source S3-compatible host.
  • Replace SRCPATH with the path to the object on the S3-compatible host.
  • Replace TGTALIAS with the alias of a target S3-compatible host.
  • Replace TGTPATH with the path to the object on a target S3-compatible host. Omit the object name to use the SRCPATH object name.

Recursively Copy Objects to S3

Use mc cp --recursive to recursively copy objects to an S3-compatible host:

mc cp --recursive SOURCE ALIAS/PATH
  • Replace SOURCE with the filesystem path to the directory containing the file(s).
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the path to the object on the S3-compatible host. mc cp uses the SOURCE filenames when creating the objects on the target host.
mc cp --recursive SRCALIAS/SRCPATH TGTALIAS/TGTPATH
  • Replace SRCALIAS with the alias of a source S3-compatible host.
  • Replace SRCPATH with the path to the bucket or bucket prefix on the source S3-compatible host.
  • Replace TGTALIAS with the alias of a target S3-compatible host.
  • Replace TGTPATH with the path to the object on the target S3-compatible host. mc cp uses the SRCPATH object names when creating objects on the target host.

Copy Point-In-Time Version of Object

Use mc cp --rewind to copy an object as it existed at a specific point in time. This command only applies to S3-to-S3 copy.

mc cp --rewind DURATION SRCALIAS/SRCPATH TGTALIAS/TGTPATH
  • Replace DURATION with the point-in-time in the past at which the command copies the object. For example, specify 30d to copy the version of the object 30 days prior to the current date.
  • Replace SRCALIAS with the alias of a source S3-compatible host.
  • Replace SRCPATH with the path to the object on the source S3-compatible host.
  • Replace TGTALIAS with the alias of a target S3-compatible host.
  • Replace TGTPATH with the path to the object on the target S3-compatible host. Omit the object name to use the SRCPATH object name.
Note

Requires Versioning

mc cp requires bucket versioning to use this feature. Use mc version to enable versioning on a bucket.

Copy Specific Version of Object

Use mc cp --version-id to copy a specific version of an object. This command only applies to S3-to-S3 copy.

mc cp --version-id VERSION SRCALIAS/SRCPATH TGTALIAS/TGTPATH
  • Replace VERSION with the version of the object to copy.
  • Replace SRCALIAS with the alias of a source S3-compatible host.
  • Replace SRCPATH with the path to the object on the source S3-compatible host.
  • Replace TGTALIAS with the alias of a target S3-compatible host.
  • Replace TGTPATH with the path to the object on the target S3-compatible host. Omit the object name to use the SRCPATH object name.
Note

Requires Versioning

mc cp requires bucket versioning to use this feature. Use mc version to enable versioning on a bucket.

Add a content-type Value

Use mc cp --attr to add a content-type value. This command only applies to S3-to-S3 copy.

mc cp --attr="content-type=CONTENT-TYPE" SRCALIAS/SRCPATH TGTALIAS/TGTPATH
  • Replace CONTENT-TYPE with the desired content type (also called a media type).
  • Replace SRCALIAS with the alias of a source S3-compatible host.
  • Replace SRCPATH with the path to the object on the source S3-compatible host.
  • Replace TGTALIAS with the alias of a target S3-compatible host.
  • Replace TGTPATH with the path to the object on the target S3-compatible host. Omit the object name to use the SRCPATH object name.

The following example sets a content-type of application/json:

 mc cp data.ndjson --attr="content-type=application/json" myminio/mybucket

Behavior

mc cp verifies all copy operations to object storage using MD5SUM checksums.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.89 - mc idp ldap accesskey rm

Description

The mc idp ldap accesskey rm deletes the specified access key from the local server.

mc idp ldap accesskey rm is also known as mc idp ldap accesskey remove.

This command works against access keys created by an AD/LDAP user after authenticating to MinIO.

Create AD/LDAP service accounts with the mc idp ldap accesskey create command.

MinIO supports using AssumeRoleWithLDAPIdentity to generate temporary access keys using the Security Token Service.

The following example deletes the access key mykey from the minio deployment:

mc idp ldap accesskey rm minio/ mykey

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap accesskey rm              \
                                 ALIAS              \
                                 KEY
  • Replace ALIAS with the alias of a MinIO deployment configured for AD/LDAP integration.

  • Replace KEY with the access key to delete.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment configured for AD/LDAP.

For example:

mc idp ldap accesskey ls minio
KEY

mc-cmd

Required

The configured access key to delete.

Example

Delete the access key mykey from the minio deployment.

mc idp ldap accesskey rm minio/ mykey

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.90 - mc idp ldap rm

Description

The mc idp ldap rm command removes the existing configuration for an AD/LDAP provider.

mc idp ldap rm is also known as mc idp ldap remove.

The following example removes the AD/LDAP provider settings for the myminio deployment.

mc idp ldap rm       \
            myminio

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap rm     \
                          ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to remove the AD/LDAP integration.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment for which to remove the current AD/LDAP configuration.

For example:

mc idp ldap rm myminio

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.91 - mc ilm rule rm

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm rule rm replaces mc ilm rm.

Syntax

The mc ilm rule rm command removes an object lifecycle management rule from a MinIO Bucket.

The following command removes a single lifecycle management rule from the mydata bucket on the myminio MinIO deployment:

mc ilm rule rm --id "bgrt1ghju" myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] ilm rule rm                         \
                     --id "string" | (--all --force) \
                     ALIAS                           \
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias and full path to the bucket on the MinIO deployment to which to remove the object lifecycle management rule. For example:

mc ilm rule rm myminio/mydata
--all

mc-cmd

Optional

Removes all rules in the bucket. Requires including --force.

Mutually exclusive with --id.

--force

mc-cmd

Optional

Required if specifying --all.

--id

mc-cmd

Optional

The unique ID of the rule. Use mc ilm rule ls to list bucket rules and retrieve the id for the rule you want to remove.

Mutually exclusive with mc ilm rule rm --all

Global Flags

This command supports any of the global flags.

Examples

Remove a Bucket Lifecycle Management Rule

Use mc ilm rule rm to remove a bucket lifecycle management rule:

mc ilm rule rm --id "RULE" ALIAS/PATH
  • Replace RULE with the unique identifier of the lifecycle management rule. Use mc ilm rule ls to find the ID to use.
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket on the S3-compatible host.

Required Permissions

For permissions required to remove a rule, refer to the required permissions on the parent command.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.92 - mc ilm tier update

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm tier update replaces mc admin tier edit.

Description

The mc ilm tier update command modifies an existing configured remote tier.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Supported S3 Services

mc ilm tier supports only the following S3-compatible services as a remote target for object tiering:

  • MinIO
  • Amazon S3
  • Google Cloud Storage
  • Azure Blob Storage

Required Permissions

MinIO requires the following permissions scoped to the bucket or buckets for which you are creating lifecycle management rules.

MinIO also requires the following administrative permissions on the cluster in which you are creating remote tiers for object transition lifecycle management rules:

For example, the following policy provides permission for configuring object transition lifecycle management rules on any bucket in the cluster:.

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "admin:SetTier",
               "admin:ListTier"
            ],
            "Effect": "Allow",
            "Sid": "EnableRemoteTierManagement"
      },
      {
            "Action": [
               "s3:PutLifecycleConfiguration",
               "s3:GetLifecycleConfiguration"
            ],
            "Resource": [
                        "arn:aws:s3:::*"
            ],
            "Effect": "Allow",
            "Sid": "EnableLifecycleManagementRules"
      }
   ]
}

Transition Permissions

Object transition lifecycle management rules require additional permissions on the remote storage tier. Specifically, MinIO requires the remote tier credentials provide read, write, list, and delete permissions.

For example, if the remote storage tier implements AWS IAM policy-based access control, the following policy provides the necessary permission for transitioning objects into and out of the remote tier:

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "s3:ListBucket"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:s3:::MyDestinationBucket"
            ],
            "Sid": ""
      },
      {
            "Action": [
               "s3:GetObject",
               "s3:PutObject",
               "s3:DeleteObject"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:s3:::MyDestinationBucket/*"
            ],
            "Sid": ""
      }
   ]
}

Modify the Resource for the bucket into which MinIO tiers objects.

Defer to the documentation for the supported tiering targets for more complete information on configuring users and permissions to support MinIO tiering:

Syntax

The following example updates the credentials for an existing remote tier called S3TIER on the myminio deployment.

 mc ilm tier update myminio S3TIER --access-key ACCESS_KEY --secret-key SECRET_KEY

After running this command, lifecycle management rules on the myminio deployment use the tier’s new credentials to transition objects into the remote location. Options not modified in the command maintain their existing configurations.

The command has the following syntax:

mc ilm tier update TARGET                         \
                   TIER_NAME                      \
                   [--account-key value]          \
                   [--access-key value]           \
                   [--az-sp-tenant-id value]      \
                   [--az-sp-client-id value]      \
                   [--az-sp-client-secret value]  \
                   [--secret-key value]           \
                   [--use-aws-role]               \
                   [--credentials-file value]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

The command accepts the following arguments:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment.

TIER_NAME

mc-cmd

Required

The name of the remote tier the command modifies. The value corresponds to the mc ilm tier add TIER_NAME specified when creating the remote tier.

--access-key

mc-cmd

Optional

The access key for a user on the remote S3 or MinIO tier. The user must have permission to perform read/write/list/delete operations on the remote bucket or bucket prefix.

This option only applies to remote storage tiers with TIER_TYPE is s3 or minio. This option has no effect for any other TIER_TYPE.

--secret-key

mc-cmd

Optional

The secret key for a user on the remote s3 or minio tier.

This option only applies to remote storage tiers with TIER_TYPE is s3 or minio. This option has no effect for any other TIER_TYPE.

--use-aws-role

mc-cmd

Optional

Use the access permission for the locally configured AWS Role.

This option only applies if TIER_TYPE is s3 or minio. This option has no effect for any other value of TIER_TYPE.

--account-key

mc-cmd

Optional

The account key for a user on a remote Azure tier.

Required for Azure tier types.

Use this option to rotate the credentials for the --account-name associated to the remote tier.

This option only applies to remote storage tiers with TIER_TYPE is azure. This option has no effect for any other type of login.

--az-sp-tenant-id

mc-cmd

Optional

Note

Added: mc

RELEASE.2024-07-03T20-17-25Z

Directory ID for the Azure service principal account.

This option only applies to remote storage tiers with TIER_TYPE is azure. This option has no effect for any other type of login.

--az-sp-client-id

mc-cmd

Optional

Note

Added: mc

RELEASE.2024-07-03T20-17-25Z

Client ID of the Azure service principal account.

Requires --az-sp-client-secret.

This option only applies to remote storage tiers with TIER_TYPE is azure. This option has no effect for any other type of login.

--az-sp-client-secret

mc-cmd

Optional

Note

Added: mc

RELEASE.2024-07-03T20-17-25Z

The secret for the Azure service principal account.

Requires --az-sp-client-id.

This option only applies to remote storage tiers with TIER_TYPE is azure. This option has no effect for any other type of login.

--credentials-file

mc-cmd

Optional

Required for Google Cloud Storage tier types.

The credential file for a user on the remote GCS tier. The user must have permission to perform read/write/list/delete operations on the remote bucket or bucket prefix.

This option only applies to remote storage tiers with TIER_TYPE is gcs. This option has no effect for any other type of login.

Global Flags

This command supports any of the global flags.

Examples

Rotate Credentials for an S3 Remote Tier

The following example updates the credentials for an S3 remote tier called S3TIER on the myminio deployment.

mc ilm tier update myminio S3TIER --access-key ACCESS_KEY --secret-key SECRET_KEY
  • Replace S3TIER with the name for your Amazon Simple Storage Solution tier.
  • Replace ACCESS_KEY with the updated access key for your S3 storage.
  • Replace SECRET_KEY with the updated secret key for the access key provided.

Rotate Credentials for an Azure Blob Storage Remote Tier

The following example updates the credentials for an Azure remote tier called AXTIER on the myminio deployment.

mc ilm tier update myminio AZTIER --account-key ACCOUNT-KEY
  • Replace AZTIER with the name for your Azure tier.
  • Replace ACCOUNT-KEY with the updated key for your Azure storage.

Rotate Credentials for a Google Cloud Storage Remote Tier

The following example updates the credentials for a Google Cloud Storage remote tier called GCSTIER on the myminio deployment.

 mc ilm tier update myminio GCSTIER --credentials-file /path/to/credentials.json
  • Replace GCSTIER with the name for your Google Cloud Storage tier.
  • Replace /path/to/credentials.json with the path of the updated credential file to use to access the remote storage.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Required Permissions

For permissions required to modify a tier, refer to the required permissions on the parent command.

4.93 - mc replicate rm

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc replicate rm replaces the mc admin bucket remote rm command. Removing the replication automatically removes the underlying remote target.

Syntax

The mc replicate rm command removes a replication rule from a MinIO bucket.

The mc replicate remove command has equivalent functionality to mc replicate rm.

mc [GLOBALFLAGS] replicate rm FLAGS [FLAGS] ALIAS

The following command removes the replication rule with specified id from the mydata bucket on the myminio MinIO deployment:

mc replicate rm --id "c76um9h4b0t1ijr36mug" myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] replicate rm     \
                 --id "string"    \
                 [--all --force]  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required the alias of the MinIO deployment and full path to the bucket or bucket prefix from which to remove the replication rule. For example:

mc replicate rm --id "ID" myminio/mybucket
--id

mc-cmd

Required Specify the unique ID for a configured replication rule.

You can omit this option if specifying --all

--all

mc-cmd

Optional Removes all replication rules on the specified bucket. Requires specifying the --force flag.

--force

mc-cmd

Optional Required if specifying --all .

Global Flags

This command supports any of the global flags.

Examples

Remove a Replication Rule from a Bucket

Use mc replicate rm to remote a bucket replication rule:

mc replicate rm --id "ID" ALIAS/PATH
  • Replace ID with the unique ID of the replication rule to remove. Use mc replicate ls to list all replication rules for the bucket.
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or bucket prefix.

Remove All Replication Rules from a Bucket

Use mc replicate rm to list bucket replication rules:

mc replicate rm --all --force ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or bucket prefix.

Behavior

Removing Replication Rules Does Not Affect Replicated Objects

Removing one or all replication rule for a bucket does not remove any objects already replicated under those rule(s).

Use The command or mc rb commands to remove replicated objects on the remote target. You can identify replicated objects using the X-Amz-Replication-Status metadata field where the value is REPLICA. Buckets which contain objects from multiple replication sources may require additional care and filtering to determine the source prior to removal.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.94 - mc support proxy

Description

Use the mc support proxy command to configure a proxy to use to communicate with MinIO SUBNET.

Examples

Set a Proxy URL

Define the proxy URL to use when the deployment minio1 communicates to SUBNET. The proxy URL in the example is http://my.proxy.

mc support proxy set minio1 http://my.proxy

Remove the Proxy URL Configured for a Deployment

The following command removes the URL configured as the proxy for the alias minio1.

mc support proxy remove minio1

Disable callhome Logs

The following command shows the URL configured as the proxy for the alias minio1.

mc support proxy show minio1

Syntax

mc support proxy set

mc-cmd

Create a proxy URL for the MinIO deployment to use when communicating with MinIO SUBNET.

mc support proxy set ALIAS PROXY_URL

mc support proxy show

mc-cmd

Display the current proxy URL configured for communicating with MinIO SUBNET.

mc support proxy show ALIAS

mc support proxy remove

mc-cmd

Remove the proxy URL configured for communicating with MinIO SUBNET.

mc support proxy remove ALIAS

Global Flags

This command supports any of the global flags.

4.95 - mc diff

Syntax

The mc diff mc computes the differences between two filesystem directories or MinIO buckets. mc diff lists only those objects which are missing or which differ in size. mc diff does not compare the contents of objects.

The following command computes the difference between an object on a local filesystem and an object in the mydata bucket on the myminio MinIO deployment:

mc diff ~/mydata/myobject.txt myminio/mydata/myobject.txt

The mc diff command has the following syntax:

mc [GLOBALFLAGS] diff SOURCE TARGET
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

SOURCE

mc-cmd

Required The object to compare to the TARGET.

For an object from MinIO, specify the alias and the full path to that object (e.g. bucket and path to object). For example:

mc diff play/mybucket/object.txt ~/mydata/object.txt

For an object from a local filesystem, specify the full path to that object. For example:

mc diff ~/mydata/object.txt play/mybucket/object.txt
TARGET

mc-cmd

Required The object to compare to the SOURCE.

For an object from MinIO, specify the alias and the full path to that object (e.g. bucket and path to object). For example:

mc diff play/mybucket/object.txt ~/mydata/object.txt

For an object from a local filesystem, specify the full path to that object. For example:

mc diff ~/mydata/object.txt play/mybucket/object.txt

Global Flags

This command supports any of the global flags.

Examples

The following example assumes that the play alias exists in the mc configuration file. You can replace play with the alias for your preferred S3-compatible deployment.

See mc alias for more information on aliases.

mc diff play/bucket1 play/bucket2

Behavior

Output Legend

mc diff uses the following legend when formatting the diff output:

FIRST < SECOND - object exists only in FIRST
FIRST > SECOND - object exists only in SECOND
FIRST ! SECOND - Newer object exists in FIRST

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.96 - mc idp ldap update

Description

The mc idp ldap update command modifies an existing set of configurations for an AD/LDAP provider.

The following example changes two of the AD/LDAP configuration settings for the myminio deployment.

mc idp ldap update                                \
            myminio                               \
            lookup_bind_dn=cn=admin,dc=min,dc=io  \
            lookup_bind_password=somesecret

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap update           \
                          ALIAS            \
                          [CFG_PARAM1]     \
                          [CFG_PARAM2]...
  • Replace ALIAS with the alias of a MinIO deployment to update for AD/LDAP integration.

  • Replace the [CFG_PARAM#] with each of the configuration setting key-value pairs in the format of PARAMETER="value".

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment on which to modify an AD/LDAP integration.

For example:

mc idp ldap update myminio                               \
                   lookup_bind_dn=cn=admin,dc=min,dc=io  \
server_addr

mc-cmd

Required

Specify the hostname for the Active Directory / LDAP server. For example:

ldapserver.com:636
Note

srv_record_name automatically identifies the port

If your AD/LDAP server uses DNS SRV Records, do not append the port number to your server_addr value. SRV requests automatically include port numbers when returning the list of available servers.

This parameter corresponds with the MINIO_IDENTITY_LDAP_SERVER_ADDR environment variable.

lookup_bind_dn

mc-cmd

Required

Specify the Distinguished Name (DN) for an AD/LDAP account MinIO uses when querying the AD/LDAP server. Enables Lookup-Bind authentication to the AD/LDAP server.

The DN account should be a read-only access keys with sufficient privileges to support querying performing user and group lookups.

This parameter corresponds with the MINIO_IDENTITY_LDAP_LOOKUP_BIND_DN environment variable.

lookup_bind_password

mc-cmd

Required

Specify the password for the Lookup-Bind user account.

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

This parameter corresponds with the MINIO_IDENTITY_LDAP_LOOKUP_BIND_PASSWORD environment variable.

user_dn_attributes

mc-cmd

Optional

Note

Added: RELEASE.2024-06-06T09-36-42Z

Comma-separated list of user DN attributes.

Some valid values include, uid,cn,mail,sshPublicKey.

To enable public authentication for LDAP users, pass sshPublicKey as a DN attribute. The user can then use the passed SSH Public Key to log in to SFTP servers.

mc idp ldap update ALIAS user_dn_attributes=sshPublicKey
user_dn_search_base_dn

mc-cmd

Required

Specify the base Distinguished Name (DN) MinIO uses when querying for user credentials matching those provided by an authenticating client.

Separate multiple DNs with a semicolon (;).

For example:

cn=miniousers,dc=myldapserver,dc=net;ou=swengg,dc=min,dc=io

Supports Lookup-Bind mode.

This parameter corresponds with the MINIO_IDENTITY_LDAP_USER_DN_SEARCH_BASE_DN environment variable.

user_dn_search_filter

mc-cmd

Required

Specify the AD/LDAP search filter MinIO uses when querying for user credentials matching those provided by an authenticating client.

Use the %s substitution character to insert the client-specified username into the search string. For example:

(userPrincipalName=%s)

This parameter corresponds with the MINIO_IDENTITY_LDAP_USER_DN_SEARCH_FILTER environment variable.

comment

mc-cmd

Optional

Specify a comment to associate to the AD/LDAP configuration.

This parameter corresponds with the MINIO_IDENTITY_LDAP_COMMENT environment variable.

enabled

mc-cmd

Optional

Set to false to disable the AD/LDAP configuration.

If false, applications cannot generate STS credentials or otherwise authenticate to MinIO using the configured provider.

Defaults to true or “enabled”.

group_search_base_dn

mc-cmd

Optional

Specify a semicolon-separated (;) list of group search base Distinguished Names MinIO uses when performing group lookups.

For example:

cn=miniogroups,dc=myldapserver,dc=net;ou=swengg,dc=min,dc=io

This parameter corresponds with the MINIO_IDENTITY_LDAP_GROUP_SEARCH_BASE_DN environment variable.

group_search_filter

mc-cmd

Optional

Specify an AD/LDAP search filter for performing group lookups for the authenticated user

Use the %s substitution character to insert the client-specified username into the search string. Use the %d substitution character to insert the Distinguished Name of the client-specified username into the search string.

For example:

(&(objectclass=groupOfNames)(memberUid=%s))

When providing an AD/LDAP group search filter, configure a filter that returns the minimum number of relevant groups for the purpose of supporting authentication. Filters that return large group assignments increase the size of associated calls and resources. Functions sensitive to large request or response bodies may exhibit unexpected behaviors as a result.

This parameter corresponds with the MINIO_IDENTITY_LDAP_GROUP_SEARCH_FILTER environment variable.

server_insecure

mc-cmd

Optional

Specify on to allow unsecured (non-TLS encrypted) connections to the AD/LDAP server.

MinIO sends AD/LDAP user credentials in plain text to the AD/LDAP server, such that enabling TLS is required to prevent reading credentials over the wire. Using this option presents a security risk where any user with access to network traffic can observe the unencrypted plaintext credentials.

Defaults to off.

This parameter corresponds with the MINIO_IDENTITY_LDAP_SERVER_INSECURE environment variable.

server_starttls

mc-cmd

Optional

Specify on to enable StartTLS connections to an AD/LDAP server.

Defaults to off

For more about StartTLS, refer to section 4.14 of the LDAP RFC 4511 specification.

This parameter corresponds with the MINIO_IDENTITY_LDAP_SERVER_STARTTLS environment variable.

srv_record_name

mc-cmd

Optional

Note

Added: RELEASE.2022-12-12T19-27-27Z

Specify the appropriate value to enable MinIO to select an AD/LDAP server using a DNS SRV record request.

When enabled, MinIO selects an AD/LDAP server by:

  • Constructing the target SRV record name following standard naming conventions.
  • Requesting a list of available AD/LDAP servers.
  • Choosing an appropriate target based on priority and weight.

The configuration examples below presume the AD/LDAP server address is set to example.com and the SRV record protocol is _tcp.

For SRV record names beginning with _ldap, specify ldap. The constructed DNS SRV record name resembles the following:

_ldap._tcp.example.com

For SRV record names with beginning with _ldaps, specify ldaps. The constructed DNS SRV record name resembles the following:

_ldaps._tcp.example.com

If your DNS SRV record name uses alternate service or protocol names, specify on and provide the full record name as your LDAP server address. Example: _ldapserver._specialtcp.example.com

For more about DNS SRV records, see DNS SRV Records for LDAP.

Note

Server address for DNS SRV record configurations

The specified server name must not include a port number. This is different from a standard AD/LDAP configuration, where the port number is required.

See server_addr or MINIO_IDENTITY_LDAP_SERVER_ADDR for more about configuring an AD/LDAP server address.

This parameter corresponds with the MINIO_IDENTITY_LDAP_SRV_RECORD_NAME environment variable.

tls_skip_verify

mc-cmd

Optional

Specify on to trust the AD/LDAP server TLS certificates without verification. This option may be required if the AD/LDAP server TLS certificates are signed by an untrusted Certificate Authority (e.g. self-signed).

Defaults to off

This parameter corresponds with the MINIO_IDENTITY_LDAP_TLS_SKIP_VERIFY environment variable.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.97 - mc replicate status

Syntax

The mc replicate status command displays the replication status of a MinIO bucket. The status also lists the remote target path or location.

The following command displays the current replication status of the mydata bucket on the myminio MinIO deployment:

mc replicate status myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] replicate status TARGET
                           [--limit-upload value]
                           [--limit-download value]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment and full path to the bucket or bucket prefix for which to display the replication status. For example:

mc replicate status myminio/mybucket
--limit-download

mc-cmd

Optional

Limit download rates to no more than a specified rate in KiB/s, MiB/s, or GiB/s. Valid units include:

  • B for bytes
  • K for kilobytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit download rates to no more than 1 GiB/s, use the following:

--limit-download 1G

If not specified, MinIO uses an unlimited download rate.

--limit-upload

mc-cmd

Optional

Limit upload rates to no more than the specified rate in KiB/s, MiB/s, or GiB/s. Valid units include:

  • B for bytes
  • K for kilobytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit upload rates to no more than 1 GiB/s, use the following:

--limit-upload 1G

If not specified, MinIO uses an unlimited upload rate.

Global Flags

This command supports any of the global flags.

Examples

Display Replication Status

Use mc replicate status to show bucket replication status:

mc replicate status ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or bucket prefix.

Behavior

Removed and Re-added ARNs

Note

Changed: mc

RELEASE.2023-03-20T17-17-53Z

The standard output of this command does not display ARNs previously removed from a replication configuration.

To list all ARNs, including ARNs no longer part of the replication, use the --json flag. The json output continues to show data replicated under old ARNs. This may be valuable if an ARN was removed and re-added for the same bucket.

New ARNs do not cause re-replication of previously synced objects.

4.98 - mc support top

Note

Note

Note

Changed: RELEASE.2022-08-11T00-30-48Z

mc support top replaces the mc admin top command.

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Description

The mc support top command returns statistics for distributed MinIO deployments, similar to the output of the top command in a shell.

Note

Note

mc support top is not supported on single-node single-drive MinIO deployments.

mc support top has the following subcommands:

Refer to the pages linked above for each subcommand for details.

Syntax

The command has the following syntax:

mc support top COMMAND [COMMAND FLAGS] [ARGUMENTS ...]

4.99 - mc du

Syntax

The mc du command summarizes the disk usage of buckets and folders. You can also use du against the local filesystem to produce similar results as the du command.

The following command prints the disk usage of the mybucket bucket on the myminio MinIO deployment:

mc du play/mybucket

The output resembles the following:

825KiB 3 objects        mybucket

The mc du command has the following syntax:

mc [GLOBALFLAGS] du                    \
                 [--depth]             \
                 [--recursive]         \
                 [--rewind]            \
                 [--versions]          \
                 ALIAS [ALIAS ...]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of a MinIO deployment and the full path to the folder. For example:

mc du myminio/mybucket

You can specify multiple buckets and folders on the same or different MinIO deployment. For example:

mc du myminio/mybucket myminio/myotherbucket/myfolder

For a folder on a local filesystem, specify the full path to that folder. For example:

mc du ~/data/images

The time required for mc du to complete depends on the size of the target buckets and folders. A large bucket may take some time to generate a disk usage summary.

--depth, d

mc-cmd

Optional

Print the total for all folders N or fewer levels below the path specified in the command. Default is 0, for the specified path only.

--recursive, r

mc-cmd

Optional

Recursively print the total for each bucket or child folder.

--rewind

mc-cmd

Optional

Directs mc du to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --rewind and --versions together to show the disk usage for those object versions which existed at a specific point in time.

--versions

mc-cmd

Optional

Directs mc du to operate on all object versions that exist in the bucket.

--versions requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --versions and --rewind together to show the disk usage for those object versions which existed at a specific point in time.

Global Flags

This command supports any of the global flags.

Examples

View the Disk Usage for a Bucket or Folder

Use mc du to print a summary of the disk usage for a bucket or folder:

mc du ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket or folder on the S3-compatible host.

View the Disk Usage at a Point-In-Time

Use mc du --rewind to print a summary of disk usage at a specific point-in-time in the past:

mc du --rewind DURATION ALIAS/PATH
  • Replace DURATION with the desired point-in-time in the past. For example, specify 30d to show the disk usage 30 days prior to the current date.
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket or folder on the S3-compatible host.
Note

Requires Versioning

mc du requires bucket versioning to use this feature. Use mc version to enable versioning on a bucket.

View the Disk Usage Recursively

Use mc du --recursive to print a summary for each folder recursively:

mc du --recursive ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket or folder on the S3-compatible host.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.100 - mc replicate export

Syntax

The mc replicate export command exports the JSON-formatted replication rules for a MinIO bucket to STDOUT.

The following command exports the replication configuration for the mydata bucket on the myminio MinIO deployment:

mc replicate export myminio/mydata > mydata-replication.json

The command has the following syntax:

mc [GLOBALFLAGS] export ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required the alias of the MinIO deployment and full path to the bucket or bucket prefix for which to export the replication rules. For example:

mc replicate export myminio/mybucket

Global Flags

This command supports any of the global flags.

Examples

Export Existing Replication Rules

Use mc replicate export to export bucket replication rules:

mc replicate export ALIAS/PATH > bucket-replication-rules.json
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or bucket prefix.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.101 - mc support upload

Description

mc support upload copies a file from the local file system to a SUBNET ticket.

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Syntax

The mc support profile command has the following syntax:

mc [GLOBALFLAGS] support profile              \
                         ALIAS                \
                         FILE                 \
                         [--comment "string"] \
                         [--enc]              \
                         [--issue integer]

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

FILE

mc-cmd

Required

The path to the file to upload to SUBNET.

--comment

mc-cmd

Optional

Include a message to the issue when uploading the file.

--enc

mc-cmd

Optional

Encrypt contents of the upload. The key used for the encryption is only accessible to MinIO.

--issue

mc-cmd

Optional

Specify the issue number to which to add the file. If not specified, the file uploads to the generic issue number 0.

Global Flags

This command supports any of the global flags.

Examples

Upload a file to an issue

This command uploads the file ./trace.log from the local file system to the SUBNET issue number 10001 for the deployment with alias minio1.

mc support upload --issue 10001 minio1 ./trace.log

Upload a file to an issue with a comment for MinIO Engineers

This command uploads the file ./trace.log from the local file system to the SUBNET issue number 10001 for the deployment with alias minio1. The command also includes a comment available to MinIO Engineers about the file.

mc support upload --issue 10001 --comment "here is the requested trace log" minio1 ./trace.log

4.102 - mc encrypt

Description

The mc encrypt commands set, update, or disable the default bucket Server-Side Encryption (SSE) mode. MinIO automatically encrypts objects using the specified SSE mode.

Subcommands

mc encrypt includes the following subcommands:

Subcommand

Description

clear

The mc encrypt clear command removes the current default encryption settings for a bucket.

info

The mc encrypt info command returns the current default encryption settings for a bucket.

set

The mc encrypt set encrypt command sets or updates the default bucket Server-Side Encryption (SSE) mode. MinIO automatically encrypts objects written to that bucket using the specified SSE mode.

4.103 - mc replicate import

Syntax

The mc replicate import command imports JSON-formatted replication rules for a MinIO bucket from STDIN.

The following command imports the replication configuration for the mydata bucket on the myminio MinIO deployment:

mc replicate import myminio/mydata < mydata-replication.json

The command has the following syntax:

mc [GLOBALFLAGS] import ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required the alias of the MinIO deployment and full path to the bucket or bucket prefix for which to import the replication rules. For example:

mc replicate import myminio/mybucket

Global Flags

This command supports any of the global flags.

Examples

Import Existing Replication Rules

Use mc replicate import to import bucket replication rules:

mc replicate import ALIAS/PATH < bucket-replication-rules.json
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket or bucket prefix.

Behavior

Importing Configuration Overrides Existing Rules

mc replicate import replaces the current bucket replication rules with those defined in the imported JSON configuration.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.104 - mc event

Description

The mc event command supports adding, removing, and listing bucket event notifications.

MinIO automatically sends triggered events to the configured notification targets. MinIO supports notification targets like AMQP (RabbitMQ), Redis, ElasticSearch, NATS and PostgreSQL. See MinIO Bucket Notifications for more information.

Subcommands

mc event includes the following subcommands:

Subcommand

Description

add

The mc event add command adds event notification triggers to a bucket.

ls

The mc event ls command lists all event notification triggers for a bucket.

rm

The mc event rm command removes an event notification trigger from a bucket.

4.105 - mc find

Syntax

The mc find command supports searching for objects on a MinIO deployment. You can also use the command to search for files on a filesystem.

The following command searches for all objects matching the specified pattern in the mydata bucket on the myminio MinIO deployment:

mc find myminio/mydata --name "*.jpg"

The command has the following syntax:

mc [GLOBALFLAGS] find                    \
                 [--exec "string"]       \
                 [--ignore "string"]     \
                 [--larger "string"]     \
                 [--maxdepth "string"]   \
                 [--metadata "string"]   \
                 [--name "string"]       \
                 [--newer-than "string"] \
                 [--older-than "string"] \
                 [--path "string"]       \
                 [--print "string"]      \
                 [--regex "string"]      \
                 [--smaller "string"]    \
                 [--tags "string"]`      \
                 [--versions]            \
                 [--watch]               \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

For objects on MinIO or an S3-compatible host, specify the alias and the full path to search (e.g. bucket and prefixes). For example:

mc find play/mydata/

For objects on a filesystem, specify the full path to search. For example:

mc find ~/mydata/

Issuing mc find ALIAS with no other arguments returns a list of all objects or files at the specified path, similar to mc ls.

--exec

mc-cmd

Optional

Spawns an external process for each object returned by mc find. Supports substitution formatting of the output.

--ignore

mc-cmd

Optional

Exclude objects whose names match the specified wildcard pattern.

--larger

mc-cmd

Optional

Match all objects larger than the specified size in units.

--maxdepth

mc-cmd

Optional

Limits directory navigation to the specified depth.

--metadata

mc-cmd

Optional

Note

Added: mc

RELEASE.2023-04-12T02-21-51Z

For use with MinIO deployments only.

Return objects with metadata that matches a specified key=value. Use the format --metadata="KEY=value".

You can pass a key with an empty value. In that case, mc find matches objects that do not have the metadata key or where the metadata key’s value is empty.

You can use the flag multiple times to match objects for additional metadata keys. To return, an object must have matching values for all metadata keys.

--name

mc-cmd

Optional

Return objects whose names match the specified wildcard pattern.

--newer-than

mc-cmd

Optional

Mirror object(s) newer than the specified number of days. Specify a string in #d#hh#mm#ss format. For example: --older-than 1d2hh3mm4ss

Note

Changed: RELEASE.2025-02-04T04-57-50Z

The datetime may also be specified in absolute time of YYYY-MM-DD HH:MM:SS TMZ format. For example, mc find --newer-than="2025-01-22 09:57:00 CET" minioalias/mybucket.

--older-than

mc-cmd

Optional

Mirror object(s) older than the specified time limit. Specify a string in #d#hh#mm#ss format. For example: --older-than 1d2hh3mm4ss

Note

Changed: RELEASE.2025-02-04T04-57-50Z

The datetime may also be specified in absolute time of YYYY-MM-DD HH:MM:SS TMZ format. For example, mc find --newer-than="2025-01-22 09:57:00 CET" minioalias/mybucket.

Defaults to 0 (all objects).

--path

mc-cmd

Optional

Return the contents of directories whose names match the specified wildcard pattern.

--print

mc-cmd

Optional

Prints results to STDOUT. Supports substitution formatting of the output.

--regex

mc-cmd

Optional

Returns objects or the contents of directories whose names match the specified PCRE regex pattern.

--tags

mc-cmd

Optional

Note

Added: mc

RELEASE.2023-04-12T02-21-51Z

For use with MinIO deployments only.

Return objects with a tag that matches a specified RE2 RegEx pattern. Use the format --tag="KEY=regexValue".

You can pass a key with an empty value. In that case, mc find matches objects that do not have the metadata key or where the metadata key’s value is empty.

You can use the flag multiple times to match objects for additional tags. To return, an object must have matching values for all tags.

--smaller

mc-cmd

Optional

Match all objects smaller than the specified size in units.

--versions

mc-cmd

Optional

Include all object versions in the results.

--watch

mc-cmd

Optional

Continuously monitor the ALIAS and return any new objects which match the specified criteria.

Global Flags

This command supports any of the global flags.

Examples

Find a Specific Object in a Bucket

mc find ALIAS/PATH --name NAME
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to a bucket on the S3-compatible host. Omit the path to search from the root of the S3 host.
  • Replace NAME with the object.

Find Objects with File Extension in Bucket

mc find ALIAS/PATH --name *.EXTENSION
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to a bucket on the S3-compatible host.
  • Replace EXTENSION with the file extension of the object.

Find All Matching Files and Copy To S3 Service

Use mc find with the --exec option to find files on a local filesystem and pass them to an mc command for further processing. The following example uses mc cp to copy the output of mc find to an S3-compatible host.

mc find FILEPATH --name "*.EXTENSION" --exec "mc cp {} ALIAS/PATH"
  • Replace FILEPATH with the full file path to the directory to search.
  • Replace EXTENSION with the file extension of the object.
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to a bucket on the S3-compatible host.

To continuously watch the specified directory and copy new objects, include the --watch argument:

mc find --watch FILEPATH --name "*.EXTENSION" --exec "mc cp {} ALIAS/PATH"

Find Objects with a Matching Tag

Note

Note

Tag matching is only available for use on MinIO deployments.

mc find --tags="key=v*" ALIAS/BUCKET/
  • Replace key with the name of a tag key to match.
  • Replace v* with the RE2 Regular Expression to evaluate against.
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace BUCKET with the bucket or prefix to search.

You can add additional --tags="key=RegExpression" flags to match. Matching objects must match all included tags.

Find Objects with Matching Metadata

Note

Note

Metadata matching is only available for use on MinIO deployments.

mc find --json --metadata="content-type=text/csv" ALIAS/BUCKET/
  • Replace content-type=text/csv with the a key-value pair of the metadata field and value to match.
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace BUCKET with the bucket or prefix to search.

You can add additional --tags="metadata=value" flags to match. Matching objects must match all included metadata fields.

Behavior

Units of Measurement

The mc find --smaller and mc find --larger flags accept the following case-insensitive suffixes to represent the unit of the specified size value:

Suffix Unit Size
k KB (Kilobyte, 1000 Bytes)
m MB (Megabyte, 1000 Kilobytes)
g GB (Gigabyte, 1000 Megabytes)
t TB (Terabyte, 1000 Gigabytes)
ki KiB (Kibibyte, 1024 Bites)
mi MiB (Mebibyte, 1024 Kibibytes)
gi GiB (Gibibyte, 1024 Mebibytes)
ti TiB (Tebibyte, 1024 Gibibytes)

Omitting the suffix defaults to bytes.

Substitution Format

The mc find --exec and mc find --print commands support string substitutions with special interpretations for following keywords.

The following keywords are supported for both filesystem and S3 service targets:

  • {} - Substitutes to full path.
  • {base} - Substitutes to basename of path.
  • {dir} - Substitutes to dirname of the path.
  • {size} - Substitutes to object size of the path.
  • {time} - Substitutes to object modified time of the path.

The following keyword is supported only for S3 service targets:

  • {url} - Substitutes to a shareable URL of the path.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.106 - mc get

Note

Added: mc

RELEASE.2024-02-24T01-33-20Z

Syntax

The mc get command downloads an object from a target S3 deployment to the local file system.

mc get provides a simplified interface for downloading files compared to mc cp or mc mirror. mc get uses a one-way download function that trades efficiency for the power and complexity of the other commands.

The following downloads the file logo.png from an s3 source to the local file system at path ~/images/collateral/.

mc get minio/marketing/logo.png ~/images/collateral

The command has the following syntax:

mc [GLOBALFLAGS] get                      \
                 SOURCE                   \
                 TARGET                   \
                 [--enc-c string]         \
                 [--version-id, --vid value]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

SOURCE

mc-cmd

Required

The full path to the alias, bucket, prefix (if used), and object to download.

TARGET

mc-cmd

Required

The destination path on the local file system where the command should place the downloaded file.

--enc-c

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

  • KEY - the full path to the object as alias/bucket/path/object.
  • VALUE - the 32-byte RAW Base64-encoded data key to use for encrypting object(s).

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"
Note

Note

MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.

--version-id, --vid

mc-cmd

Optional

Retrieve a specific version of the object. Pass the version ID of the object to retrieve.

Global Flags

This command supports any of the global flags.

Examples

Retrieve an object from MinIO to the local file system

The following command retrieves the file myobject.csv from the bucket mybucket at the alias myminio and places it on the local file system at the path /my/local/folder.

mc get myminio/mybucket/myobject.csv /my/local/folder

Retrieve an encrypted object from MinIO

The following command retrieves an encrypted file and places it at a local folder path.

mc get --enc-c "play/mybucket/object=MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDA" play/mybucket/object path-to/object

4.107 - mc head

Syntax

The mc head command displays the first n lines of an object, where n is an argument specified to the command.

mc head does not perform any transformation or formatting of object contents to facilitate readability. You can also use mc head against the local filesystem to produce similar results to the head commandline tool.

The following command returns the first 10 lines of an object in the mydata bucket on the myminio MinIO deployment:

mc head myminio/mydata/myobject.txt

The command has the following syntax:

mc [GLOBALFLAGS] head                     \
                 [--lines int]            \
                 [--rewind "string"]      \
                 [--version-id "string"]  \
                 [--enc-c "string"]       \
                 ALIAS [ALIAS ...]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The object or objects to print.

For an object on MinIO, specify the alias and the full path to that object (e.g. bucket and path to object). For example:

mc head play/mybucket/object.txt

You can specify multiple objects on the same or different MinIO deployments. For example:

mc head ~/mydata/object.txt myminio/mydata/object.txt

For an object on a local filesystem, specify the full path to that object. For example:

mc head ~/mydata/object.txt
--lines, n

mc-cmd

Optional

The number of lines to print.

Defaults to 10.

--enc-c

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

  • KEY - the full path to the object as alias/bucket/path/object.
  • VALUE - the 32-byte RAW Base64-encoded data key to use for encrypting object(s).

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"
Note

Note

MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.

--rewind

mc-cmd

Optional

Directs mc head to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--version-id, vid

mc-cmd

Optional

Directs mc head to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Global Flags

This command supports any of the global flags.

Examples

View Partial Contents of an Object

Use mc head to return the first 10 lines of an object:

mc head ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the object on the S3-compatible host.

View Partial Contents of an Object at a Point in Time

Use mc head --rewind to return the first 10 lines of the object at a specific point-in-time in the past:

mc head ALIAS/PATH --rewind DURATION
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the object on the S3-compatible host.
  • Replace DURATION with the point-in-time in the past at which the command returns the object. For example, specify 30d to return the version of the object 30 days prior to the current date.
Note

Requires Versioning

mc head requires bucket versioning to use this feature. Use mc version to enable versioning on a bucket.

View Partial Contents of an Object with Specific Version

Use mc head --version-id to return the first 10 lines of the object at a specific point-in-time in the past:

mc head ALIAS/PATH --version-id VERSION
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the object on the S3-compatible host.
  • Replace VERSION with the version of the object. For example, specify 30d to return the version of the object 30 days prior to the current date.
Note

Requires Versioning

mc head requires bucket versioning to use this feature. Use mc version to enable versioning on a bucket.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.108 - mc idp ldap

Note

Added: RELEASE.2023-05-26T23-31-54Z

mc idp ldap and its subcommands replace mc admin idp ldap.

Description

The mc idp ldap commands allow you to manage configurations to 3rd party Active Directory or LDAP Identity and Access Management (IAM) integrations.

The mc idp ldap commands are an alternative to using environment variables when setting up an AD/LDAP connection. They are only supported against MinIO deployments.

See Active Directory / LDAP Access Management for a tutorial on using these commands.

Note

Note

MinIO AD/LDAP environment variables override their corresponding configuration settings as modified or set by this command.

The mc idp ldap command has the following subcommands:

Subcommand

Description

mc idp ldap add

The mc idp ldap add command creates an AD/LDAP IDP server configuration.

mc idp ldap disable

The mc idp ldap disable command disables the currently configured AD/LDAP provider.

mc idp ldap enable

The mc idp ldap enable command enables the currently configured AD/LDAP provider.

mc idp ldap info

The mc idp ldap info command outputs the current configuration for an AD/LDAP provider on a specified MinIO deployment.

mc idp ldap ls

The mc idp ldap ls command lists the existing set of configurations for an AD/LDAP provider.

mc idp ldap policy subcommands

The mc idp ldap policy commands show the mapping relationships between policies and the associated groups or users.

mc idp ldap rm

The mc idp ldap rm command removes the existing configuration for an AD/LDAP provider.

mc idp ldap update

The mc idp ldap update command modifies an existing set of configurations for an AD/LDAP provider.

4.109 - mc idp ldap accesskey

Note

Added: RELEASE.2023-10-30T18-43-32Z

Description

The mc idp ldap accesskey commands allow you to list, delete, or display information about LDAP access key pairs.

The mc idp ldap accesskey commands are only supported against MinIO deployments.

This command works against access keys created by an AD/LDAP user after authenticating to MinIO.

Create AD/LDAP service accounts with the mc idp ldap accesskey create command.

MinIO supports using AssumeRoleWithLDAPIdentity to generate temporary access keys using the Security Token Service.

The mc idp ldap accesskey command has the following subcommands:

Subcommand

Description

mc idp ldap accesskey create

The mc idp ldap accesskey create allows you to add LDAP access key pairs.

mc idp ldap accesskey disable

mc idp ldap accesskey disable disables the specified access key on the MinIO deployment.

mc idp ldap accesskey edit

mc idp ldap accesskey edit modifies the specified access key on the local server.

mc idp ldap accesskey enable

The mc idp ldap accesskey enable enables the specified access key on the local server.

mc idp ldap accesskey info

The mc idp ldap accesskey info outputs information about the specified access key(s).

mc idp ldap accesskey ls

The mc idp ldap accesskey ls displays a list of LDAP access key pairs.

mc idp ldap accesskey rm

The mc idp ldap accesskey rm deletes the specified access key from the local server.

4.110 - mc idp ldap accesskey create-with-login

Note

Added: mc

RELEASE.2024-04-18T16-45-29Z

Description

The mc idp ldap accesskey create-with-login uses interactive terminal-based prompt to authenticate with the external AD/LDAP server and generate access keys for use with MinIO.

The following example prompts the user to provide their AD/LDAP credentials. It then generates a new access key pair using the policy or policies associated with that AD/LDAP user.

mc idp ldap accesskey create-with-login https://minio.example.net/

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap accesskey create-with-login        \
                                 URL                         \
                                 [--access-key <value>]      \
                                 [--secret-key <value>]      \
                                 [--policy <value>]          \
                                 [--name <value>]            \
                                 [--description <value>]     \
                                 [--expiry <value>]          \
                                 [--expiry-duration <value>]
  • Replace URL with the FQDN of a MinIO deployment configured for AD/LDAP integration.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

URL

mc-cmd

Required

The FQDN of a MinIO deployment configured for AD/LDAP integration.

For example:

mc idp ldap accesskey create-with-login https://minio.example.net
--access-key

mc-cmd

Optional

The access key to use once successfully authenticated. Omit to let MinIO randomly generate a value.

The access key cannot contain the characters = (equal sign) or , (comma).

Requires --secret-key

--secret-key

mc-cmd

Optional

A secret key to use once successfully authenticated. Omit to let MinIO randomly generate a value.

Requires --access-key

--policy

mc-cmd

Optional

File path to the JSON-formatted policy to use for the account. This policy cannot grant additional privileges beyond the privileges associated with the authenticated AD/LDAP user.

Omit to use the AD/LDAP user policies.

--name

mc-cmd

Optional

A human-readable name to use for the created access key.

--description

mc-cmd

Optional

Create a description for the service account. For example, you might specify the reason the access key exists.

--expiry-duration

mc-cmd

Optional

Length of time the access key pair should remain valid for use in #d#h#s format.

For example, 7d, 24h, 5d12h30s are valid strings.

Mutually exclusive with --expiry.

--expiry

mc-cmd

Optional

The date after which the access key expires. Enter the date in YYYY-MM-DD format.

For example, to expire the credentials after December 31, 2024, enter 2024-12-31.

Mutually exclusive with --expiry-duration.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Examples

Create a new access-key pair for the authenticated user

The following command creates a new access key pair to use with the currently authenticated user on the minio alias. The command outputs a randomly generated access key and secret key.

mc idp ldap accesskey create-with-login https://minio.example.net

Create a new access-key pair with a custom access key and secret key

The following command creates a new access key pair with both an access key and secret key that you specify for the user currently authenticated on the minio alias.

mc idp ldap accesskey create-with-login https://minio.example.net/ --access-key my-access-key-change-me --secret-key my-secret-key-change-me

Create a new access-key pair that expires after 24 hours

The following command creates a new access key pair to use with the currently authenticated user on the minio alias. The credentials expire after 24 hours.

The command outputs a randomly generated access key and secret key.

mc idp ldap accesskey create-with-login https://minio.example.net --expiry-duration 24h

Create a new access-key pair that expires after a date

The following command creates a new access key pair to use with the currently authenticated user on the minio alias. The credentials expire after February 28, 2025.

The command outputs a randomly generated access key and secret key.

mc idp ldap accesskey create-with-login https://minio.example.net --expiry 2025-02-28

4.111 - mc idp ldap policy

Note

Added: RELEASE.2023-05-26T23-31-54Z

mc idp ldap policy and its subcommands replace mc admin idp ldap policy.

Description

The mc idp ldap policy commands show the mapping relationships between policies and the associated groups or users.

The mc idp ldap policy commands are only supported against MinIO deployments.

The mc idp ldap policy command has the following subcommands:

Subcommand

Description

mc idp ldap policy attach

The mc idp ldap policy attach command attaches one or more polices to an entity.

mc idp ldap policy detach

The mc idp ldap policy detach command detaches one or more polices from an entity.

mc idp ldap policy entities

The mc idp ldap policy entities command displays a list of mappings for a user, group, and/or policy.

4.112 - mc idp openid

Note

Added: RELEASE.2023-05-26T23-31-54Z

mc idp openid and its subcommands replace mc admin idp openid.

Description

The mc idp openid commands allow you to manage configurations to 3rd party OpenID Identity and Access Management (IAM) integrations.

Define configuration settings as an alternative to using environment variables when setting up an OpenID connection. The mc idp openid commands are only supported against MinIO deployments.

Note

Note

MinIO OpenID environment variables override their corresponding configuration settings as modified or set by this command.

The mc idp openid command has the following subcommands:

Subcommand Description
mc idp openid add Create an OpenID IDP server configuration.
mc idp openid update Modify an existing OpenID IDP server configuration.
mc idp openid rm Remove an OpenID IDP server configuration from a deployment.
mc idp openid ls Outputs a list of the existing OpenID server configurations for a deployment.
mc idp openid info Displays details for a specific OpenID server configuration.
mc idp openid enable Enables an OpenID server configuration.
mc idp openid disable Disables an OpenID server configuration.

Configuration Parameters

The mc idp openid subcommands support configuration parameters. The parameters define the server’s interaction with the IAM provider.

For a more detailed explanation of the configuration parameters, refer to the config setting documentation.

Syntax

add

mc-cmd

Create a new set of configurations for an OpenID provider.

You can run the command multiple times to set up multiple OpenID providers.

When adding multiple OpenID providers, only one can be a JWT Claim-based provider. All others must be role-based providers.

The following example creates the configuration settings for the myminio deployment as defined in a new test-config setup for Dex integration.

 mc idp openid add myminio test-config                                        \
    client_id=minio-client-app                                                \
    client_secret=minio-client-app-secret                                     \
    config_url="http://localhost:5556/dex/.well-known/openid-configuration"   \
    scopes="openid,groups"                                                    \
    redirect_uri="http://127.0.0.1:10000/oauth_callback"                      \
    role_policy="consoleAdmin"

The command has the following syntax:

mc [GLOBALFLAGS] idp openid add               \
                            ALIAS             \
                            [CFG_NAME]        \
                            [CFG_PARAM1]      \
                            [CFG_PARAM2]...
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the command creates default configuration values.
  • Replace the [CFG_PARAM#] with each of the configuration setting key-value pairs in the format of PARAMETER="value".

update

mc-cmd

Modify an existing set of configurations for an OpenID provider.

The following example changes two of the configuration settings for the myminio deployment as defined in the test-config setup for Dex integration.

mc idp openid update                      \
              myminio                     \
              test_config                 \
              scopes="openid,groups"      \
              role_policy="consoleAdmin"

The command has the following syntax:

mc [GLOBALFLAGS] idp openid update           \
                            ALIAS            \
                            [CFG_NAME]       \
                            [CFG_PARAM1]     \
                            [CFG_PARAM2]...
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the command updates the default configuration.
  • Replace the [CFG_PARAM#] with each of the configuration setting key-value pairs to update in the format of PARAMETER="value".

rm, remove

mc-cmd

Remove an existing set of configurations for an OpenID provider.

The following example removes the test-config settings for the myminio deployment.

mc idp openid rm myminio test_config

The command has the following syntax:

mc [GLOBALFLAGS] idp openid rm          \
                            ALIAS       \
                            [CFG_NAME]
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the command removes the default configurations.

ls, list

mc-cmd

Outputs a list of existing configuration sets for OpenID providers.

The following example outputs a list of all OpenID configuration sets defined for the myminio deployment.

mc idp openid ls myminio

The command has the following syntax:

mc [GLOBALFLAGS] idp openid ls ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to list OpenID integrations for.

info

mc-cmd

Outputs the set of values defined for an existing set of server configurations for an OpenID provider.

The following example outputs the configuration settings defined for the test_config set of OpenID settings on the myminio deployment.

mc idp openid info myminio test_config

The command has the following syntax:

mc [GLOBALFLAGS] idp openid info        \
                            ALIAS       \
                            [CFG_NAME]
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the information displays for the default server configuration.

enable

mc-cmd

Begin using an existing set of configurations for an OpenID provider.

The following example enables the server configurations defined as test_config on the myminio deployment.

mc idp openid enable       \
              myminio      \
              test_config

The command has the following syntax:

mc [GLOBALFLAGS] idp openid enable     \
                            ALIAS      \
                            [CFG_NAME]
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the command enables the default configuration values.

disable

mc-cmd

Stop using a set of configurations for an OpenID provider.

The following example disables the server configurations defined as test_config on the myminio deployment.

mc idp openid disable      \
              myminio      \
              test_config

The command has the following syntax:

mc [GLOBALFLAGS] idp openid disable       \
                            ALIAS         \
                            [CFG_NAME]
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the command disables the default configuration values.

Global Flags

This command supports any of the global flags.

4.113 - mc ilm

Description

The mc ilm commands manage object lifecycle management rules and tiering on a MinIO deployment.

Use these command to

Subcommands

mc ilm includes the following subcommands:

Subcommand

Description

restore

The mc ilm restore command creates a temporary copy of an object archived on a remote tier. The copy automatically expires after 1 day by default.

rule

The mc ilm rule command and its subcommands configure the rules used to transition objects between storage tiers in MinIO’s Lifecycle Management.

tier

The mc ilm tier command and its subcommands configure a remote supported S3-compatible service for MinIO Lifecycle Management: Object Transition (“Tiering”).

4.114 - mc legalhold

Description

The mc legalhold command sets, removes, or retrieves the object legal hold (WORM) settings for object(s).

Subcommands

mc legalhold includes the following subcommands:

Subcommand

Description

clear

The mc legalhold clear command removes the current legal hold setting for an object or objects.

info

The mc legalhold info command returns the current legal hold setting for an object or objects.

set

The mc legalhold set command enables legal hold Write-Once Read-Many (WORM) object locking on an object or objects.

4.115 - mc license

Description

The mc license commands work with cluster registration for MinIO SUBNET. Use the commands to register a deployment, display information about the cluster’s current license, or update the license key for a cluster.

Subcommands

mc license includes the following subcommands:

Subcommand

Description

info

The mc license info command displays information about the MinIO deployment’s license status. Specifically, whether the deployment uses the AGPLv3 Open Source license of the MinIO Commercial License.

register

The mc license register command connects your deployment with your MinIO SUBNET account.

update

Use the mc license update command to replace a license key for a deployment.

4.116 - mc ls

Syntax

The mc ls command lists buckets and objects on MinIO or another S3-compatible service.

You can also use mc ls against the local filesystem to produce similar results as the ls command.

The following command lists all objects and object versions in the mydata bucket on the myminio MinIO deployment:

mc ls --recursive --versions myminio/mydata

The output resembles the following:

[2022-11-08 11:30:24 PST]    52MB  STANDARD log-data.csv
[2022-11-09 12:20:18 PST]    120MB WARM videos/event-2022-11-09.mp4
  • STANDARD marks objects stored on the MinIO deployment
  • WARM marks objects stored on the remote tier with matching name
  • videos/ indicates the prefix for the object

The command has the following syntax:

mc [GLOBALFLAGS] ls              \
                 [--incomplete]  \
                 [--recursive]   \
                 [--rewind]      \
                 [--versions]    \
                 [--summarize]   \
                 ALIAS [ALIAS ...]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The object or objects to copy.

For listing objects on MinIO, specify the alias and the full path to that object (e.g. bucket and path to object). For example:

mc ls play/mybucket/object.txt

For listing objects on a local filesystem, specify the full path to that object. For example:

mc ls ~/mydata/object.txt

If you specify a directory or bucket to ALIAS, you must also specify --recursive to recursively list the contents of that directory or bucket. If you omit the --recursive argument, ls only lists objects in the top level of the specified directory or bucket.

incomplete, -I

mc-cmd

Optional Returns any incomplete uploads on the specified ALIAS bucket.

--recursive, r

mc-cmd

Optional Recursively lists the contents of each bucket or directory in the ALIAS.

--rewind

mc-cmd

Optional

Directs mc ls to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --rewind and --versions together to display on those object versions which existed at a specific point in time.

--versions

mc-cmd

Optional

Directs mc ls to operate on all object versions that exist in the bucket.

--versions requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --versions and --rewind together to display on those object versions which existed at a specific point in time.

--summarize

mc-cmd

Optional Displays summarized information for the specified ALIAS path.

Global Flags

This command supports any of the global flags.

Examples

List Bucket Contents

Use mc ls to list the contents of a bucket:

mc ls [--recursive] ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.

  • Replace PATH with the path to the bucket on the S3-compatible host.

    If specifying the path to the S3 root (ALIAS only), include the --recursive option.

List Object Versions

Use mc ls --versions to list all versions of an object:

mc ls --versions ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket or object on the S3-compatible host.
Note

Requires Versioning

mc ls requires bucket versioning to use this feature. Use mc version to enable versioning on a bucket.

List Bucket Contents at Point in Time

Use mc ls --versions to list all versions of an object:

mc ls --rewind DURATION ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket or object on the S3-compatible host.
  • Replace DURATION with the point-in-time in the past at which the command returns the object. For example, specify 30d to return the version of the object 30 days prior to the current date.
Note

Requires Versioning

mc ls requires bucket versioning to use this feature. Use mc version to enable versioning on a bucket.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.117 - mc mb

Syntax

The mc mb command creates a new bucket or directory at the specified path.

You can also use mc mb against the local filesystem to produce similar results to the mkdir -p commandline tool.

The following command creates a new bucket mydata on the myminio MinIO deployment. The command creates the bucket with object locking enabled.

mc mb --with-locks myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] mb                   \
                 [--ignore-existing]  \
                 [--region "string"]  \
                 [--with-lock]        \
                 [--with-versioning]  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The MinIO or other S3-compatible service on which to create the new bucket.

For creating a bucket on MinIO, specify the alias and the name of the bucket. For example:

mc mb play/mybucket

For creating a directory on a local filesystem, specify the full path to that directory. For example:

mc mb ~/mydata/mydir
--ignore-existing, p

mc-cmd

Optional

Directs mc mb to do nothing if the bucket or directory already exists.

--region

mc-cmd

Optional

The region in which to create the specified bucket. Has no effect if the specified ALIAS is a filesystem directory.

If not specified, default value is us-east-1.

--with-lock, l

mc-cmd

Optional

Enables object locking on the specified bucket. Object locking requires, and therefore implies, enabling object versioning.

Warning

Important

You can only enable object locking when creating the bucket. Buckets created without object locking cannot use Bucket Lifecycle Management or Bucket Object Locking functionality.

--with-versioning

mc-cmd

Optional

Enables object versioning on the new bucket. With versioning enabled, by default MinIO allows up to the maximum value of an Int64 versions per object, or over 9.2 quintillion. Define object expiration rules to remove versions of objects no longer needed, such as by the number of versions or the date of versions.

Versioning is required for bucket replication or site replication. Versioning does not imply or require object locking.

Global Flags

This command supports any of the global flags.

Examples

Create Bucket with Object Locking

Use mc mb to create a bucket on an S3-compatible host. The --with-lock option creates the bucket with locking enabled:

mc mb --with-lock ALIAS/BUCKET
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace BUCKET with the bucket to create.

Create a New Bucket in a Specific Region

Use mc mb to create a bucket on an S3-compatible host. The --region option creates the bucket in a desired region.

mc mb --region --region=us-west-2 myminio/mynewbucket

The above command creates a new bucket, mynewbucket on the myminio bucket within the us-west-2 region.

Create a New Bucket with Versioning Enabled

mc mb --with-versioning myminio/myversionedbucket

The above command creates a new bucket, myversionedbucket, on the myminio alias. The new bucket enables object versioning for all objects in the bucket.

Behavior

Bucket Limits Per Deployment

MinIO does not limit the number of buckets you can create on a deployment. However, MinIO recommends no more than 500,000 buckets per deployment as a general guideline.

Bucket Limits for Non-MinIO S3 Services

Certain S3 services may restrict the number of buckets a given user or account can create. For example, Amazon S3 limits each account to 100 buckets. mc mb may return an error if the user has reached bucket limits on the target S3 service.

MinIO Object Storage deployments do not place any limits on the number of buckets each user can create.

Enable Object Locking at Bucket Creation

MinIO follows AWS S3 behavior where you must enable object locking at bucket creation. Buckets created without object locking can never enable object retention or locking.

Enabling bucket locking does not set any object locking or retention settings. Consider enabling bucket locking as standard practice.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.118 - mc mirror

Syntax

The mc mirror command synchronizes content to MinIO deployment, similar to the rsync utility. mc mirror supports filesystems, MinIO deployments, and other S3-compatible hosts as the synchronization source.

Note

Note

mc mirror only synchronizes the current object without any version information or metadata. To synchronize an object’s version history and metadata, consider using mc replicate for bucket replication or mc admin replicate for site replication.

The following command synchronizes content from a local filesystem directory to the mydata bucket on the myminio MinIO deployment.

mc mirror --watch ~/mydata myminio/mydata

The command “watches” for files added or removed on the local filesystem and synchronizes those operations to MinIO until explicitly terminated.

mc mirror --watch updates files changed on the local filesystem to MinIO (see --overwrite). --watch does not remove other files from MinIO not present on the local filesystem (see --remove).

The command has the following syntax:

mc [GLOBALFLAGS] mirror                            \
                 [--active-active]                 \
                 [--attr "string"]                 \
                 [--checksum "value"]              \
                 [--disable-multipart]             \
                 [--dry-run]                       \
                 [--enc-kms "string"]              \
                 [--enc-s3 "string"]               \
                 [--enc-c "string"]                \
                 [--exclude "string"]              \
                 [--exclude-bucket "string"]       \
                 [--exclude-storageclass "string"] \
                 [--limit-download string]         \
                 [--limit-upload string]           \
                 [--md5]                           \
                 [--monitoring-address "string"]   \
                 [--newer-than "string"]           \
                 [--older-than "string"]           \
                 [--overwrite]                     \
                 [--preserve]                      \
                 [--region "string"]               \
                 [--remove]                        \
                 [--retry]                         \
                 [--skip-errors]                   \
                 [--storage-class "string"]        \
                 [--summary]                       \
                 [--watch]                         \
                 SOURCE                            \
                 TARGET
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

SOURCE

mc-cmd

Required

The file(s) or object(s) to synchronize to the TARGET S3 host.

For objects on S3-compatible hosts, specify the path to the object as ALIAS/PATH, where:

  • ALIAS is the alias of a configured S3-compatible host, and
  • PATH is the path to the bucket or object. If specifying a bucket, mc mirror synchronizes all objects in the bucket.
mc mirror [FLAGS] play/mybucket/ myminio/mybucket

For files on a filesystem, specify the full filesystem path to the file or directory :

mc mirror [FLAGS] ~/data/ myminio/mybucket

If specifying a directory, mc mirror synchronizes all files in the directory.

TARGET

mc-cmd

Required

The full path to bucket to which mc mirror synchronizes SOURCE objects. Specify the TARGET as ALIAS/PATH, where:

  • ALIAS is the alias of a configured S3-compatible host, and
  • PATH is the path to the bucket.
mc mirror SOURCE play/mybucket

mc mirror uses the object or file names from the SOURCE when synchronizing to the TARGET bucket.

--active-active

mc-cmd

Optional

Establish active-active mirror activities between two sites. The command must be repeated on each site.

For example:

On site A, to mirror from A to B

mc mirror --active-active siteA siteB

On site B, to mirror from B to A

mc mirror --active-active siteB siteA
--attr

mc-cmd

Optional

Add custom metadata for mirrored objects. Specify key-value pairs as KEY=VALUE\;. For example, --attr key1=value1\;key2=value2\;key3=value3.

--checksum

mc-cmd

Optional

Note

Added: RELEASE.2024-10-02T08-27-28Z

Add a checksum to an uploaded object.

Valid values are: - MD5 - CRC32 - CRC32C - SHA1 - SHA256

The flag requires server trailing headers and works with AWS or MinIO targets.

--disable-multipart

mc-cmd

Optional

Disables multipart upload for the synchronization session.

--dry-run

mc-cmd

Optional

Perform a mock mirror operation. Use this operation to test that the mc mirror operation will only mirror the desired objects or buckets.

--enc-kms

mc-cmd

Encrypt or decrypt objects using server-side SSE-KMS encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify an existing data key on the external KMS.

See the mc admin kms key create reference for creating data keys.

For example:

--enc-kms "myminio/mybucket/prefix/object.obj=mybucketencryptionkey"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-kms "myminio/mybucket/prefix/=mybucketencryptionkey"
--enc-s3

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-S3 encryption with KMS-managed keys. Specify the full path to the object as alias/bucket/prefix/object.

For example:

--enc-s3 "myminio/mybucket/prefix/object.obj"

You can specify the parameter multiple times to denote different object(s) to encrypt:

--enc-s3 "myminio/mybucket/foo/fooobject.obj" --enc-s3 "myminio/mybucket/bar/barobject.obj"

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-s3 "myminio/mybucket/foo"
--enc-c

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

  • KEY - the full path to the object as alias/bucket/path/object.
  • VALUE - the 32-byte RAW Base64-encoded data key to use for encrypting object(s).

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"
Note

Note

MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.

--exclude

mc-cmd

Optional

Exclude object(s) in the SOURCE path that match the specified object name pattern.

--exclude-bucket

mc-cmd

Optional

Note

Added: mc

RELEASE.2024-03-03T00-13-08Z

Exclude bucket(s) in the SOURCE path that match the specified bucket name pattern.

--exclude-storageclass

mc-cmd

Optional

Exclude object(s) on the SOURCE that have the specified storage class. You can use this flag multiple times in a command to exclude objects from more than one storage class.

Use this to exclude objects with storage classes that require rehydration or restoration of objects, such as migrating from an AWS S3 bucket where some objects have the GLACIER or DEEP_ARCHIVE storage classes.

--limit-download

mc-cmd

Optional

Limit client-side download rates to no more than a specified rate in KiB/s, MiB/s, or GiB/s. This affects only the download to the local device running the MinIO Client. Valid units include:

  • B for bytes
  • K for kilobytes
  • M for megabytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Mi for mibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit download rates to no more than 1 GiB/s, use the following:

--limit-download 1G

If not specified, MinIO uses an unlimited download rate.

--limit-upload

mc-cmd

Optional

Limit client-side upload rates to no more than the specified rate in KiB/s, MiB/s, or GiB/s. This affects only the upload from the local device running the MinIO Client. Valid units include:

  • B for bytes
  • K for kilobytes
  • M for megabytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Mi for mibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit upload rates to no more than 1 GiB/s, use the following:

--limit-upload 1G

If not specified, MinIO uses an unlimited upload rate.

--md5

mc-cmd

Optional

Forces all uploads to calculate MD5 checksums.

--monitoring-address

mc-cmd

Optional

Creates a Prometheus endpoint for monitoring mirroring activity. Specify the local network adapter and port address on which to create the scraping endpoint. Defaults to localhost:8081).

--newer-than

mc-cmd

Optional

Mirror object(s) newer than the specified number of days. Specify a string in #d#hh#mm#ss format For example: --newer-than 1d2hh3mm4ss.

--older-than

mc-cmd

Optional

Mirror object(s) older than the specified time limit. Specify a string in #d#hh#mm#ss format. For example: --older-than 1d2hh3mm4ss.

Defaults to 0 (all objects).

--overwrite

mc-cmd

Optional

Overwrites object(s) on the TARGET.

For example, consider an active mc mirror --overwrite synchronizing content from Source to Destination.

If an object on Source changes, mc mirror --overwrite synchronizes and overwrites any matching file on Destination.

Without --overwrite, if an object already exists on the Destination, the mirror process fails to synchronize that object. mc mirror logs an error and continues to synchronize other objects.

--preserve, a

mc-cmd

Optional

Preserve file system attributes and bucket policy rules of the SOURCE on the TARGET.

--region

mc-cmd

Optional

Specify the string region when creating new bucket(s) on the target.

Defaults to "us-east-1".

--remove

mc-cmd

Optional

Removes object(s) on the Target that do not exist on the Source.

Use the --remove flag to have the same list of objects on both Source and Target.

For example, objects A, B, and C exist on Source. Objects C, D, and E exist on Target.

When running mc mirror --remove, objects A and B synchronize to Target and objects D and E are removed from Target. Since an object C already exists on both, nothing moves from Source to Target.

After the action, only objects A, B, and C exist on both the Source and the Target.

mc mirror --remove does not verify that the contents of object C are the same on both Source and Target, only that an object called C exists on both. To ensure objects on the Source and Target match both names and content, use --overwrite or --watch.

Note

Changed: RELEASE.2023-05-04T18-10-16Z

mc mirror --remove returns an error if the target path is a local filesystem directory that does not exist.

In prior versions, specifying /path/to/directory would result in the removal of the /path/to folder if directory did not exist.

--retry

mc-cmd

Optional

In case of errors during mirror process, retry on each errored object.

--storage-class, sc

mc-cmd

Optional

Set the storage class for the new object(s) on the TARGET.

See the Amazon documentation on Storage Classes for more information on S3 storage classses.

--skip-errors

mc-cmd

Optional

Note

Added: mc

RELEASE.2024-01-28T16-23-14Z

Skip any objects that produce errors while mirroring.

--summary

mc-cmd

Optional

On completion, output a summary of the data that was synchronized.

--watch, w

mc-cmd

Optional

Use --watch flag to mirror objects from Source to Target, where the Target may also have additional objects not present on the Source.

  • --watch continuously synchronizes files from Source to Target until explicitly terminated
  • The Target may have files that do not exist on Source
  • --watch overwrites objects on the Target if a match exists on Source, like the --overwrite flag

Defaults to 0 (all objects).

For example, object A and B exist on the watched Source. Objects A, B, and C exist on the watched Target.

A client writes object D to Source and removes object B.

After the operation, objects A and D exist on the Source. Objects A, C, and D exist on the Target.

Global Flags

This command supports any of the global flags.

Examples

Mirror a Local Directory to an S3-Compatible Host

Use mc mirror to mirror files from a filesystem to an S3 Host:

mc mirror FILEPATH ALIAS/PATH
  • Replace FILEPATH with the full file path to the directory to mirror.
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the destination bucket.

Continuously Mirror a Local Directory to an S3-Compatible Host

Use mc mirror with --watch to continuously mirror files from a filesystem to an S3-compatible host where objects added to or deleted from the filesystem are added to or deleted from the host:

mc mirror --watch FILEPATH ALIAS/PATH
  • Replace FILEPATH with the full file path to the directory to mirror.
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the destination bucket.

Continuously Mirror S3 Bucket to an S3-Compatible Host

Use mc mirror with --watch to continuously mirror objects in a bucket on one S3-compatible host to another S3-compatible host where objects added to or deleted from the bucket are added to or deleted from the host.

mc mirror --watch SRCALIAS/SRCPATH TGTALIAS/TGTPATH
  • Replace SRCALIAS with alias of a configured S3-compatible host.
  • Replace SRCPATH with the bucket to mirror.
  • Replace TGTALIAS with the alias of a configured S3-compatible host.
  • Replace TGTPATH with the destination bucket.

Mirror Objects from AWS S3 to MinIO Skipping Objects in GLACIER

Use mc mirror with --exclude-storageclass to mirror objects from AWS S3 to MinIO without mirroring objects in GLACIER or DEEP_ARCHIVE storage.

mc mirror --exclude-storageclass GLACIER  \
   --exclude-storageclass DEEP_ARCHIVE SRCALIAS/SRCPATH TGALIAS/TGPATH
  • Replace SRCALIAS with the alias of a configured S3 host.
  • Replace SRCPATH with the bucket to mirror.
  • Replace TGTALIAS with the alias of a configured S3 host.
  • Replace TGTPATH with the destination bucket.

Behavior

Mirror Continues on Failed Object

If an object of the same name exists on the target, MinIO outputs an error for the duplicate object. mc mirror continues to mirror other objects from the source to the destination after the error.

MinIO Trims Empty Prefixes on Object Removal

The mc mirror --watch command continuously synchronizes the source and destination targets for added and deleted objects. This includes automatically removing objects on the destination if they are removed on the source.

For objects updated on the source to also update on the target, use –overwrite. To remove objects from the target that are not on the source, use –remove.

mc mirror --watch relies on the mc removal API for deleting objects. As part of removing the last object in a bucket prefix, mc also recursively removes each empty part of the prefix up to the bucket root. mc only applies the recursive removal to prefixes created implicitly as part of object write operations - that is, the prefix was not created using an explicit directory creation command such as mc mb.

For example, consider a bucket photos with the following object prefixes:

  • photos/2021/january/myphoto.jpg
  • photos/2021/february/myotherphoto.jpg
  • photos/NYE21/NewYears.jpg

photos/NYE21 is the only prefix explicitly created using mc mb. All other prefixes were implicitly created as part of writing the object located at that prefix.

If an mc command removes myphoto.jpg, the removal API automatically trims the empty /january prefix. If a subsequent mc command removes myotherphoto.jpg, the removal API automatically trims both the /february prefix and the now-empty /2021 prefix. If an mc command removes NewYears.jpg, the /NYE21 prefix remains in place since it was explicitly created.

If using mc mirror --watch for operations on a filesystem, mc applies this same behavior by recursively trimming empty directory paths up to the root. However, the mc remove API cannot distinguish between an explicitly created directory path and an implicitly created one. If mc mirror --watch deletes the last object at a filesystem path, mc recursively deletes all empty directories within that path up to the root as part of the removal operation.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.119 - mc mv

Syntax

The mc mv command moves an object from source to the target, such as between MinIO deployments or between buckets on the same MinIO deployment. mc mv also supports moving objects between a local filesystem and MinIO.

You can also use mc mv against the local filesystem to produce similar results to the mv commandline tool.

The following command moves objects from the mydata bucket to the archive bucket on the myminio MinIO deployment:

mc mv --recursive myminio/mydata myminio/archive

The command has the following syntax:

mc [GLOBALFLAGS] mv         \
[--attr "string"]           \
[--disable-multipart]       \
[--enc-kms "string"]        \
[--enc-s3 "string"]         \
[--enc-c "string"]          \
[--limit-download string]   \
[--limit-upload string]     \
[--newer-than "string"]     \
[--older-than "string"]     \
[--preserve]                \
[--recursive]               \
[--storage-class "string"]  \
SOURCE [SOURCE...]          \
TARGET
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

SOURCE

mc-cmd

:required:

mc-cmd

The object or objects to move.

For moving an object from a MinIO bucket, specify the alias and the full path to the object(s) (e.g. bucket and path to objects). For example:

mc mv play/mybucket/object.txt play/myotherbucket/object.txt

For moving an object from a local filesystem, specify the full path to that object. For example:

mc mv ~/mydata/object.txt play/mybucket/object.txt

Specify multiple SOURCE paths to move multiple objects to the specified TARGET. mc rm treats the last specified alias or filesystem path as the TARGET. For example:

mc mv ~/mydata/object.txt play/mydata/otherobject.txt myminio/mydata

If you specify a directory or bucket to SOURCE, you must also specify --recursive to recursively move the contents of that directory. If you omit the --recursive argument, mv only moves objects in the top level of the specified directory or bucket.

TARGET

mc-cmd

Required

The full path to the bucket to which the command moves the object(s) at the specified SOURCE. Specify the alias of a configured S3 service as the prefix to the TARGET path.

For moving an object from MinIO, specify the alias and hte full path to the object(s) (e.g. bucket and path to objects). For example:

mc mv play/mybucket/object.txt play/myotherbucket/object.txt

For moving an object from a local filesystem, specify the full path to that object. For example:

mc mv ~/mydata/object.txt play/mybucket/object.txt

The TARGET object name can differ from the SOURCE to “rename” the object as part of the move operation.

If running mc mv with the --recursive option, mc mv treats the TARGET as the bucket prefix for all objects at the SOURCE.

--attr

mc-cmd

Optional

Add custom metadata for the object. Specify key-value pairs as KEY=VALUE\;. For example, --attr key1=value1\;key2=value2\;key3=value3.

--disable-multipart

mc-cmd

Optional

Disables the multipart upload feature.

Multipart upload breaks an object into a set of separate parts. Each part uploads individually and in any order. If any individual part upload fails, MinIO retries that part without affecting the other parts. After upload completes, the parts combine to restore the original object.

MinIO recommends using multipart upload for any object larger than 100 MB. For more information on multipart upload, refer to the Amazon S3 documentation

--enc-kms

mc-cmd

Encrypt or decrypt objects using server-side SSE-KMS encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify an existing data key on the external KMS.

See the mc admin kms key create reference for creating data keys.

For example:

--enc-kms "myminio/mybucket/prefix/object.obj=mybucketencryptionkey"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-kms "myminio/mybucket/prefix/=mybucketencryptionkey"
--enc-s3

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-S3 encryption with KMS-managed keys. Specify the full path to the object as alias/bucket/prefix/object.

For example:

--enc-s3 "myminio/mybucket/prefix/object.obj"

You can specify the parameter multiple times to denote different object(s) to encrypt:

--enc-s3 "myminio/mybucket/foo/fooobject.obj" --enc-s3 "myminio/mybucket/bar/barobject.obj"

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-s3 "myminio/mybucket/foo"
--enc-c

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

  • KEY - the full path to the object as alias/bucket/path/object.
  • VALUE - the 32-byte RAW Base64-encoded data key to use for encrypting object(s).

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"
Note

Note

MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.

--limit-download

mc-cmd

Optional

Limit client-side download rates to no more than a specified rate in KiB/s, MiB/s, or GiB/s. This affects only the download to the local device running the MinIO Client. Valid units include:

  • B for bytes
  • K for kilobytes
  • M for megabytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Mi for mibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit download rates to no more than 1 GiB/s, use the following:

--limit-download 1G

If not specified, MinIO uses an unlimited download rate.

--limit-upload

mc-cmd

Optional

Limit client-side upload rates to no more than the specified rate in KiB/s, MiB/s, or GiB/s. This affects only the upload from the local device running the MinIO Client. Valid units include:

  • B for bytes
  • K for kilobytes
  • M for megabytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Mi for mibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, to limit upload rates to no more than 1 GiB/s, use the following:

--limit-upload 1G

If not specified, MinIO uses an unlimited upload rate.

--newer-than

mc-cmd

Optional

Remove object(s) newer than the specified number of days. Specify a string in ##d#hh#mm#ss format. For example: --newer-than 1d2hh3mm4ss.

Defaults to 0 (all objects).

--older-than

mc-cmd

Optional

Remove object(s) older than the specified time limit. Specify a string in #d#hh#mm#ss format. For example: --older-than 1d2hh3mm4ss.

Defaults to 0 (all objects).

--preserve, a

mc-cmd

Optional

Preserve file system attributes and bucket policy rules of the SOURCE directories, buckets, and objects on the TARGET bucket(s).

--recursive, r

mc-cmd

Optional

Recursively move the contents of each bucket or directory SOURCE to the TARGET bucket.

--storage-class

mc-cmd

Optional

Set the storage class for the new object(s) on the TARGET.

See the Amazon documentation on Storage Classes for more information on S3 storage classses.

Global Flags

This command supports any of the global flags.

Examples

Move Files from Filesystem to S3-Compatible Host

mc mv [--recursive] FILEPATH ALIAS/PATH
  • Replace FILEPATH with the full file path to the file to move.

    If specifying the path to a directory, include the --recursive flag.

    mc mv removes the files from the source after successfully moving it to the destination.

  • Replace ALIAS with the alias of a configured S3-compatible host.

  • Replace PATH with the destination bucket.

Move a File from Filesystem to S3-Compatible Host with Custom Metadata

Use mc mv with the --attr option to set custom attributes on file(s).

mc mv --attr "ATTRIBUTES" FILEPATH ALIAS/PATH
  • Replace FILEPATH with the full file path to the file to move. mc mv removes the file from the source after successfully moving it to the destination.
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the destination bucket.
  • Replace ATTRIBUTES with one or more comma-separated key-value pairs KEY=VALUE. Each pair represents one attribute key and value.

Move Bucket Between S3-Compatible Services

 mc mv --recursive SRCALIAS/SRCPATH TGTALIAS/TGTPATH
  • Replace SRCALIAS with the alias of a configured S3-compatible host.
  • Replace SRCPATH with the path to the bucket. mc mv removes the bucket and its contents from the source after successfully moving it to the destination.
  • Replace TGTALIAS with the alias of a configured S3-compatible host.
  • Replace TGTPATH with the path to the bucket.

Move File to S3-Compatible Host with Specific Storage Class

Use mc mv with the --storage-class option to set the storage class on the destination S3-compatible host.

mc mv --storage-class CLASS FILEPATH ALIAS/PATH
  • Replace CLASS with the storage class to associate to the files.

  • Replace FILEPATH with the full file path to the file to move. mc mv removes the file from the source after successfully moving it to the destination.

  • Replace ALIAS with the alias of a configured S3-compatible host.

  • Replace PATH with the destination bucket.

  • Replace ATTRIBUTES with one or more comma-separated key-value pairs KEY=VALUE. Each pair represents one attribute key and value.

    mc mv –storage-class REDUCED_REDUNDANCY myobject.txt play/mybucket

Behavior

Object Names on Move

MinIO uses the SOURCE object name when moving the object to the TARGET if no explicit target object name is specified.

You can specify a different object name for the TARGET with the same object path to “rename” an object. For example:

mc mv play/mybucket/object.txt play/mybucket/myobject.txt

For recursive move operations (mc mv --recursive), MinIO treats the TARGET path as a prefix for objects on the SOURCE.

Checksum Verification

mc mv verifies all move operations to object storage using MD5SUM checksums.

MinIO Trims Empty Prefixes on Object Removal

mc mv relies on the mc removal API for deleting objects. As part of removing the last object in a bucket prefix, mc also recursively removes each empty part of the prefix up to the bucket root. mc only applies the recursive removal to prefixes created implicitly as part of object write operations - that is, the prefix was not created using an explicit directory creation command such as mc mb.

For example, consider a bucket photos with the following object prefixes:

  • photos/2021/january/myphoto.jpg
  • photos/2021/february/myotherphoto.jpg
  • photos/NYE21/NewYears.jpg

photos/NYE21 is the only prefix explicitly created using mc mb. All other prefixes were implicitly created as part of writing the object located at that prefix.

If an mc command removes myphoto.jpg, the removal API automatically trims the empty /january prefix. If a subsequent mc command removes myotherphoto.jpg, the removal API automatically trims both the /february prefix and the now-empty /2021 prefix. If an mc command removes NewYears.jpg, the /NYE21 prefix remains in place since it was explicitly created.

If using mc mv for operations on a filesystem, mc applies this same behavior by recursively trimming empty directory paths up to the root. However, the mc remove API cannot distinguish between an explicitly created directory path and an implicitly created one. If mc mv deletes the last object at a filesystem path, mc recursively deletes all empty directories within that path up to the root as part of the removal operation.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.120 - mc od

Syntax

The mc od command copies a local file to a remote location in a specified number of parts and part sizes. The command outputs the time it took to upload the file.

Use the mc od to mimic the functionality of the Linux dd command.

The following command Upload 200MiB of a file to a bucket in 5 parts of size 40MiB. The output shows the results of the upload, including the length of time it took for the upload to complete.

mc od if=file.zip of=myminio/mybucket/file.zip size=40MiB parts=5

If passing the --json global flag, the output of the command resembles the following:

{
  "source": "home/user/file.zip"
  "target": "myminio/mybucket/file.zip"
  "partSize": 41943040
  "totalSize": 209715200
  "parts": 5
  "elapsed": "314ms"
}

The command has the following syntax:

mc [GLOBALFLAGS] od                                            \
                 if=<path of source file to upload>            \
                 of=<target MinIO path to upload to>           \
                 [size=<size of file>]                         \
                 [parts=<number of parts to split file into>]  \
                 [skip=<number of parts to skip>]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

if

mc-cmd

Required

The path of the source object to use for the upload. Use the full path relative to your current location.

mc od if=file.zip of=myminio/mybucket/file.zip
of

mc-cmd

Required

The full target path to upload the object to.

size

mc-cmd

Optional

The size for each part of the file to upload. If not specified, MinIO determines the size for parts from the source stream.

parts

mc-cmd

Optional

The number of parts to divide the object into for uploading. If not specified, MinIO determines the number of parts based on the size of the source stream.

skip

mc-cmd

Optional

The number of parts of the file to skip during the upload. For example, use this option to test the upload speed for a large file of many parts on only a portion of the object’s parts.

Global Flags

This command supports any of the global flags.

Examples

Upload a Full File with 40MiB Parts

Use mc od to upload a file to MinIO in a set of parts of specified size. The size option allows you to specify the desired part size.

mc od if=file.zip of=myminio/mybucket/file.zip size=40MiB
  • Replace myminio/mybucket/file.zip with the path of the object or file stream to upload.
  • Replace size with the desired size of the object parts.

MinIO examines the source file and divides it into the necessary number of parts so that no part is larger than the specified 40MiB part size.

Upload a First Five 40 MiB Parts of a File

Use mc od to upload parts of a file to MinIO of specified part size. The size option allows you to specify the desired part size. The parts option allows you to specify the total number of parts to use for the object.

mc od if=file.zip of=myminio/mybucket/file.zip size=40MiB parts=5
  • Replace myminio/mybucket/file.zip with the path of the object or file stream to upload.
  • Replace size with the desired size of the object parts.
  • Replace parts with the number of desired parts to use for the object.

In this command example, if the source object stream is larger than 200MiB (40MiB × 5 parts), only the first 200MiB of the file upload.

Warning

Important

Using the command this way may not upload the entirety of an object.

Upload a Full File in 5 Parts

Take a source file, divide the file into a specified number of parts, then upload all parts of the file to a MinIO target.

mc od if=file.zip of=myminio/mybucket/file.zip parts=5

The above command divides the source file into five equal parts, then uploads those parts.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.121 - mc ping

Syntax

The mc ping command performs a liveness check on a specified target.

The following sends a response request to the target(s) and outputs the minimum, maximum, average, and roundtrip times of the response, as well as the number of errors encountered when processing the request.

mc ping play --count 5

The command pings the deployment at the alias play for five cycles. The output resembles the following:

1: https://play.min.io   min=213.00ms   max=213.00ms   average=213.00ms   errors=0   roundtrip=213.00ms
2: https://play.min.io   min=67.15ms    max=213.00ms   average=140.07ms   errors=0   roundtrip=67.15ms
3: https://play.min.io   min=67.15ms    max=213.00ms   average=115.85ms   errors=0   roundtrip=67.41ms
4: https://play.min.io   min=61.26ms    max=213.00ms   average=102.20ms   errors=0   roundtrip=61.26ms
5: https://play.min.io   min=61.26ms    max=213.00ms   average=95.03ms    errors=0   roundtrip=66.36ms

The command has the following syntax:

mc [GLOBALFLAGS] ping                       \
                 TARGET                     \
                 [--count, -c value]        \
                 [--error-count, -e value]  \
                 [--interval, -i value]     \
                 [--distributed, -a value]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The full path to the alias or prefix where the command should run.

--count

mc-cmd

Optional

Specify the number of times to perform the check.

If not specified, the liveness check performs continuously until stopped.

--error-count

mc-cmd

Optional

Specify a number of errors to receive before exiting.

For example, to stop the ping process after receiving five errors, use

mc ping TARGET -e 5
--exit

mc-cmd

Optional

Note

Added: RELEASE.2023-05-30T22-41-38Z

Exit after the first successful check.

--interval

mc-cmd

Optional

The length of time in seconds to wait between requests.

By default, the command waits 1 second between requests.

--distributed

mc-cmd

Optional

Send requests to all servers in the MinIO cluster.

Note

Note

Use this option for distributed deployments where you have direct access to each node or pod. This flag does not work when nodes are placed behind a service, such as a load balancer.

Global Flags

This command supports any of the global flags.

Examples

Return Latency and Liveness for 5 Requests

The following command sends a liveness check for a deployment with the alias myminio five times, outputs the result of each check, then ends.

mc ping myminio --count 5

Send Liveness Checks Repeatedly with 5 Minute Wait Between Each Request

The following command sends continuous liveness check requests with an interval of 5 minutes (300 seconds) between each request.

mc ping myminio --interval 300

End Liveness Checks for Error Counts Greater Than 20

The following command sends continuous liveness checks until 20 errors have been encountered:

mc ping myminio --error-count 20

4.122 - mc pipe

Syntax

The mc pipe command streams content from STDIN to a target object.

The following command writes contents of STDIN to an S3 compatible storage.

echo "My Meeting Notes" | mc pipe s3/engineering/meeting-notes.txt

The command has the following syntax:

mc [GLOBALFLAGS] pipe                              \
                 TARGET                            \
                 [--attr "string"]                 \
                 [--checksum "string"]             \
                 [--enc-kms "string"]              \
                 [--enc-s3 "string"]               \
                 [--enc-c "string"]                \
                 [--storage-class, --sc "string"]  \
                 [--tags "string"]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Note

Changed: RELEASE.2023-01-11T03-14-16Z

mc pipe now supports concurrent uploads for better throughput of large streams.

Parameters

TARGET

mc-cmd

Required

The full path to the alias or prefix where the command should run.

--attr

mc-cmd

Optional

Add custom metadata for the object.

Specify key-value pairs as KEY=VALUE\;, separating each pair with a back slash and semicolon (\;). For example, --attr key1=value1\;key2=value2\;key3=value3.

--checksum

mc-cmd

Optional

Note

Added: RELEASE.2024-10-02T08-27-28Z

Add a checksum to an uploaded object.

Valid values are: - MD5 - CRC32 - CRC32C - SHA1 - SHA256

The flag requires server trailing headers and works with AWS or MinIO targets.

--enc-kms

mc-cmd

Encrypt or decrypt objects using server-side SSE-KMS encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify an existing data key on the external KMS.

See the mc admin kms key create reference for creating data keys.

For example:

--enc-kms "myminio/mybucket/prefix/object.obj=mybucketencryptionkey"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-kms "myminio/mybucket/prefix/=mybucketencryptionkey"
--enc-s3

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-S3 encryption with KMS-managed keys. Specify the full path to the object as alias/bucket/prefix/object.

For example:

--enc-s3 "myminio/mybucket/prefix/object.obj"

You can specify the parameter multiple times to denote different object(s) to encrypt:

--enc-s3 "myminio/mybucket/foo/fooobject.obj" --enc-s3 "myminio/mybucket/bar/barobject.obj"

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-s3 "myminio/mybucket/foo"
--enc-c

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

  • KEY - the full path to the object as alias/bucket/path/object.
  • VALUE - the 32-byte RAW Base64-encoded data key to use for encrypting object(s).

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"
Note

Note

MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.

--storage-class, --sc

mc-cmd

Optional

Set the storage class for the new object at the TARGET.

See Amazons documentation for more information on S3 storage classes.

--tags

mc-cmd

Optional

Applies one or more tags to the TARGET.

Specify an ampersand-separated list of key-value pairs as KEY1=VALUE1&KEY2=VALUE2, where each pair represents one tag to assign to the objects.

Global Flags

This command supports any of the global flags.

Examples

Write Contents of STDIN to the Local Filesystem

The following command writes the contents of STDIN to the /tmp folder on the local filesystem.

mc pipe /tmp/hello-world.go

Copy an ISO Image to S3 Storage

The following command first streams the contents of an iso image for Debian and then uses the stream to create the object at an S3 path.

cat debian-live-11.5.0-amd64-mate.iso | mc pipe s3/opensource-isos/debian-11-5.iso

Stream MySQL Database Dump to S3

The following command first streams a MySQL database and uses the stream to create a backup on S3 with mc pipe:

mysqldump -u root -p ******* accountsdb | mc pipe s3/sql-backups/backups/accountsdb-sep-28-2022.sql

Write a File to a Reduced Redundancy Storage Class

The following command takes the STDIN stream and creates an object on the Reduced Redundancy storage class on S3.

 mc pipe --storage-class REDUCED_REDUNDANCY s3/personalbuck/meeting-notes.txt

Copy a File to a MinIO Deployment with Metadata

The following command uploads an MP3 file to a MinIO deployment with an ALIAS of myminio and a music bucket. The object writes with some metadata for Cache-Control and Artist.

cat music.mp3 | mc pipe --attr "Cache-Control=max-age=90000,min-fresh=9000;Artist=Unknown" myminio/music/guitar.mp3

Set Tags on Uploaded Objects

The following command creates an object on a MinIO deployment with an ALIAS of myminio in bucket mybucket with two tags. MinIO supports adding up to 10 custom tags to an object.

tar cvf - . | mc pipe --tags "category=prod&type=backup" myminio/mybucket/backup.tar

4.123 - mc put

Note

Added: mc

RELEASE.2024-02-24T01-33-20Z

Syntax

The mc put uploads an object from the local file system to a bucket on a target S3 deployment.

mc put provides a simplified interface for uploading files compared to mc cp or mc mirror. mc put uses a one-way upload function that trades efficiency for the power and complexity of the other commands.

The following uploads the file logo.png from the local file system at path ~/images/collateral/ to a bucket called marketing on the MinIO deployment with the alias of minio.

mc put ~/images/collateral/logo.png minio/marketing

The command has the following syntax:

mc [GLOBALFLAGS] put                            \
                 TARGET                         \
                 [--checksum value]             \
                 [--disable-multipart]          \
                 [--enc-kms value]              \
                 [--enc-s3 value]               \
                 [--enc-c value]                \
                 [--if-not-exists]              \
                 [--parallel, -P integer]       \
                 [--part-size, -s string]       \
                 [--storage-class, -sc string]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The full path to the alias or prefix where the command should run. The TARGET must contain an alias and bucket name.

The TARGET may also contain the following optional components: - PREFIX where the object should upload to - OBJECT-NAME to use in place of the file names

Valid TARGETs could take any of the following forms: - ALIAS/BUCKET - ALIAS/BUCKET/PREFIX - ALIAS/BUCKET/OBJECT-NAME - ALIAS/BUCKET/PREFIX/OBJECT-NAME

--checksum

mc-cmd

Optional

Note

Added: RELEASE.2024-10-02T08-27-28Z

Add a checksum to an uploaded object.

Valid values are: - MD5 - CRC32 - CRC32C - SHA1 - SHA256

The flag requires server trailing headers and works with AWS or MinIO targets.

--disable-multipart

mc-cmd

Optional

Note

Added: RELEASE.2024-10-02T08-27-28Z

Disables multipart uploads and directs mc to send the object in a single PUT operation.

--enc-kms

mc-cmd

Encrypt or decrypt objects using server-side SSE-KMS encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify an existing data key on the external KMS.

See the mc admin kms key create reference for creating data keys.

For example:

--enc-kms "myminio/mybucket/prefix/object.obj=mybucketencryptionkey"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-kms "myminio/mybucket/prefix/=mybucketencryptionkey"
--enc-s3

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-S3 encryption with KMS-managed keys. Specify the full path to the object as alias/bucket/prefix/object.

For example:

--enc-s3 "myminio/mybucket/prefix/object.obj"

You can specify the parameter multiple times to denote different object(s) to encrypt:

--enc-s3 "myminio/mybucket/foo/fooobject.obj" --enc-s3 "myminio/mybucket/bar/barobject.obj"

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-s3 "myminio/mybucket/foo"
--enc-c

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

  • KEY - the full path to the object as alias/bucket/path/object.
  • VALUE - the 32-byte RAW Base64-encoded data key to use for encrypting object(s).

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"
Note

Note

MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.

--parallel, --P

mc-cmd

Optional

For multi-part uploads, specify the number of parts of the object to upload in parallel.

If not defined, defaults to a value of 4.

--part-size, -s

mc-cmd

Optional

Specify the size to use for each part of a multi-part upload.

If not defined, defaults to a value of 16MiB.

--storage-class, -sc

mc-cmd

Optional

Set the storage class for the uploaded object.

See Standard Storage Class for more about storage classes.

Global Flags

This command supports any of the global flags.

Examples

Upload a File and Specify the Object Name

The following command uploads the file logo.png from the local file system to the business bucket on the minio deployment, uploading it on the destination as company-logo.png.

mc put images/collateral/logo.png minio/business/company-logo.png

Upload a Multipart Object in Parallel with a Specified Part Size

The following command uploads a file in chunks of 20MiB each and uploads 8 parts of the file in parallel. 8 parts are uploaded in succession until all parts of the object have uploaded.

mc put ~/videos/collateral/splash-page.mp4 minio/business --parallel 8 --part-size 20MiB

4.124 - mc rb

Syntax

The mc rb command removes one or more buckets on MinIO or another S3-compatible service.

To remove only the contents of a bucket, use mc rm instead.

Warning

Important

mc rb permanently deletes bucket(s) on the target deployment, including any and all object versions and bucket configurations such as lifecycle management or replication.

You can also use mc rb against the local filesystem to produce similar results to the rm --rf commandline tool.

The following command removes the mydata bucket on the myminio MinIO deployment:

mc rb --force myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] rb             \
                 --force        \
                 [--dangerous]  \
                 ALIAS [ALIAS...]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The alias of a MinIO or other S3-compatible service and the full path to the bucket to remove. For example:

mc rb --force myminio/mydata

Omit the bucket path to perform a site-wide removal of buckets on the MinIO deployment. This operation requires specifying --dangerous to explicitly acknowledge the permanent removal of all data on the deployment. For example:

mc rb --force --dangerous myminio

For removing a directory and its contents on a local filesystem, specify the full path to that directory. The --force flag is ignored if specified. For example:

mc rb ~/data/myolddata

You can specify multiple ALIAS targets consisting of either MinIO or local filesystem directories. The command attempts to remove all specified targets. For example:

mc rb --force myminio/mydata ~/data/myolddata
--force

mc-cmd

Required Safety flag to confirm removal of the bucket contents.

--dangerous

mc-cmd

Optional Directs mc rb to perform a site-wide removal of all buckets on each specified ALIAS (e.g. myminio/).

If any ALIAS specifies a filesystem directory, this option results in the removal of all subdirectories and files at that directory path similar to rm --rf.

Caution

Warning

Running mc rb --dangerous is irreversible. Exercise all possible due diligence in ensuring the command applies to only the desired ALIAS targets prior to execution.

Global Flags

This command supports any of the global flags.

Example

Remove a Bucket

mc rb --force ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible host.
  • Replace PATH with the path to the bucket to remove.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.125 - mc ready

Syntax

The mc ready command checks the status of a cluster and whether the cluster has read and write quorum.

The following sends a GET request to the cluster at alias myminio and returns its status.

mc ready myminio

The command sends a GET request to the deployment at the alias myminio.’ The command repeats the request until it is successful.

The output before the cluster at alias myminio is ready resembles the following:

The cluster `myminio` is unreachable: Get "http://myminio.example.com:9000/minio/health/cluster": dial tcp 198.51.100.0:9000: connect: connection refused

Once the request succeeds in connecting to the myminio deployment, the output resembles the following:

The cluster `myminio` is ready

The command has the following syntax:

mc [GLOBALFLAGS] ready            \
                 TARGET           \
                 [--cluster-read] \
                 [--maintenance]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The full path to the alias or prefix where the command should run.

--cluster-read

mc-cmd

Optional

Checks if the cluster has enough quorum to serve READ requests.

--maintenance

mc-cmd

Optional

Checks if the cluster can maintain read and write quorum if the node for the alias is taken down for maintenance.

Use an alias for the specific node you expect to take down for maintenance and not an alias set to a load balancer.

Global Flags

This command supports any of the global flags.

Examples

Check if the cluster has read quorum

The following command checks that a deployment has sufficient drives available for read operations.

mc read myminio --cluster-read

Check if a cluster is down for maintenance

The following command checks whether the cluster can maintain read and write quorum during maintenance when the node at alias myminio is taken down.

mc ready myminio --maintenance

4.126 - mc replicate

Description

The mc replicate command configures and manages the Server-Side Bucket Replication for a MinIO deployment, including active-active replication configurations and resynchronization.

Note

Note

For multi-site replication, see mc admin replicate.

Subcommands

mc replicate includes the following subcommands:

Subcommand

Description

add

The mc replicate add command creates a new server-side replication rule for a bucket on a MinIO deployment.

backlog

The mc replicate backlog shows a list of unreplicated new or deleted objects.

export

The mc replicate export command exports the JSON-formatted replication rules for a MinIO bucket to STDOUT.

import

The mc replicate import command imports JSON-formatted replication rules for a MinIO bucket from STDIN.

ls

The mc replicate ls command lists all replication rules on a MinIO bucket.

resync

The mc replicate resync command resynchronizes all objects in the specified MinIO bucket to a remote replication target.

rm

The mc replicate rm command removes a replication rule from a MinIO bucket.

status

The mc replicate status command displays the replication status of a MinIO bucket. The status also lists the remote target path or location.

update

The mc replicate update command modifies an existing bucket replication rule.

4.127 - mc retention

Description

The mc retention command configures the Write-Once Read-Many (WORM) locking settings for an object or object(s) in a bucket. You can also set the default object lock settings for a bucket, where all objects without explicit object lock settings inherit the bucket default.

Subcommands

mc retention includes the following subcommands:

Subcommand

Description

clear

The mc retention clear command removes the Write-Once Read-Many (WORM) locking settings for an object or object(s) in a bucket. You can also remove the default object lock settings for a bucket.

info

The mc retention info command configures the Write-Once Read-Many (WORM) locking settings for an object or object(s) in a bucket. You can also set the default object lock settings for a bucket, where all objects without explicit object lock settings inherit the bucket default.

set

The mc retention set command configures the Write-Once Read-Many (WORM) locking settings for an object or object(s) in a bucket. You can also set the default object lock settings for a bucket, where all objects without explicit object lock settings inherit the bucket default.

4.128 - mc rm

Syntax

The mc rm command removes objects from a bucket on a MinIO deployment. To completely remove a bucket, use mc rb instead.

You can also use mc rm against the local filesystem to produce similar results to the rm commandline tool.

For more information on how MinIO performs DELETE actions on objects, see Object Deletion.

Warning

Important

mc rm supports removing multiple objects or files in a single command. Consider using the --dry-run option to validate that the operation targets only the desired objects/files.

The following command removes multiple objects from the mydata bucket on the myminio MinIO deployment:

mc rm --recursive myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] rm  \
                 [--bypass]               \
                 [--dangerous]            \
                 [--dry-run]              \
                 [--force]*               \
                 [--incomplete]           \
                 [--newer-than "string"]  \
                 [--non-current]          \
                 [--older-than "string"]  \
                 [--recursive]            \
                 [--rewind "string"]      \
                 [--stdin]                \
                 [--version-id "string"]* \
                 [--versions]             \
                 ALIAS [ALIAS ...]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

mc rm --force is required by multiple parameters. mc rm --version-id is mutually exclusive with multiple parameters. See the reference documentation for more information.

Parameters

ALIAS

mc-cmd

Required

The alias of a MinIO deployment and the full path to the object to remove. For example:

mc rm play/mybucket/object.txt

You can specify multiple objects on the same or different MinIO deployments. For example:

mc rm play/mybucket/object.txt play/mybucket/otherobject.txt

If specifying the path to a bucket or bucket prefix, you must also specify the --recursive and --force arguments. For example:

mc rm --recursive --force play/mybucket/

mc rm --recursive --force play/mybucket/myprefix/

Consider first running the command with the --dry-run flag to validate the scope of the recursive delete operation.

For removing a file from a local filesystem, specify the full path to that file:

mc rm ~/data/myoldobject.txt
--bypass

mc-cmd

Optional

Allows removing an object held under GOVERNANCE object locking.

--dangerous

mc-cmd

Optional

Allows running mc rm when the ALIAS specifies the root (all buckets) on the MinIO deployment.

When combined with --versions, this flag directs mc rm to permanently remove all objects and versions from the ALIAS target.

Consider first running the command with the --dry-run to validate the scope of the site-wide delete operation.

Caution

Warning

Running mc rm --dangerous with the --versions flag is irreversible. Exercise all possible due diligence in ensuring the command applies to only the desired ALIAS targets prior to execution.

--dry-run

mc-cmd

Optional

Outputs the results of a command without actually removing any files. Use this flag to test that your command configuration removes only the objects you wish to remove.

--force

mc-cmd

Optional

Allows running mc rm with any of the following arguments:

--incomplete, I

mc-cmd

Optional

Remove incomplete uploads for the specified object.

If any ALIAS specifies a bucket, you must also specify --recursive and --force.

--newer-than

mc-cmd

Optional

Remove object(s) newer than the specified number of days. Specify a string in #d#hh#mm#ss format. For example: --newer-than 1d2hh3mm4ss

Defaults to 0 (all objects).

--non-current

mc-cmd

Optional

Removes all non-current object versions from the specified ALIAS.

This option has no effect on buckets without versioning enabled.

--older-than

mc-cmd

Optional

Remove object(s) older than the specified time limit. Specify a string in #d#h#m#s format. For example: --older-than 1d2h3m4s.

Defaults to 0 (all objects).

--recursive, r

mc-cmd

Optional

Recursively remove the contents of each ALIAS bucket or bucket prefix.

If specifying --recursive, you must also specify --force.

For buckets with versioning enabled, this option by default produces a delete marker for each removed object. Include the --versions flag to recursively remove all objects and object versions from the bucket.

Consider first running the command with the --dry-run flag to validate the scope of the recursive delete operation.

Mutually exclusive with mc rm --version-id

--rewind

mc-cmd

Optional

Directs mc rm to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--stdin

mc-cmd

Optional

Read object names or buckets from STDIN.

--versions

mc-cmd

Optional

Directs mc rm to operate on all object versions that exist in the bucket.

--versions requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --versions and --rewind together to remove all object versions which existed at a specific point in time.

--version-id, vid

mc-cmd

Optional

Directs mc rm to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Mutually exclusive with any of the following flags:

Global Flags

This command supports any of the global flags.

Examples

Remove a Single Object

mc rm ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible service.
  • Replace PATH with the path to the object.

Recursively Remove a Bucket’s Contents

Use mc rm with the --recursive and --force options to recursively remove a bucket’s contents.

mc rm --recursive --force ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible service.
  • Replace PATH with the path to the bucket.

This operation does not remove the bucket. Use mc rb to remove the bucket along with all contents and associated configurations.

Remove All Incomplete Upload Files for an Object

Use mc rm with the --incomplete option to remove incomplete upload files for an object.

mc rm --incomplete --recursive --force ALIAS/PATH
  • Replace ALIAS with the alias of a configured S3-compatible service.
  • Replace PATH with the path to the object.

Roll Object Back To Previous Version

Use mc rm with --versions and --newer-than to remove all object versions newer than the specified duration of time. This effectively “rolls back” the object to its state at that time.

Warning

Important

Removing specific versions of an object is a destructive action. You cannot restore the deleted object versions.

mc rm ALIAS/PATH --versions --newer-than DURATION
  • Replace ALIAS with the alias of a configured S3-compatible service.
  • Replace PATH with the path to the object. For example, /mybucket/myobject.
  • Replace DURATION with the number of days in the past from the current host time from which the operation begins removing versions of the object. For example, to remove all versions of the object created in the last 30 days, specify "30d".

Behavior

Deleting Bucket Contents

Using mc rm to remove all contents in a bucket does not delete the bucket itself. Any configurations associated to the bucket remain in place, such as default object lock settings.

To completely remove a bucket, use mc rb instead of mc rm.

MinIO Trims Empty Prefixes on Object Removal

mc rm relies on the mc removal API for deleting objects. As part of removing the last object in a bucket prefix, mc also recursively removes each empty part of the prefix up to the bucket root. mc only applies the recursive removal to prefixes created implicitly as part of object write operations - that is, the prefix was not created using an explicit directory creation command such as mc mb.

For example, consider a bucket photos with the following object prefixes:

  • photos/2021/january/myphoto.jpg
  • photos/2021/february/myotherphoto.jpg
  • photos/NYE21/NewYears.jpg

photos/NYE21 is the only prefix explicitly created using mc mb. All other prefixes were implicitly created as part of writing the object located at that prefix.

If an mc command removes myphoto.jpg, the removal API automatically trims the empty /january prefix. If a subsequent mc command removes myotherphoto.jpg, the removal API automatically trims both the /february prefix and the now-empty /2021 prefix. If an mc command removes NewYears.jpg, the /NYE21 prefix remains in place since it was explicitly created.

If using mc rm for operations on a filesystem, mc applies this same behavior by recursively trimming empty directory paths up to the root. However, the mc remove API cannot distinguish between an explicitly created directory path and an implicitly created one. If mc rm deletes the last object at a filesystem path, mc recursively deletes all empty directories within that path up to the root as part of the removal operation.

Delete Operations in Versioned Buckets

MinIO supports keeping multiple versions of an object in a single bucket. Deleting an object in a versioned bucket results in a special DeleteMarker tombstone that marks an object as deleted while retaining all previous versions of that object.

Note

Changed: mc

RELEASE.2023-03-20T17-17-53Z

The output shows the modification time of versioned files. When used with --dry-run, this can help confirm that you selected the correct object(s) for removal.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.129 - mc share

Description

Use the mc share commands to manage presigned URLs for downloading and uploading objects to a MinIO bucket.

Subcommands

mc share includes the following subcommands:

Subcommand

Description

download

The mc share download command generates a temporary presigned URL with integrated access credentials for downloading objects from a MinIO bucket. The temporary URL expires after a configurable time limit.

list

The mc share ls command displays any unexpired presigned URLs generated by mc share upload or mc share download

upload

The mc share upload command generates a temporary presigned URL with integrated access credentials for uploading objects to a MinIO bucket. The temporary URL expires after a configurable time limit.

4.130 - mc sql

Syntax

The mc sql command provides an S3 Select interface for performing sql queries on objects in the specified MinIO deployment.

See Selecting content from objects for more information on S3 Select behavior and limitations.

The following command queries all objects in the mydata bucket on the myminio MinIO deployment:

mc sql --recursive --query "select * from S3Object" myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] mc sql                          \
                 --query "string"                \
                 [--csv-input "string"]          \
                 [--compression "string"]        \
                 [--csv-output "string"]         \
                 [--csv-output-header "string"]  \
                 [--enc-c "string"]              \
                 [--json-input "string"]         \
                 [--json-output "string"]        \
                 [--recursive]                   \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The full path to the bucket or object to run the SQL query against. Specify the alias of a configured S3 service as the prefix to the ALIAS path. For example:

mc sql [FLAGS] play/mybucket
--query, e

mc-cmd

Required

The SQL statement to execute on the specified ALIAS directory or object. Wrap the entire SQL query in double quotes ".

Defaults to "select * from S3Object".

--csv-input

mc-cmd

Optional

The data format for .csv input objects. Specify a string of comma-seperated key=value,... pairs. See CSV Formatting Fields for more information on valid keys.

--compression

mc-cmd

Optional

The compression type of the input object. Specify one of the following supported values:

  • GZIP
  • BZIP2
  • NONE (default)

Compression schemes supported by MinIO backend only:

--csv-output

mc-cmd

Optional

The data format for .csv output. Specify a string of comma-seperated key=value,... pairs. See CSV Formatting Fields for more information on valid keys.

See the S3 API CSVOutput for more information.

--csv-output-header

mc-cmd

Optional

The header row of the .csv output file. Specify a string of comma-separated fields as field1,field2,....

Omit to output a .csv with no header row.

--enc-c

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

  • KEY - the full path to the object as alias/bucket/path/object.
  • VALUE - the 32-byte RAW Base64-encoded data key to use for encrypting object(s).

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"
Note

Note

MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.

--json-input

mc-cmd

Optional

The data format for .json or .ndjson input objects. Specify the type of the JSON contents as type=<VALUE>. The value can be either:

See the S3 API JSONInput for more information.

--json-output

mc-cmd

Optional

The data format for the .json output. Supports the rd=value key, where rd is the RecordDelimiter for the JSON document.

Omit to use the default newline character \n.

See the S3 API JSONOutput for more information.

--recursive, r

mc-cmd

Optional

Recursively searches the specified ALIAS directory using the --query SQL statement.

Global Flags

This command supports any of the global flags.

Examples

Select all Columns in all Objects in a Bucket

Use mc sql with the --recursive and --query options to apply the query to all objects in a bucket:

mc sql --recursive --query "select * from S3Object" ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket on the MinIO deployment.

Run an Aggregation Query on an Object

Use mc sql with the --query option to query an object on an MinIO deployment:

mc sql --query "select count(s.power) from S3Object" ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the object on the MinIO deployment.

Behavior

Input Formats

mc sql supports the following input formats:

Type content-type Value
.csv text/csv
.json application/json
.parquet none

For .csv file types, use mc sql --csv-input to specify the CSV data format. See CSV Formatting Fields for more information on CSV formatting fields.

For .json file types, use mc sql --json-input to specify the JSON data format.

For .parquet file types, mc sql automatically interprets the data format.

mc sql determines the type by the file extension of the target object. For example, an object named data.json is interpreted as a JSON file.

You can query data of a supported type but a different extension if the object has the appropriate content-type. For more information, see mc cp --attr.

CSV Formatting Fields

The following table lists valid key-value pairs for use with mc sql --csv-input and mc sql --csv-output. Certain key pairs are only valid for --csv-input. See the documentation for S3 API CSVInput for more information on S3 CSV formatting.

Key

--csv-input Only

Description

rd

The character that seperates each record (row) in the input .csv file.

Corresponds to RecordDelimiter in the S3 API CSVInput.

fd

The character that seperates each field in a record. Defaults to ,.

Corresponds to FieldDelimeter in the S3 API CSVInput.

qc

The character used for escaping when the fd character is part of a value. Defaults to ".

Corresponds to QuoteCharacter in the S3 API CSVInput.

qec

The character used for escaping a quotation mark " character inside an already escaped value.

Corresponds to QuoteEscapeCharacter in the S3 API CSVInput.

fh

Yes

The content of the first line in the .csv file.

Specify one of the following supported values:

  • NONE - The first line is not a header.

  • IGNORE - Ignore the first line.

  • USE - The first line is a header.

For NONE or IGNORE, you must specify column positions _# to identify a column in the --query statement.

For USE, you can specify header values to identify a column in the --query statement.

Corresponds to FieldHeaderInfo in the S3 API CSVInput.

cc

Yes

The character used to indicate a record should be ignored. The character must appear at the beginning of the record.

Corresponds to Comment in the S3 API CSVInput.

qrd

Yes

Specify TRUE to indicate that fields may contain record delimiter values (rd).

Defaults to FALSE.

Corresponds to AllowQuotedRecordDelimiter in the S3 API CSVInput.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.131 - mc stat

Syntax

The mc stat command displays information on objects in a MinIO bucket, including object metadata. You can also use it to retrieve bucket metadata.

You can use mc stat against the local filesystem to produce similar results to the stat commandline tool.

The following command displays information on all objects in the mydata bucket on the myminio MinIO deployment:

mc stat --recursive myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] stat                      \
                 [--enc-c "value"]         \
                 [--no-list]               \
                 [--recursive]             \
                 [--rewind "string"]       \
                 [--versions]              \
                 [--version-id "string"]*  \
                 ALIAS [ALIAS ...]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

mc stat --version-id is mutually exclusive with multiple parameters. See the reference documentation for more information.

Parameters

ALIAS

mc-cmd

Required

The alias of a MinIO deployment and the full path to the object for which to retrieve detailed information. For example:

mc stat myminio/mybucket/myobject.txt

You can specify multiple objects on the same or different MinIO deployments:

mc stat myminio/mybucket/myobject.txt myminio/mybucket/myobject.txt

If specifying the path to a bucket or bucket prefix, you must include the mc stat --recursive flag:

mc stat --recursive myminio/mybucket/

For retrieving information on a file from a local filesystem, specify the full path to that file:

mc stat ~/data/myobject.txt
--enc-c

mc-cmd

Optional

Encrypt or decrypt objects using server-side SSE-C encryption with client-managed keys.

The parameter accepts a key-value pair formatted as KEY=VALUE

KEY

The full path to the object as alias/bucket/path/object.ext.

You can specify only the top-level path to use a single encryption key for all operations in that path.

VALUE

Specify either a 32-byte RawBase64-encoded key or a 64-byte hex-encoded key for use with SSE-C encryption.

Raw Base64 encoding rejects =-padded keys. Omit the padding or use a Base64 encoder that supports RAW formatting.

  • KEY - the full path to the object as alias/bucket/path/object.
  • VALUE - the 32-byte RAW Base64-encoded data key to use for encrypting object(s).

For example:

# RawBase64-Encoded string "mybucket32byteencryptionkeyssec"
--enc-c "myminio/mybucket/prefix/object.obj=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"

You can specify multiple encryption keys by repeating the parameter.

Specify the path to a prefix to apply encryption to all matching objects at that path:

--enc-c "myminio/mybucket/prefix/=bXlidWNrZXQzMmJ5dGVlbmNyeXB0aW9ua2V5c3NlYwo"
Note

Note

MinIO strongly recommends against using SSE-C encryption in production workloads. Use SSE-KMS via the --enc-kms or SSE-S3 via --enc-s3 parameters instead.

--no-list

mc-cmd

Optional

Disable all LIST operations if the target does not exist.

--recursive, r

mc-cmd

Optional

Recursively mc stat the contents of the MinIO bucket specified to ALIAS.

--rewind

mc-cmd

Optional

Directs mc stat to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

--versions

mc-cmd

Optional

Directs mc stat to operate on all object versions that exist in the bucket.

--versions requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Use --versions and --rewind together to remove all object versions which existed at a specific point in time.

--version-id, vid

mc-cmd

Optional

Directs mc stat to operate only on the specified object version.

--version-id requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Mutually exclusive with any of the following flags:

Global Flags

This command supports any of the global flags.

Examples

Display Object Details

The following example displays details of the object myfile.txt in the bucket mybucket:

mc stat myminio/mybucket/myfile.txt

The output resembles the following:

Name      : myfile.txt
Date      : 2024-07-16 15:40:02 MDT
Size      : 6.0 KiB
ETag      : 3b38f7b05a0c42acdc377e60b2a74ddf
Type      : file
Metadata  :
  Content-Type: text/plain

You can specify more than one object by adding multiple paths:

mc stat myminio/mybucket/file1.txt myminio/yourbucket/file2.txt

To display detail for all objects in a bucket, use --recursive. The following example displays details for all objects in bucket mybucket:

mc stat --recursive myminio/mybucket

The output resembles the following:

Name      : file1.txt
Date      : 2024-07-16 15:40:02 MDT
Size      : 6.0 KiB
ETag      : 3b38f7b05a0c42acdc377e60b2a74ddf
Type      : file
Metadata  :
  Content-Type: text/plain

Name      : file2.txt
Date      : 2024-07-26 10:45:19 MDT
Size      : 6.0 KiB
ETag      : 3b38f7b05a0c42acdc377e60b2a74ddf
Type      : file
Metadata  :
  Content-Type: text/plain

Display Bucket Details

The following example displays information about the bucket mybucket on the myminio MinIO deployment:

mc stat myminio/mybucket

The output resembles the following:

Name      : mybucket
Date      : 2024-07-26 10:56:43 MDT
Size      : N/A
Type      : folder

Properties:
  Versioning: Un-versioned
  Location: us-east-1
  Anonymous: Disabled
  ILM: Disabled

Usage:
      Total size: 6.0 KiB
   Objects count: 1
  Versions count: 0

Object sizes histogram:
   1 object(s) BETWEEN_1024B_AND_1_MB
   1 object(s) BETWEEN_1024_B_AND_64_KB
   0 object(s) BETWEEN_10_MB_AND_64_MB
   0 object(s) BETWEEN_128_MB_AND_512_MB
   0 object(s) BETWEEN_1_MB_AND_10_MB
   0 object(s) BETWEEN_256_KB_AND_512_KB
   0 object(s) BETWEEN_512_KB_AND_1_MB
   0 object(s) BETWEEN_64_KB_AND_256_KB
   0 object(s) BETWEEN_64_MB_AND_128_MB
   0 object(s) GREATER_THAN_512_MB
   0 object(s) LESS_THAN_1024_B

Count of Objects in a Bucket

To show the number of objects in a bucket, use --json and extract the value of objectsCount with a JSON parser:

The following example uses the jq utility:

mc stat myminio/mybucket --json | jq '.Usage.objectsCount'

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.132 - mc support

Description

The MinIO Client mc support commands provides tools for analyzing deployment health or performance and for running diagnostics. You can also upload generated health reports for further analysis by MinIO engineering.

Warning

Important

The mc support commands require an active MinIO SUBNET registration.

mc support proxy set and mc support proxy remove are exceptions, as you may need to set up a proxy to complete the deployment registration.

Subcommands

mc support includes the following subcommands:

Subcommand

Description

callhome

The mc support callhome command allows the enabling or disabling of diagnostic information from a deployment to MinIO SUBNET.

diag

The mc support diag command generates a health report for a MinIO deployment.

inspect

The mc support inspect command collects the data and metadata associated to objects at the specified path.

perf

Use the mc support perf command to review the performance of the S3 API (read/write), network IO, and storage (drive read/write).

profile

mc support profile runs a system profile for your deployment. The results of the profile can provide insight into the MinIO server process running on a given node.

proxy

Use the mc support proxy command to configure a proxy to use to communicate with MinIO SUBNET.

top

The mc support top command returns statistics for distributed MinIO deployments, similar to the output of the top command in a shell.

4.133 - mc tag

Description

The mc tag command adds, removes, and lists tags associated to a bucket or object.

MinIO supports adding up to 10 custom tags to an object.

Subcommands

mc tag includes the following subcommands:

Subcommand

Description

list

The mc tag list command lists all tags from a bucket or object.

remove

The mc tag remove command removes all tags from a bucket or object.

set

The mc tag set command sets one or more tags to a bucket or object.

4.134 - mc tree

Syntax

The mc tree command lists all prefixes inside a MinIO bucket in a tree format. The command optionally supports listing all objects inside of bucket at each prefix, including the bucket root.

You can also use mc tree against a local filesystem directory to produce similar results to the tree commandline tool.

The following command prints a complete tree of all objects at any depth in the mydata bucket on the myminio MinIO deployment:

mc tree --files myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] tree                 \
                 [--depth int]        \
                 [--files]            \
                 [--rewind "string"]  \
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The alias of a MinIO deployment and the full path to the bucket to list the tree hierarchy. For example:

mc tree myminio/mybucket

You can specify multiple targets to the mc tree command. For example:

mc tree myminio/mybucket myminio/myotherbucket

For retrieving the tree heirarchy of a local filesystem directory, specify the full path to that directory. For example:

mc tree ~/minio/mydata/
--depth, d

mc-cmd

Optional Limit the tree depth to the specified integer value.

Defaults to -1 or unlimited depth.

--files, f

mc-cmd

Optional Includes files in the object or directory in the mc tree output.

--rewind

mc-cmd

Optional

Directs mc tree to operate only on the object version(s) that existed at specified point-in-time.

  • To rewind to a specific date in the past, specify the date as an ISO8601-formatted timestamp. For example: --rewind "2020.03.24T10:00".
  • To rewind a duration in time, specify the duration as a string in #d#hh#mm#ss format. For example: --rewind "1d2hh3mm4ss".

--rewind requires that the specified ALIAS be an S3-compatible service that supports Bucket Versioning. For MinIO deployments, use mc version to enable or disable bucket versioning.

Examples

mc tree ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace PATH with the path to the bucket on the MinIO deployment.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.135 - mc undo

Syntax

The mc undo command reverses changes due to either a PUT or DELETE operation at a specified path.

The following command reverts the last three uploads and/or deletions of the file.zip object on the myminio deployment in the data bucket:

mc undo myminio/data/file.zip --last 3

The command has the following syntax:

mc [GLOBALFLAGS] undo                \
                 TARGET              \
                 [--action "type"]   \
                 [--force]           \
                 [--last "integer"]  \
                 [--recursive, r]    \
                 [--dry-run]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

TARGET

mc-cmd

Required

The full path to the object or prefix where the command should run. The path must include the ALIAS, bucket, and prefix or object name.

--action

mc-cmd

Optional

Undo the most recent change of the specified type. Accepted values are DELETE or PUT.

By default, mc undo reverses both DELETE and PUT operations. Use --action to choose one or the other, but only for the most recent operation of the specified type.

The following command reverts the most recent PUT for the object today.zip in bucket data, reverting to the previous object version:

mc undo myminio/data/today.zip --action "PUT"

This example reverts the most recent DELETE for the prefix archive, recursively restoring it and any child objects:

mc undo myminio/data/archive --recursive --action "DELETE"

Mutually exclusive with --last.

--dry-run

mc-cmd

Optional

Output the results of the command without actually performing the operations. Use this flag to test the outcome of running the command in a particular way.

--force

mc-cmd

Optional

Force a recursive operation.

--last

mc-cmd

Optional

Accepts an integer value specifying the number of PUT and/or DELETE changes to undo.

If not specified, the command reverses one (1) operation. Mutually exclusive with --action.

--recursive, r

mc-cmd

Optional

Performs the command in a recursive fashion. Use this flag to undo changes on a prefix, for example.

Global Flags

This command supports any of the global flags.

Examples

Undo the Last Three Uploads or Deletions on an Object

The following command reverts the last three uploads and/or deletions of the file.zip object on the myminio deployment in the data bucket:

mc undo myminio/data/file.zip --last 3

Undo the Last Upload or Deletion of any Object at a Prefix

Use mc undo to reverse the most recent PUT or DELETE operation performed on the myminio alias in the data bucket under the presentations/recordings/ prefix:

mc undo myminio/data/presentations/recordings/ --recursive --force

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.136 - mc update

Syntax

The Pigsty-maintained client keeps mc update for command-line compatibility, but self-update is intentionally disabled. The command does not contact a release feed, download a binary, or replace the installed mc/mcli executable. It prints an error and exits with status 1.

Upgrade through Download & Install, the Pigsty package repository, or GitHub Releases.

The following command reports that self-update is disabled and exits with status 1:

mc update

The command has the following syntax:

mc [GLOBALFLAGS] update [--json] [RELEASE-URL]
  • Brackets [] indicate optional parameters.
  • RELEASE-URL is accepted only for compatibility and is not contacted.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

The non-JSON error text is:

Self-update is disabled in the Pigsty mc fork; upgrade only through the Pigsty package repository or https://github.com/pgsty/mc/releases.

Global Flags

--json

mc-cmd

Optional

Formats the disabled-update error as one JSON Lines object. This flag does not enable updating.

For example:

mc update --json

4.137 - mc version

Description

The mc version commands enable, disable, and retrieve the versioning status for a MinIO bucket.

For more information about object versioning in MinIO, see Bucket Versioning.

mc version includes the following subcommands:

Subcommand

Description

enable

The mc version enable command enables versioning on the specified bucket.

info

The mc version info command returns the versioning status for the specified bucket.

suspend

The mc version suspend command disables versioning on the specified bucket.

Behavior

Object Locking Enables Bucket Versioning

While bucket versioning is disabled by default, configuring object locking on a bucket or an object in that bucket automatically enables versioning for the bucket. See mc retention for more information on configuring object locking.

Bucket Versioning with Existing Data

Enabling bucket versioning on a bucket with existing data immediately creates a null value version ID for each unversioned object.

Disabling bucket versioning on a bucket with existing versioned data does not remove any versioned objects. Applications can continue to access versioned data after disabling bucket versioning. Use mc rm --versions ALIAS/BUCKET/OBJECT to delete an object and all its versions.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.138 - mc watch

Syntax

The mc watch command watches for events on the specified MinIO bucket or local filesystem path. For S3 services, use mc event add to configure bucket event notifications on S3-compatible services.

You can also use mc watch against a local filesystem directory to produce similar results to running the inotify -e modify,create,delete,move command.

The following command watches for events on any object or prefix in the mydata bucket on the myminio MinIO deployment:

mc watch --recursive myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] watch                \
                 [--event "string"]   \
                 [--prefix "string"]  \
                 [--recursive]        \
                 [--suffix "string"]  \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The alias of a MinIO deployment and the full path to the bucket to watch for configured events. For example:

mc watch myminio/mybucket
--event

mc-cmd

The event(s) to watch for. Specify multiple events using a comma , delimiter. See Supported Bucket Events for supported events.

Defaults to put,delete, get.

--prefix

mc-cmd

The bucket prefix in which to watch for the specified --event.

For example, given a ALIAS of play/mybucket and a --prefix of photos, only events in play/mybucket/photos trigger bucket notifications.

--recursive, r

mc-cmd

Recursively watch for events in the specified ALIAS bucket path or local directory.

--suffix

mc-cmd

The bucket suffix in which to watch for the specified --event.

For example, given a ALIAS of play/mybucket and a --suffix of .jpg, only events in play/mybucket/*.jpg trigger bucket notifications.

Global Flags

--json

mc-cmd

Optional

Enables JSON lines formatted output to the console.

For example:

mc --json COMMAND

Examples

Watch for Events in a Bucket

mc watch --recursive ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

4.139 - mc idp ldap accesskey create

Note

Added: mc

RELEASE.2023-12-23T08-47-21Z

Description

The mc idp ldap accesskey create allows you to add LDAP access key pairs.

The following example creates a new access key pair with the same policy as the authenticated user on the minio alias:

mc idp ldap accesskey create minio/

The command has the following syntax:

mc [GLOBALFLAGS] idp ldap accesskey create                   \
                                 ALIAS                       \
                                 [--access-key <value>]      \
                                 [--secret-key <value>]      \
                                 [--policy <value>]          \
                                 [--name <value>]            \
                                 [--description <value>]     \
                                 [--expiry <value>]          \
                                 [--expiry-duration <value>]
  • Replace ALIAS with the alias of a MinIO deployment configured for AD/LDAP integration.

  • Brackets [] indicate optional parameters.

  • Parameters sharing a line are mutually dependent.

  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment configured for AD/LDAP.

For example:

mc idp ldap accesskey create minio
--access-key

mc-cmd

Optional

An access key to use for the account. The access key cannot contain the characters = (equal sign) or , (comma).

Requires --secret-key

--secret-key

mc-cmd

Optional

A secret to use for the account.

Requires --access-key

--policy

mc-cmd

Optional

File path to the JSON-formatted policy to use for the account.

If not specified, the account uses the same policy as the authenticated user.

--name

mc-cmd

Optional

A human-readable name to use for the account.

--description

mc-cmd

Optional

Add a description for the service account. For example, you might specify the reason the access key exists.

--expiry-duration

mc-cmd

Optional

Length of time the access key pair should remain valid for use in #d#h#s format.

For example, 7d, 24h, 5d12h30s are valid strings.

Mutually exclusive with --expiry.

--expiry

mc-cmd

Optional

The date after which the access key expires. Enter the date in YYYY-MM-DD format.

For example, to expire the credentials after December 31, 2024, enter 2024-12-31.

Mutually exclusive with --expiry-duration.

--login

mc-cmd

Optional

Caution

Deprecated: RELEASE.2024-04-18T16-45-29Z

Use mc idp ldap accesskey create-with-login to access the functionality previously provided by this parameter.

Prompts the user to log in using the LDAP credentials to use to generate the access key. Specify the URL of the LDAP-configured MinIO Server to use for the login prompt.

Requires an interactive terminal.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

Examples

Create a new access-key pair for the authenticated user

The following command creates a new access key pair to use with the currently authenticated user on the minio alias. The command outputs a randomly generated access key and secret key.

mc idp ldap accesskey create minio

Create a new access-key pair with a custom access key and secret key

The following command creates a new access key pair with both an access key and secret key that you specify for the user currently authenticated on the minio alias.

mc idp ldap accesskey create minio/ --access-key my-access-key-change-me --secret-key my-secret-key-change-me

Create a new access-key pair that expires after 24 hours

The following command creates a new access key pair to use with the currently authenticated user on the minio alias. The credentials expire after 24 hours.

The command outputs a randomly generated access key and secret key.

mc idp ldap accesskey create minio --expiry-duration 24h

Create a new access-key and prompt to login as the user

The following command creates a new access key pair. The MinIO Client will first ask you to log in as the user the access key is for on the MinIO site configured for LDAP at minio.example.com.

The command outputs a randomly generated access key and secret key.

mc idp ldap accesskey create minio --login minio.example.com

Create a new access-key pair that expires after a date

The following command creates a new access key pair to use with the currently authenticated user on the minio alias. The credentials expire after February 29, 2024.

The command outputs a randomly generated access key and secret key.

mc idp ldap accesskey create minio --expiry 2024-02-29

5 - mc ilm edit

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm edit replaced by mc ilm rule edit.

Syntax

The mc ilm edit command modifies an existing object lifecycle management rule on a MinIO bucket.

The following command modifies existing lifecycle management rules for the mydata bucket on the myminio deployment:

mc ilm edit --id "c79ntj94b0t6rukh6lr0" --expiry-days 90  mydata/myminio

mc ilm edit --id "c79nu2p4b0t6qko19rgg" --expired-object-delete-marker mydata/myminio

mc ilm edit --id "c79n19dn10dnab109fg1" --transition-days 30 --tier "COLDTIER"

The command modifies the specified rules as follows:

  • Delete objects more than 90 days old.
  • Delete DeleteMarker tombstones if that object has no other versions remaining.
  • Transition objects more than 30 days old to the COLDTIER remote tier.

The command has the following syntax:

mc [GLOBALFLAGS] ilm edit \
                 --id "string"                                                                                        \
                 [--prefix "string"]                                                                                  \
                 [--enable]                                                                                           \
                 [--disable]                                                                                          \
                 [--expiry-days "string" | --expired-object-delete-marker]                                            \
                 [--transition-days "string"] --tier "string"                                                \
                 [--noncurrentversion-expiration-days "string"]                                                       \
                 [--noncurrentversion-transition-days "string" --noncurrentversion-tier "string"] \
                 [--tags]                                                                                             \
                 ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias and full path to the bucket on the MinIO deployment to which to modify the object lifecycle management rule. For example:

mc ilm edit myminio/mydata
--id

mc-cmd

Required

The unique ID of the rule. Use mc ilm rule ls to list bucket rules and retrieve the id for the rule you want to modify.

--disable

mc-cmd

Optional

Stop using the rule, but retain the rule for future use. Objects do not transition or expire when a rule is disabled.

--enable

mc-cmd

Optional

Use a rule to transition or expire objects.

--prefix

mc-cmd

Optional

Restrict the management rule to a specific bucket prefix.

For example:

mc ilm edit --prefix "meetingnotes/" myminio/mydata/ --expiry-days "90"

The command modifies a rule that expires objects in the mydata bucket of the myminio ALIAS after 90 days for any object with the meetingnotes/ prefix.

--expiry-days

mc-cmd

Optional

The number of days to retain an object after being created. MinIO marks the object for deletion after the specified number of days pass.

Exercise caution when using this option, as its behavior can result in immediate expiration of uploaded objects. Any objects created after the specified expiration date are automatically eligible for expiration. Similarly, specifying a calendar date that is prior to the current system host datetime marks all objects covered by the rule for deletion. Consider immediately removing any ILM rule using this option once the specified calendar date has passed.

For versioned buckets, the expiry rule applies only to the current object version. Use the --noncurrentversion-expiration-days option to apply expiration behavior to noncurrent object versions.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

Mutually exclusive with the following options:

See Object Deletion for more information.

--expired-object-delete-marker

mc-cmd

Optional

Specify this option to direct MinIO to remove delete markers for objects with no remaining object versions. Specifically, the delete marker is the only remaining “version” of the given object.

This option is mutually exclusive with the following option:

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner and Object Deletion for more information.

--noncurrentversion-expiration-days

mc-cmd

Optional

The number of days to retain an object version after becoming non-current (i.e. a different version of that object is now the HEAD). MinIO marks noncurrent object versions for deletion after the specified number of days pass.

This option has the same behavior as the S3 NoncurrentVersionExpiration action.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

--noncurrentversion-transition-days

mc-cmd

Optional

The number of days an object has been non-current (i.e. replaced by a newer version of that same object) after which MinIO marks the object version as eligible for transition. MinIO transitions the object to the configured remote storage tier specified to the --tier once the system host datetime passes that calendar date.

This option has no effect on non-versioned buckets. Requires specifying --noncurrentversion-tier.

This option has the same behavior as the S3 NoncurrentVersionTransition action.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

--noncurrentversion-tier

mc-cmd

Optional

The remote storage tier to which MinIO transitions noncurrent objects versions. Specify a remote storage tier created by mc admin tier.

MinIO does not automatically migrate objects from the previously specified remote tier to the new remote tier. MinIO continues to route requests for objects stored on the old remote tier.

--newer-noncurrentversions-expiration

mc-cmd

Optional

The number of non-current versions of an object to retain before applying expiration. Older non-current versions beyond the specified number expire.

By default, MinIO does not retain any non-current versions when an expiration rule applies.

--newer-noncurrentversions-transition

mc-cmd

Optional

The number of non-current versions of an object to keep on the current storage tier. Older non-current versions beyond the specified number transition to the specified tier.

By default, MinIO transitions all non-current versions when a transition rule applies.

--tags

mc-cmd

Optional

One or more ampersand &-delimited key-value pairs describing the object tags to which to apply the lifecycle configuration rule.

This option is mutually exclusive with the following option:

--transition-days

mc-cmd

Optional

The number of calendar days from object creation after which MinIO marks an object as eligible for transition. MinIO transitions the object to the configured remote storage tier specified to the --tier.

For versioned buckets, the transition rule applies only to the current object version. Use the --noncurrentversion-transition-days option to apply transition behavior to noncurrent object versions.

Requires specifying --tier.

MinIO uses a scanner process to check objects against all configured lifecycle management rules. Slow scanning due to high IO workloads or limited system resources may delay application of lifecycle management rules. See Lifecycle Management Object Scanner for more information.

--tier

mc-cmd

Optional

The remote storage tier to which MinIO transition objects. Specify a remote storage tier created by mc admin tier.

Required if specifying --transition-days.

MinIO does not automatically migrate objects from the previously specified remote tier to the new remote tier. MinIO continues to route requests for objects stored on the old remote tier.

Global Flags

This command supports any of the global flags.

Examples

Modify an Existing Lifecycle Management Rule

Use mc ilm edit with --id to modify an existing object expiration rule:

mc ilm edit ALIAS/PATH --id "RULEID" [FLAGS]
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket on the S3-compatible host.
  • Replace RULEID with the unique ID of the object lifecycle management rule. Use mc ilm rule ls to find the RULEID.
  • Specify any additional flags to add or modify the lifecycle management rule. For example, specify --transition-days to override the existing transition days value for the rule.

Disable a Lifecycle Management Rule

Use mc ilm edit with --disable to stop using an existing management rule.

mc ilm edit --id "RULEID" --disable myminio/mybucket
  • Replace RULEID with the unique ID of the object lifecycle management rule. Use mc ilm rule ls to find the RULEID.
  • Replace myminio with the ALIAS of the deployment where the rule exists.
  • Replace mybucket with the bucket for the rule.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

6 - mc quota info

Note

Changed: RELEASE.2022-12-13T00-23-28Z

mc quota info replaced mc admin bucket quota.

Note

Changed: RELEASE.2024-07-31T15-58-33Z

mc quota info is deprecated.

Description

The mc quota info command displays the currently configured quota for a bucket.

Examples

Retrieve Bucket Quota Configuration

Use mc quota info to retrieve the current quota configuration for a bucket:

mc quota info TARGET/BUCKET

Replace TARGET with the alias of a configured MinIO deployment. Replace BUCKET with the name of the bucket on which to retrieve the quota.

Syntax

mc quota info has the following syntax:

mc quota info TARGET

mc quota info supports the following arguments:

TARGET

mc-cmd

Required

The full path to the bucket for which the command creates the quota. Specify the alias of the MinIO deployment as a prefix to the path. For example:

mc quota play/mybucket

Global Flags

This command supports any of the global flags.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

7 - MinIO Operator Environment Variables

The MinIO Operator uses the following environment variables during startup to set configuration settings. Configure these variables in the minio-operator container.

Setting Environment Variables in Kubernetes

To set these environment variables, modify the operator container’s yaml at .spec.env or use the following kubectl command syntax:

kubectl set env -n minio-operator deployment/minio-operator <ENV_VARIABLE>=<value> ... <ENV_VARIABLE2>=<value2>

Replace:

  • minio-operator with the namespace for your Operator, if not using the default value.
  • deployment/minio-operator with the deployment for your Operator, if not the default value. (Most deployments use the default value.)
  • <ENV_VARIABLE> with the environment variable to set or modify.
  • <value> with the value to use for the environment variable.

You can set or modify multiple environment variables by separating each VARIABLE=value pair with a space.

Available MinIO Operator Environment Variables

MINIO_OPERATOR_CERTIFICATES_VERSION

envvar

Specifies the certificate API version to use.

Valid values are v1 or v1beta1.

When not specified, the default is the API Kubernetes provides.

MINIO_OPERATOR_RUNTIME

envvar

Specify the type of runtime to use.

Valid values are EKS, Rancher, or OpenShift. Leave blank if none of the options apply.

When set as EKS, the MINIO_OPERATOR_CSR_SIGNER_NAME must be beta.eks.amazonaws.com/app-serving.

MINIO_OPERATOR_CSR_SIGNER_NAME

envvar

Override the default signer for certificate signing requests (CSRs).

When not specified, the default value is kubernetes.io/kubelet-serving.

OPERATOR_CERT_PASSWD

envvar

Optional

The password Operator should use to decrypt the private key in the TLS certificate for Operator.

OPERATOR_STS_ENABLED

envvar

Toggle STS Service on or off.

Note

Changed: v5.0.11

When not specified, the default value is on.

For versions prior to Operator 5.0.11, the default value was off.

MINIO_CONSOLE_DEPLOYMENT_NAME

envvar

The name to use for the Operator Console.

When not specified, the default value is operator.

MINIO_CONSOLE_TLS_ENABLE

envvar

Toggle Console TLS service on or off.

When not specified, the default value is off.

MINIO_OPERATOR_IMAGE

envvar

Note

Added: v5.0.11

Specify the image of the MinIO instance sidecar container loaded by the Operator.

Omit to use the Operator image.

WATCHED_NAMESPACE

envvar

A comma-separated list of the namespace(s) Operator should watch for tenants.

When not specified, the default value is "" to watch all namespaces.

8 - Silo Client Administration

The Silo client mc provides the mc admin command for performing administrative tasks on Silo and compatible MinIO deployments.

While mc supports general S3-compatible services, mc admin uses MinIO-specific administration APIs and therefore only supports Silo or compatible MinIO deployments.

mc admin has the following syntax:

mc admin [FLAGS] COMMAND [ARGUMENTS]

Command Quick reference

The following table lists mc admin commands:

Command

Description

mc admin accesskey

The mc admin accesskey command and its subcommands create and manage Access Keys for internally managed users on a MinIO deployment.

mc admin cluster bucket

The mc admin cluster bucket command and its subcommands provide tools for manually importing and exporting MinIO bucket metadata.

mc admin cluster iam

The mc admin cluster iam command and its subcommands provide tools for manually importing and exporting MinIO identity and access management (IAM) metadata.

mc admin decommission

The mc admin decommission command starts the decommissioning process for a MinIO server pools. Decommissioning is designed for removing an older server pool whose hardware is no longer sufficient or performant compared to the pools in the deployment. MinIO automatically migrates data from the decommissioned pool to the remaining pools in the deployment based on the ratio of free space available in each pool.

mc admin group

The mc admin group command manages groups on a MinIO deployment.

mc admin heal

The mc admin heal command scans for objects that are damaged or corrupted and heals those objects.

mc admin info

The mc admin info command displays information on a MinIO server. For distributed MinIO deployments, mc admin info displays information for each MinIO server in the deployment.

mc admin kms key

The mc admin kms key command performs cryptographic key management operations through the MinIO Key Encryption Service (KES).

mc admin logs

Use the mc admin logs command to show MinIO server logs.

mc admin policy

The mc admin policy commands manage policies for use with MinIO Policy-Based Access Control (PBAC). MinIO PBAC uses IAM-compatible policy JSON documents to define rules for accessing resources on a MinIO server.

mc admin prometheus

The mc admin prometheus command and its subcommands provide access to MinIO Prometheus metrics.

mc admin rebalance

The mc admin rebalance command allows starts, monitors, or stops a rebalancing operation on a MinIO deployment. Rebalancing redistributes objects across all pools in the deployment.

mc admin replicate

The mc admin replicate command creates and manages site replication for a set of MinIO peer sites.

Site replication mimics an active-active bucket replication, but for multiple MinIO deployments. Wherever a change occurs to IAM settings, buckets, or objects across the set of sites, the change replicates across all sites in the site replication group.

mc admin scanner

The mc admin scanner commands provide information about the scanner process.

mc admin service

The mc admin service command can restart or unfreeze MinIO servers.

mc admin trace

The mc admin trace command displays API operations occurring on the target MinIO deployment.

mc admin update

The mc admin update command updates all MinIO servers in the deployment. The command also supports using a private mirror server for environments where the deployment does not have public internet access.

mc admin user

The mc admin user command and its subcommands manage MinIO users.

Installation

Install the maintained client from Download & Install, or follow the source-build instructions in the mc reference. Standalone archives and Linux packages use the mcli command name; substitute mcli admin for mc admin in the examples when that is the installed name.

Quickstart

Ensure that the host machine has mc installed prior to starting this procedure.

Warning

Important

The following example temporarily disables the bash history to mitigate the risk of authentication credentials leaking in plain text. This is a basic security measure and does not mitigate all possible attack vectors. Defer to security best practices for your operating system for inputting sensitive information on the command line.

Use the mc alias set command to add the deployment to the mc configuration.

bash +o history
mc config host add <ALIAS> <ENDPOINT> ACCESS_KEY SECRET_KEY
bash -o history

Replace each argument with the required values. Specifying only the mc config host add command starts an input prompt for entering the required values.

Use the mc admin info command to test the connection to the newly added MinIO deployment:

mc admin info <ALIAS>

Global Options

mc admin supports the same global options as mc. See Global Options.

8.1 - mc admin accesskey

Note

Added: MinIO

Client RELEASE.2024-10-08T09-37-26Z

These commands replace the MinIO IDP functionality of the mc admin user svcacct command and its subcommands.

Description

The mc admin accesskey command and its subcommands create and manage Access Keys for internally managed users on a MinIO deployment.

Each access key is linked to a user identity and inherits the policies attached to its parent user or those groups in which the parent user has membership. Each access key also supports an optional inline policy which further restricts access to a subset of actions and resources available to the parent user.

mc admin user svcacct only supports creating access keys for MinIO-managed accounts.

To create access keys for Active Directory/LDAP-managed accounts, use mc idp ldap accesskey and its subcommands. To manage access keys for OpenID Connect-managed users, log into the MinIO Console and generate the access keys through the UI.

mc admin accesskey command has the following subcommands:

Subcommand

Description

create

The mc admin accesskey create command adds a new access key and secret key pair for an existing MinIO user.

disable

The mc admin accesskey disable command disables an existing access key for a MinIO IDP user.

edit

The mc admin accesskey edit command modifies the configuration of an access key associated to the specified user.

enable

The mc admin accesskey enable command enables an existing access key.

info

The mc admin accesskey info command returns a description of the specified access key(s).

ls

The mc admin accesskey ls command lists users, access keys, or temporary security token service keys managed by the MinIO deployment.

rm

The mc admin accesskey rm command removes an access key associated to a user on the deployment.

8.2 - mc admin accesskey create

Syntax

The mc admin accesskey create command adds a new access key and secret key pair for an existing MinIO user.

Note

Access keys for OpenID Connect or AD/LDAP users

This command is for access keys for users created directly on the MinIO deployment and not managed by a third party solution.

To generate access keys for Active Directory/LDAP users, use mc idp ldap accesskey create.

The following command creates a new access key associated to an existing MinIO user:

mc admin accesskey create        \
   myminio/ myuser               \
   --access-key myuseraccesskey  \
   --secret-key myusersecretkey  \
   --policy /path/to/policy.json

The command returns the access key and secret key for the new account.

The command has the following syntax:

mc [GLOBALFLAGS] admin accesskey create                    \
                                 ALIAS                     \
                                 [USER]                    \
                                 [--access-key string]     \
                                 [--secret-key string]     \
                                 [--policy path]           \
                                 [--name string]           \
                                 [--description string]    \
                                 [--expiry-duration value] \
                                 [--expiry date]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

USER

mc-cmd

Optional

The username of the user to which MinIO adds the new access key. If not specified, MinIO generates an access key/secret key pair for the authenticated user.

--access-key

mc-cmd

Optional

A string to use as the access key for this account. Omit to let MinIO autogenerate a random 20 character value.

Access Key names must be unique across all users.

--description

mc-cmd

Optional

Add a description for the access key. For example, you might specify the reason the access key exists.

--expiry

mc-cmd

Optional

Set an expiration date for the access key. The date must be in the future. You may not set an expiration date that has already passed.

Allowed date and time formats:

  • 2024-10-24
  • 2024-10-24T10:00
  • 2024-10-24T10:00:00
  • 2024-10-24T10:00:00Z
  • 2024-10-24T10:00:00-07:00

Mutually exclusive with --expiry-duration.

--expiry-duration

mc-cmd

Optional

Length of time for which the accesskey remains valid. Valid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h”.

The following expires the credentials after 30 days:

--expiry-duration 720h

Mutually exclusive with --expiry.

--name

mc-cmd

Optional

Add a human-readable name for the access key.

--policy

mc-cmd

Optional

The readable path to a policy document to attach to the new access key, with a maximum size of 2048 characters. The attached policy cannot grant access to any action or resource not explicitly allowed by the parent user’s policy or group policies

--secret-key

mc-cmd

Optional

The secret key to associate with the new account. Omit to let MinIO autogenerate a random 40-character value.

Global Flags

This command supports any of the global flags.

Examples

Create access key / secret key pair for the authenticated user

The following command generates a new, random access key and secret key pair for the user currently logged in to MinIO deployment at the alias myminio. The access key and secret key have the same access policies as the authenticated user.

mc admin accesskey create myminio/

Create a custom access key / secret key pair for the authenticated user

The following command creates a new access key and secret key pair for the user currently logged in to MinIO at the alias myminio. The access key and secret key have the same access policies as the authenticated user.

mc admin accesskey create myminio/ --access-key myaccesskey --secret-key mysecretkey

Create an access key / secret key pair for another user with limited duration

The following command creates a new access key and secret key pair for a user, miniouser on the alias myminio. The access key and secret key have the same access policies as miniouser. The credentials remain valid for 24 hours after creation.

mc admin accesskey create myminio/ miniouser --expiry-duration 24h

Create access key / secret key pair for the authenticated user that expires

The following command generates a new and random access key and random secret key pair for the user currently logged in to MinIO deployment at the alias myminio. The access key and secret key have the same access policies as the authenticated user. The credentials expire on the fifteenth day of January, 2025.

mc admin accesskey create myminio/ --expiry 2025-01-15

The date specified must be a future date. For valid datetime formats, see the --expiry flag.

Create access key / secret key pair for a different user with custom access

The following command creates a new access key and secret key pair for the user, miniouser on the alias myminio. The access key and secret key have a more limited set of access than miniouser, as specified in the policy JSON file.

mc admin accesskey create myminio/ miniouser --policy /path/to/policy.json

The specified policy file must not grant access to anything to which miniouser does not already have access.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.3 - mc admin cluster bucket import

Description

Note

Added: RELEASE.2022-06-17T02-52-50Z

The mc admin cluster bucket import command imports bucket metadata as created by the mc admin cluster bucket export command.

You can use this command to manually restore the metadata to the specified bucket on a MinIO deployment.

If you specify only the deployment as the target, this command applies the metadata objects to all matching buckets on the target.

The following command imports the specified metadata to the myminio deployment.

mc admin cluster bucket import myminio ~/minio-metadata-backup/myminio-cluster.zip

The command has the following syntax:

mc [GLOBALFLAGS] admin cluster bucket import  \
                                    ALIAS[/BUCKET] \
                                    METADATA.ZIP
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

METADATA.ZIP

mc-cmd

Required

The path to the metadata file to import.

Use mc admin cluster bucket export to export bucket metadata for use with this command.

BUCKET

mc-cmd

Optional

The bucket to apply the imported metadata to.

Global Flags

This command supports any of the global flags.

8.4 - mc admin cluster iam import

Description

Note

Added: RELEASE.2022-06-17T02-52-50Z

The mc admin cluster iam import command imports IAM metadata as created by the mc admin cluster iam export command.

You can use this command to manually restore IAM metadata settings for a MinIO deployment.

Note

Added: mc

RELEASE.2024-09-09T07-53-10Z

The command outputs the results of the import, including the following:

  • count of individual entities imported by entity type
  • list of policies imported by entity type they imported to
  • list of entities that failed to import

The following command imports the IAM metadata of the specified file onto the myminio deployment.

mc admin cluster iam import myminio ~/minio-metadata-backup/myminio-cluster.zip

The command has the following syntax:

mc [GLOBALFLAGS] admin cluster iam import  \
                                   ALIAS \
                                   IAM-METADATA.ZIP
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Starting with RELEASE.2023-05-04T18-10-16Z, mc admin cluster iam import adds support for aliases ending with a trailing forward slash ALIAS/. Prior to this release, the command would fail when provided a trailing forward slash.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

IAM-METADATA.ZIP

mc-cmd

Required

The path to the IAM metadata file to import.

Use the mc admin cluster iam export to export IAM metadata for use with this command.

Global Flags

This command supports any of the global flags.

8.5 - mc admin policy attach

Syntax

Attaches one or more IAM policies to either a MinIO-managed user or a group.

Note

Changed: RELEASE.2023-05-27T05-56-19Z

To successfully attach a policy, the referenced user or group must exist.

Exactly one --user or one --group is required.

The following command attaches the readonly policy to the user james on the deployment at alias myminio.

mc admin policy attach myminio readonly --user james

The command has the following syntax:

mc admin policy attach                       \
                TARGET                       \
                POLICY                       \
                [POLICY...]                  \
                [--user USER | --group GROUP]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Warning

Important

This command is intended for managing policy associations for MinIO-managed users only.

For attaching policies to OpenID-managed users, see OpenID Connect Access Management.

For attaching policies to Active Directory/LDAP users or groups, use mc idp ldap policy attach.

Parameters

The mc admin policy attach command accepts the following arguments:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment with the user or group for which you want to attach one or more policies.

POLICY

mc-cmd

Required

The name of the policy to attach to either the user or the group.

You may attach multiple policies at once by separating each policy name with a space.

MinIO deployments include the following built-in policies by default:

--user

mc-cmd

Optional

The username of the identity you want to attach the policy or policies to. You may only list one user.

You must include either the --user flag or the --group flag. You may not use the --user flag at the same time as the --group flag.

--group

mc-cmd

Optional

The name of the group identity you want to attach the policy or policies to. You may only list one group.

All users with membership in the group inherit the policies associated to the group.

You must include either the --group flag or the --user flag. You may not use the --group flag at the same time as the --user flag.

Global Flags

This command supports any of the global flags.

Examples

Attach the readonly policy to user james on the deployment at alias myminio.

mc admin policy attach myminio readonly --user james

Attach the audit-policy and acct-policy policies to group legal on the deployment at alias myminio.

mc admin policy attach myminio audit-policy acct-policy --group legal

8.6 - mc admin prometheus generate

Description

The mc admin prometheus generate command generates a metrics scraping configuration file for use with Prometheus.

For more complete documentation on using MinIO with Prometheus, see How to monitor MinIO server with Prometheus

Starting with MinIO Server RELEASE.2024-07-15T19-02-30Z and MinIO Client RELEASE.2024-07-11T18-01-28Z, metrics version 3 (v3) provides additional endpoints and metrics. To generate a v3 scrape configuration use the --api_version v3 option.

MinIO recommends new deployments use version 3 (v3). Existing deployments can continue to use metrics version 2

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

The following command generates a Prometheus scrape configuration that collects version 2 bucket metrics from the deployment at alias myminio:

mc admin prometheus generate myminio bucket

The command has the following syntax:

mc [GLOBALFLAGS] admin prometheus generate                                        \
                                  ALIAS                                           \
                                  [TYPE]                                          \
                                  [--api_version v3]                              \
                                  [--bucket <bucket name>]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of a configured MinIO deployment for which the command generates a Prometheus-compatible configuration file.

--api-version

mc-cmd

Optional

To generate a scrape configuration for v3 metrics, include an --api-version v3 parameter. v3 is the only accepted value.

Omit --api-version to generate a v2 metrics configuration.

--bucket

mc-cmd

Optional

Only valid for v3 metrics.

For v3 metric types that return bucket-level metrics, specify a bucket name. Requires --api-version.

--bucket works for the following v3 metric types:

  • api
  • replication

The following example generates a configuration for API metrics from the bucket mybucket:

mc admin prometheus generate ALIAS api --bucket mybucket --api-version v3
TYPE

mc-cmd

Optional

The type of metrics to scrape.

Valid values for metrics version 3 are:

  • api
  • audit
  • cluster
  • debug
  • ilm
  • logger
  • notification
  • replication
  • scanner
  • system

If not specified, a v3 command returns all metrics.

Valid values for metrics version 2 are:

  • bucket
  • cluster
  • node
  • resource

If not specified, a v2 command returns cluster metrics. Cluster metrics include rollups of certain node metrics.

Global flags

This command supports any of the global flags.

Examples

Generate a default metrics v3 config

Use mc admin prometheus generate --api-version v3 to generate a scrape configuration that collects all v3 metrics for a MinIO deployment:

mc admin prometheus generate ALIAS --api-version v3
  • Replace ALIAS with the alias of the MinIO deployment.

The output resembles the following:

scrape_configs:
- job_name: minio-job
  bearer_token: [auth token]
  metrics_path: /minio/metrics/v3
  scheme: http
  static_configs:
  - targets: ['localhost:9000']

Generate a v3 metrics config for another type

To generate a configuration for another metric type, specify the type. The following generates a scrape configuration for v3 cluster metrics:

mc admin prometheus generate ALIAS cluster --api-version v3
  • Replace ALIAS with the alias of the MinIO deployment.

The output resembles the following:

scrape_configs:
- job_name: minio-job-cluster
  bearer_token: [auth token]
  metrics_path: /minio/metrics/v3/cluster
  scheme: http
  static_configs:
  - targets: ['localhost:9000']

To generate a configuration for a different metric type, replace cluster with the desired type.

Generate a v3 bucket replication metrics config

The following example generates a scrape configuration for v3 replication metrics of bucket mybucket:

mc admin prometheus generate ALIAS replication --bucket mybucket --api-version v3
  • Replace ALIAS with the alias of the MinIO deployment.

The output resembles the following:

scrape_configs:
- job_name: minio-job-replication
  bearer_token: [auth token]
  metrics_path: /minio/metrics/v3/bucket/replication/mybucket
  scheme: https
  static_configs:
  - targets: [`localhost:9000`]

Generate a v3 config for bucket API metrics

The following example generates a scrape configuration for v3 API metrics for bucket mybucket:

mc admin prometheus generate ALIAS api --bucket mybucket --api-version v3
  • Replace ALIAS with the alias of the MinIO deployment.

The output resembles the following:

scrape_configs:
- job_name: minio-job-api
  bearer_token: [auth token]
  metrics_path: /minio/metrics/v3/bucket/api/mybucket
  scheme: https
  static_configs:
  - targets: [`localhost:9000`]

Generate a default metrics v2 config

By default, mc admin prometheus generate generates a scrape configuration for v2 cluster metrics:

mc admin prometheus generate ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.

The output resembles the following:

scrape_configs:
- job_name: minio-job
  bearer_token: [auth token]
  metrics_path: /minio/v2/metrics
  scheme: http
  static_configs:
  - targets: ['localhost:9000']

Generate a v2 config for other metric types

To generate a configuration for another metric type, specify the type. The following generates a scrape configuration for v2 bucket metrics:

mc admin prometheus generate ALIAS bucket

8.7 - mc admin scanner status

Description

The mc admin scanner status command displays a real-time summary of scanner information for a MinIO Server.

This command has an alias of mc admin scanner info.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

The following example returns information about the current state of the scanner process.

mc admin scanner status myminio

The command returns results similar to the following:

Overall Statistics
------------------
Last full scan time:   0d0h15m; Estimated 2879.79/month
Current cycle:         (between cycles)
Active drives: 0

Last Minute Statistics
----------------------
Objects Scanned:       3 objects; Avg: 67.611µs; Rate: 4320/day
Versions Scanned:      3 versions; Avg: 2.506µs; Rate: 4320/day
Versions Heal Checked: 0 versions; Avg: 0ms
Read Metadata:         3 objects; Avg: 40.817µs, Size: 395 bytes/obj
ILM checks:            3 versions; Avg: 714ns
Check Replication:     3 versions; Avg: 892ns
Verify Deleted:        0 folders; Avg: 0ms
Yield:                 18ms total; Avg: 6ms/obj

The command has the following syntax:

mc admin scanner status ALIAS
                       [--bucket <string>]     \
                       [--interval <value>]   \
                       [--max-paths <value>]  \
                       [-n <integer>]         \
                       [--nodes <string>]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment for which to display scanner API operations.

--bucket

mc-cmd

Optional

Filter scanner statistics to the specified bucket.

--interval

mc-cmd

Optional

The number of seconds to wait between status request refreshes. If not specified, the status refreshes every 3 seconds.

--max-paths

mc-cmd

Optional

The maximum number of active paths to show. Use -1 for an unlimited number of paths.

Limiting the number of paths shown can reduce the scrolling of the console window when there are a large number of drives being scanned.

If not specified, the results return for an unlimited number of active paths.

-n

mc-cmd

Optional

The number of status requests to return before automatically exiting. Use 0 to return an unlimited number of status results.

If not specified, the results continuously refresh at the specified interval until manually exited.

--nodes

mc-cmd

Optional

Returns scanner status information for the specified node(s). Specify multiple nodes as a comma-separated list.

Global Flags

This command supports any of the global flags.

8.8 - mc admin user add

Syntax

The mc admin user add command adds a new MinIO user to the target MinIO deployment.

To manage external Identity Provider users, see OIDC or AD/LDAP.

The following command creates a new user newuser on the myminio MinIO deployment:

mc admin user add myminio newuser newusersecret

The command has the following syntax:

mc [GLOBALFLAGS] admin user add        \
                            ALIAS      \
                            ACCESSKEY  \
                            SECRETKEY
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ACCESSKEY

mc-cmd

Required

The access key that uniquely identifies the new user, similar to a username.

ALIAS

mc-cmd

Required

The alias of a configured MinIO deployment on which to create the new user.

SECRETKEY

mc-cmd

Required

The secret key for the new user. Consider the following guidance when creating a secret key:

  • The key should be unique
  • The key should be long (Greater than 12 characters)
  • The key should be complex (A mixture of characters, numerals, and symbols)

Global Flags

This command supports any of the global flags.

Example

Create a New User

Use mc admin user add to create a user on a MinIO deployment:

   mc admin user add ALIAS ACCESSKEY SECRETKEY
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace ACCESSKEY with the access key for the user.
  • Replace SECRETKEY with the secret key for the user. MinIO does not provide any method for retrieving the secret key once set.

Specify a unique, random, and long string for both the ACCESSKEY and SECRETKEY. Your organization may have specific internal or regulatory requirements around generating values for use with access or secret keys.

Behavior

New Users Have No Default Policies

Newly created users have no policies by default and therefore cannot perform any operations on the MinIO deployment. To configure a user’s assigned policies, you can do either or both of the following:

For more information on MinIO users and groups, see User Management and Group Management. For more information on MinIO policies, see MinIO Policy Based Access Control.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.9 - mc admin user svcacct add

Warning

Important

This command has been replaced and will be deprecated in a future MinIO Client release.

As of MinIO Client RELEASE.2024-10-08T09-37-26Z, use the mc admin accesskey create command to add access keys for built-in MinIO IDP users.

To add access keys for AD/LDAP users, use the mc idp ldap accesskey create command.

Syntax

The mc admin user svcacct add command adds a new access key to an existing MinIO or AD/LDAP user.

Note

Access keys for OpenID Connect users

To generate service account access keys for OpenID Connect users, use the MinIO Console.

The following command creates a new access key associated to an existing MinIO user:

mc admin user svcacct add                       \
   --access-key "myuserserviceaccount"          \
   --secret-key "myuserserviceaccountpassword"  \
   --policy "/path/to/policy.json"              \
   myminio myuser

The command returns the access key and secret key for the new account.

The command has the following syntax:

mc [GLOBALFLAGS] admin user svcacct add             \
                                    [--access-key]  \
                                    [--secret-key]  \
                                    [--policy]      \
                                    [--comment]     \
                                    ALIAS           \
                                    USER
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

USER

mc-cmd

Required

The username of the user to which MinIO adds the new access key.

--access-key

mc-cmd

Optional

A string to use as the access key for this account. Omit to let MinIO autogenerate a random 20 character value.

Access Key names must be unique across all users.

--comment

mc-cmd

Optional

Note

Changed: RELEASE.2023-05-18T16-59-00Z

Replaced by --description and --name.

Originally added in version RELEASE.2023-01-28T20-29-38Z.

This option has been removed. Use --description or --name instead.

--description

mc-cmd

Optional

Note

Added: RELEASE.2023-05-18T16-59-00Z

Add a description for the service account. For example, you might specify the reason the service account exists.

--expiry

mc-cmd

Optional

Note

Added: RELEASE.2023-05-30T22-41-38Z

Set an expiration date for the service account. The date must be in the future, you may not set an expiration date that has already passed.

Allowed date and time formats:

  • 2023-06-24
  • 2023-06-24T10:00
  • 2023-06-24T10:00:00
  • 2023-06-24T10:00:00Z
  • 2023-06-24T10:00:00-07:00
--name

mc-cmd

Optional

Note

Added: RELEASE.2023-05-18T16-59-00Z

Add a human-readable name for the service account.

--policy

mc-cmd

Optional

The path to a policy document to attach to the new access key, with a maximum size of 2048 characters. The attached policy cannot grant access to any action or resource not explicitly allowed by the parent user’s policies.

--secret-key

mc-cmd

Optional

The secret key to associate with the new account. Omit to let MinIO autogenerate a random 40-character value.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.10 - mc admin accesskey disable

Syntax

The mc admin accesskey disable command disables an existing access key for a MinIO IDP user.

The following command disables the specified access key:

mc admin accesskey disable myminio myuserserviceaccount

The command has the following syntax:

mc [GLOBALFLAGS] admin accesskey disable         \
                                 ALIAS           \
                                 SERVICEACCOUNT
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

SERVICEACCOUNT

mc-cmd

Required

The access key to disable.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.11 - mc admin cluster bucket

Description

Note

Added: RELEASE.2022-06-17T02-52-50Z

The mc admin cluster bucket command and its subcommands provide tools for manually importing and exporting MinIO bucket metadata.

This metadata includes configurations related to features like lifecycle management rules. You can use this metadata as a snapshot of the bucket configuration for restoration later, such as part of BC/DR or backup/restore operations.

You can use this command on individual buckets or on all buckets in a MinIO deployment. For automatic synchronization of all buckets in a deployment to a remote site, use site replication.

The mc admin cluster bucket command has the following subcommands:

Subcommand

Description

import

The mc admin cluster bucket import command imports bucket metadata as created by the mc admin cluster bucket export command.

export

The mc admin cluster bucket export command exports bucket metadata for use with the mc admin cluster bucket import command.

8.12 - mc admin cluster bucket export

Description

Note

Added: RELEASE.2022-06-17T02-52-50Z

The mc admin cluster bucket export command exports bucket metadata for use with the mc admin cluster bucket import command.

You can use this command to manually back up the metadata for the specified MinIO bucket. The command always saves the output as cluster-metadata.zip.

If you specify only the deployment as the target, this command backs up all bucket metadata on the target deployment.

The following command exports all bucket metadata for the myminio deployment.

mc admin cluster bucket export myminio

The command has the following syntax:

mc [GLOBALFLAGS] admin cluster bucket export  \
                                      ALIAS[/BUCKET]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

BUCKET

mc-cmd

Optional

The bucket to export metadata for.

Global Flags

This command supports any of the global flags.

8.13 - mc admin cluster iam export

Description

Note

Added: RELEASE.2022-06-26T18-51-48Z

The mc admin cluster iam export command exports IAM metadata for use with the mc admin cluster iam import command.

The command saves the output as ALIAS-iam-metadata.zip, where ALIAS is the alias of the MinIO deployment.

The following command exports all IAM metadata for the myminio deployment.

mc admin cluster iam export myminio

The command has the following syntax:

mc [GLOBALFLAGS] admin cluster iam export ALIAS  \
                 [--output, -o <string>]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Starting with RELEASE.2023-05-04T18-10-16Z, mc admin cluster iam export adds support for aliases ending with a trailing forward slash ALIAS/. Prior to this release, the command would fail when provided a trailing forward slash.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment to export IAM metadata for.

--output, --o

mc-cmd

Optional

Specify a custom file and path to use when exporting the IAM data.

Global Flags

This command supports any of the global flags.

Examples

Download all IAM metadata for a cluster to a ZIP file

The following command downloads all IAM metadata for the cluster at alias myminio, then stores the metadata to a ZIP file.

mc admin cluster iam export myminio

The ZIP file is named <alias>-iam-info.zip where <alias> is the alias of the cluster. For the above example, the file is named myminio-iam-info.zip.

The file is placed in the current active directory path.

Download all IAM metadata for a cluster and specify the name and path of the ZIP file

The following command downloads all IAM metadata for the cluster at alias myminio, then stores the metadata to a ZIP file at /tmp/myminio-iam.zip.

mc admin cluster iam export myminio --output /tmp/myminio-iam.zip

8.14 - mc admin policy create

Syntax

Creates a new policy on the target MinIO deployment.

MinIO deployments include the following built-in policies by default:

Consider the following JSON policy document saved at a file called /tmp/listmybuckets.json:

{
   "Version": "2012-10-17",
   "Statement": [
      {
         "Effect": "Allow",
         "Action": [
            "s3:ListAllMyBuckets"
         ],
         "Resource": [
            "arn:aws:s3:::*"
         ]
      }
   ]
}

The following command creates a new policy called listmybuckets on the alias myminio using the policy found at the file /tmp/listmybuckets.json.

mc admin policy create myminio listmybuckets /tmp/listmybuckets.json

The command has the following syntax:

mc admin policy create     \
                TARGET     \
                POLICYNAME \
                POLICYPATH
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

The mc admin policy create command accepts the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment on which to add the new policy.

POLICYNAME

mc-cmd

The name of the policy to add.

Specifying the name of an existing policy overwrites that policy on the TARGET MinIO deployment.

POLICYPATH

mc-cmd

The file path of the policy to add. The file must be a JSON-formatted file with IAM-compatible syntax and no more than 2048 characters.

Global Flags

This command supports any of the global flags.

Examples

Create a new policy called writeonly from the JSON file at /tmp/writeonly.json on the deployment at the alias myminio.

mc admin policy create myminio writeonly /tmp/writeonly.json

8.15 - mc admin prometheus metrics

Description

The mc admin prometheus metrics command prints Prometheus metrics for a cluster.

The output includes additional information about each metric, such as if its value is a counter or gauge.

For more complete documentation on using MinIO with Prometheus, see How to monitor MinIO server with Prometheus

Starting with MinIO Server RELEASE.2024-07-15T19-02-30Z and MinIO Client RELEASE.2024-07-11T18-01-28Z, metrics version 3 (v3) provides additional endpoints and metrics. To print v3 metrics use the --api_version v3 option.

MinIO recommends new deployments use version 3 (v3). Existing deployments can continue to use metrics version 2

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

The following command prints cluster metrics from the deployment at alias myminio:

mc admin prometheus metrics myminio cluster

The command has the following syntax:

mc [GLOBALFLAGS] admin prometheus metrics  \
                                  ALIAS                                           \
                                  [TYPE]                                          \
                                  [--api_version v3]                              \
                                  [--bucket <bucket name>]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of a configured MinIO deployment for which the command prints metrics.

--api-version

mc-cmd

Optional

To print version 3 (v3) metrics, include an --api-version v3 parameter. v3 is the only accepted value.

Omit --api-version to print version 2 (v2) metrics.

--bucket

mc-cmd

Optional

Requires --api-version. For v3 metric types that return bucket-level metrics, specify a bucket name.

--bucket works for the following v3 metric types:

  • api
  • replication

The following example prints API metrics for the bucket mybucket:

mc admin prometheus metrics ALIAS api --bucket mybucket --api-version v3
TYPE

mc-cmd

Optional

The type of metrics to print.

Valid values for metrics version 3 are:

  • api
  • audit
  • cluster
  • debug
  • ilm
  • logger
  • notification
  • replication
  • scanner
  • system

If not specified, a v3 command returns all metrics.

Valid values for metrics version 2 are:

  • bucket
  • cluster
  • node
  • resource

If not specified, a v2 command returns cluster metrics. Cluster metrics include rollups of certain node metrics.

Global flags

This command supports any of the global flags.

Examples

Print v3 metrics

Use mc admin prometheus metrics --api-version v3 to print all available v3 metrics and their current values for a MinIO deployment:

mc admin prometheus metrics ALIAS --api-version v3
  • Replace ALIAS with the alias of the MinIO deployment.

To print a specific type of metrics, include the TYPE. The following prints all scanner metrics for a deployment:

mc admin prometheus metrics ALIAS scanner --api-version v3

Print v3 API or bucket replication metrics

Certain v3 metric types accept a --bucket parameter to specify the bucket for which to print metrics. The following example prints v3 replication metrics for bucket mybucket:

mc admin prometheus metrics ALIAS replication --bucket mybucket --api-version v3
  • Replace ALIAS with the alias of the MinIO deployment.

To print API metrics for the bucket, replace replication with api.

Print v2 cluster metrics

By default, mc admin prometheus metrics prints v2 cluster metrics:

mc admin prometheus metrics ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.

Print other types of v2 metrics

To print another type of v2 metrics, specify the desired TYPE. The following example prints v2 bucket metrics:

mc admin prometheus metrics ALIAS bucket

Accepted values are bucket, cluster, node, and resource.

8.16 - mc admin scanner trace

Description

The mc admin scanner trace command displays scanner-specific API operations occurring on the target MinIO deployment.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

The following example returns a list of API operations related to the scanner on the myminio deployment.

mc admin scanner trace myminio

The command has the following syntax:

mc admin scanner trace ALIAS
                       [--filter-request]            \
                       [--filter-response]           \
                       [--filter-size <value>]       \
                       [--funcname <value>]          \
                       [--node <value>]              \
                       [--path <value>]              \
                       [--response-duration <value>] \
                       [--verbose, -v]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment for which to display scanner API operations.

--filter-request

mc-cmd

Optional

Trace scanner operations or calls with request size greater than the specified --filter-size value.

Must be used with --filter-size flag.

--filter-response

mc-cmd

Optional

Trace scanner operations or calls with response size greater than the specified --filter-size value.

Must be used with --filter-size flag.

--filter-size

mc-cmd

Optional

Filter output to request sizes or response sizes greater than the specified size.

Must be used with either --filter-request or --filter-response flag.

Valid units include:

Suffix Unit Size
k KB (Kilobyte, 1000 Bytes)
m MB (Megabyte, 1000 Kilobytes)
g GB (Gigabyte, 1000 Megabytes)
t TB (Terrabyte, 1000 Gigabytes)
ki KiB (Kibibyte, 1024 Bites)
mi MiB (Mebibyte, 1024 Kibibytes)
gi GiB (Gibibyte, 1024 Mebibytes)
ti TiB (Tebibyte, 1024 Gibibytes)
--funcname

mc-cmd

Optional

Returns calls for the entered function name.

--node

mc-cmd

Optional

Returns calls for the specified server.

--path

mc-cmd

Optional

Returns calls for the specified path.

--response-duration

mc-cmd

Optional

Trace calls with response duration greater than the specified value.

--verbose, -v

mc-cmd

Optional

Returns verbose output.

Global Flags

This command supports any of the global flags.

Examples

Monitor all scanner API operations

Use mc admin scanner trace to monitor scanner API operations on the MinIO deployment at the alias myminio:

mc admin scanner trace myminio

Show scanner trace for a specific path

Use mc admin scanner trace to monitor API operations for a the path my-bucket/my-prefix/* on the deployment at the myminio alias:

 mc admin scanner trace --path my-bucket/my-prefix/* myminio

Show scanner API operations for the scanObject function

Monitor scanner activity for the scanObject function on the myminio deployment:

mc admin scanner trace --funcname=scanner.ScanObject myminio

Show scanner operation requests greater than 1MB in size

Use mc admin scanner trace to monitor requests larger than a 1MB on the myminio deployment:

mc admin scanner trace --filter-request --filter-size 1MB myminio

Show scanner operation responses greater than 1MB in size

Use mc admin scanner trace to monitor large response sizes:

 mc admin scanner trace --filter-response --filter-size 1MB myminio

Show scanner operations that last longer than five milliseconds

Use mc admin scanner trace to monitor long operations:

 mc admin scanner trace --response-duration 5ms myminio

8.17 - mc admin user disable

Syntax

The mc admin user disable command disables a MinIO user on the target MinIO deployment.

Clients cannot use the user credentials to authenticate to the MinIO deployment. Disabling a user does not remove that user from the deployment. Use mc admin user enable to enable a disabled user on a MinIO deployment.

To manage external Identity Provider users, see OIDC or AD/LDAP.

The following command disables user myuser on the myminio MinIO deployment:

mc admin user disable myminio myuser

The command has the following syntax:

mc [GLOBALFLAGS] admin user disable   \
                            ALIAS     \
                            USERNAME
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment with the user to disable.

USERNAME

mc-cmd

Required

The username of the user to disable.

Global Flags

This command supports any of the global flags.

Example

Disable a User

Use mc admin user disable to disable a user on a MinIO deployment.

mc admin user disable ALIAS USERNAME
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace USERNAME with the username of the user to disable.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.18 - mc admin user svcacct disable

Warning

Important

This command has been replaced and will be deprecated in a future MinIO Client release.

As of MinIO Client RELEASE.2024-10-08T09-37-26Z, use the mc admin accesskey disable command to disable an access key for a built-in MinIO IDP user.

To disable access keys for AD/LDAP users, use the mc idp ldap accesskey disable command.

Syntax

The mc admin user svcacct disable command disables an existing access key.

The following command disables the specified access key:

mc admin user svcacct disable myminio myuserserviceaccount

The command has the following syntax:

mc [GLOBALFLAGS] admin user svcacct disable         \
                                    ALIAS           \
                                    SERVICEACCOUNT
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

SERVICEACCOUNT

mc-cmd

Required

The service account access key to disable.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.19 - mc admin cluster iam

Description

Note

Added: RELEASE.2022-06-26T18-51-48Z

The mc admin cluster iam command and its subcommands provide tools for manually importing and exporting MinIO identity and access management (IAM) metadata.

For automatic synchronization of all IAM configurations in a deployment to a remote site, use site replication.

The mc admin cluster iam command has the following subcommands:

Subcommand

Description

import

The mc admin cluster iam import command imports IAM metadata as created by the mc admin cluster iam export command.

export

The mc admin cluster iam export command exports IAM metadata for use with the mc admin cluster iam import command.

8.20 - mc admin policy detach

Syntax

Remove one or more IAM policies from either a MinIO-managed user or a group.

Exactly one --user or one --group is required.

The following command detaches the policy readonly from the user james on the deployment at alias myminio.

mc admin policy detach myminio readonly --user james

The command has the following syntax:

mc admin policy detach TARGET                         \
                       POLICY                         \
                       [POLICY...]                    \
                       [--user USER | --group GROUP]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Warning

Important

This command is intended for managing policy associations for MinIO-managed users only.

For managing policies to OpenID-managed users, see OpenID Connect Access Management.

For detaching policies from Active Directory/LDAP users or groups, use mc idp ldap policy detach.

Parameters

The mc admin policy detach command accepts the following arguments:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment with the user or group for which you want to detach one or more policies.

POLICY

mc-cmd

Required

The name of the policy to detach from either the user or the group. You may detach multiple policies at once by separating each policy name with a space.

MinIO deployments include the following built-in policies by default:

--user

mc-cmd

Optional

The username of the identity you want to detach the policy or policies from. You may only list one user.

You must include either the --user flag or the --group flag. You may not use the --user flag at the same time as the --group flag.

--group

mc-cmd

Optional

The name of the group identity you want to detach the policy or policies from. You may only list one group.

All users with membership in the group lose access to any permissions granted by the policies associated to the group, unless those are granted by other policies or groups the users belong to.

You must include either the --group flag or the --user flag. You may not use the --group flag at the same time as the --user flag.

Global Flags

This command supports any of the global flags.

Examples

Detach the policy readonly from the user james on the deployment at alias myminio.

mc admin policy detach myminio readonly --user james

Detach the audit-policy and acct-policy policies from group legal on the deployment at alias myminio.

mc admin policy detach myminio audit-policy acct-policy --group legal

8.21 - mc admin user accesskey edit

Syntax

The mc admin accesskey edit command modifies the configuration of an access key associated to the specified user.

The command requires that at least one attribute of the access key change. Otherwise, the command exits with an error message.

The following command applies a new policy and secret key to the myuserserviceaccount access key on the myminio deployment:

mc admin accesskey edit                                             \
                   myminio myuserserviceaccount                     \
                   --secret-key "myuserserviceaccountnewsecretkey"  \
                   --policy "/path/to/new/policy.json"

The command has the following syntax:

mc [GLOBALFLAGS] admin accesskey edit                      \
                                 ALIAS                     \
                                 ACCESSKEY                 \
                                 [--description string]    \
                                 [--expiry-duration value] \
                                 [--expiry value]          \
                                 [--name string]           \
                                 [--policy path]           \
                                 [--secret-key string]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

ACCESSKEY

mc-cmd

Required

The access key to modify.

--description

mc-cmd

Optional

Add or modify a description for the access key. For example, you might specify the reason the access key exists.

--expiry

mc-cmd

Optional

Set or modify an expiration date for the access key. The date must be in the future, you may not set an expiration date that has already passed.

Allowed date and time formats:

  • 2023-06-24
  • 2023-06-24T10:00
  • 2023-06-24T10:00:00
  • 2023-06-24T10:00:00Z
  • 2023-06-24T10:00:00-07:00

Mutually exclusive with --expiry-duration.

--expiry-duration

mc-cmd

Optional

Length of time for which the accesskey remains valid. Valid time units are “ns”, “us” (or “µs”), “ms”, “s”, “m”, “h”.

To expire the credentials after 30 days, use:

--expiry-duration 720h

Mutually exclusive with --expiry.

--name

mc-cmd

Optional

Add or modify a human-readable name for the access key.

--policy

mc-cmd

Optional

The path to a policy document to attach to the new access key, with a maximum size of 2048 characters. The attached policy cannot grant access to any action or resource not explicitly allowed by the parent user’s policies.

The new policy overwrites any previously attached policy.

--secret-key

mc-cmd

Optional

The secret key to associate with the new access key. Overwrites the previous secret key. Applications using the access keys must update to use the new credentials to continue performing operations.

Global Flags

This command supports any of the global flags.

Examples

Change the secret key for an access key

The following command modifies the secret key for the access key myuseraccesskey on the myminio deployment.

mc admin accesskey edit myminio/ myuseraccesskey --secret-key 'new-secret-key-change-me'

Change the expiration for an access key

The following command changes the expiration value for the access key myuseraccesskey on the myminio deployment.

mc admin accesskey edit myminio/ myuseraccesskey --expiry-duration 24h

The --expiry-duration cannot be added if the access key already has a value set for --expiry.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.22 - mc admin user enable

Syntax

The mc admin user enable command enables a MinIO user on the target MinIO deployment.

Clients can only use enabled users to authenticate to the MinIO deployment. Users created using mc admin user add are enabled by default.

To manage external Identity Provider users, see OIDC or AD/LDAP.

The following command enables user myuser on the myminio MinIO deployment:

mc admin user enable myminio myuser

The command has the following syntax:

mc [GLOBALFLAGS] admin user enable    \
                            ALIAS     \
                            USERNAME
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment with the user to enable.

USERNAME

mc-cmd

Required

The username of the user to enable.

Global Flags

This command supports any of the global flags.

Example

Enable a User

Use mc admin user enable to enable a user on a MinIO deployment.

mc admin user enable ALIAS USERNAME
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace USERNAME with the username of the user to enable.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.23 - mc admin user svcacct edit

Warning

Important

This command has been replaced and will be deprecated in a future MinIO Client release.

As of MinIO Client RELEASE.2024-10-08T09-37-26Z, use the mc admin accesskey edit command to modify access keys for built-in MinIO IDP users.

To modify access keys for AD/LDAP users, use the mc idp ldap accesskey edit command.

Syntax

The mc admin user svcacct edit command modifies the configuration of an access key associated to the specified user.

The following command applies a new policy and secret key to the myuserserviceaccount access key on the myminio deployment:

mc admin user svcacct edit                                             \
                      --secret-key "myuserserviceaccountnewsecretkey"  \
                      --policy "/path/to/new/policy.json"              \
                      myminio myuserserviceaccount

The command has the following syntax:

mc [GLOBALFLAGS] admin user svcacct edit            \
                                    [--secret-key]  \
                                    [--policy]      \
                                    ALIAS           \
                                    SERVICEACCOUNT
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

SERVICEACCOUNT

mc-cmd

Required

The service account to modify.

--description

mc-cmd

Optional

Note

Added: RELEASE.2023-05-18T16-59-00Z

Add a description for the service account. For example, you might specify the reason the service account exists.

--expiry

mc-cmd

Optional

Note

Added: RELEASE.2023-05-30T22-41-38Z

Set an expiration date for the service account. The date must be in the future, you may not set an expiration date that has already passed.

Allowed date and time formats:

  • 2023-06-24
  • 2023-06-24T10:00
  • 2023-06-24T10:00:00
  • 2023-06-24T10:00:00Z
  • 2023-06-24T10:00:00-07:00
--name

mc-cmd

Optional

Note

Added: RELEASE.2023-05-18T16-59-00Z

Add a human-readable name for the service account.

--policy

mc-cmd

Optional

The path to a policy document to attach to the new access key, with a maximum size of 2048 characters. The attached policy cannot grant access to any action or resource not explicitly allowed by the parent user’s policies.

The new policy overwrites any previously attached policy.

--secret-key

mc-cmd

Optional

The secret key to associate with the new access key. Overwrites the previous secret key. Applications using the access keys must update to use the new credentials to continue performing operations.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.24 - mc admin accesskey enable

Syntax

The mc admin accesskey enable command enables an existing access key.

The following command enables the specified access key:

mc admin accesskey enable myminio myuserserviceaccount

The command has the following syntax:

mc [GLOBALFLAGS] admin accesskey enable          \
                                 ALIAS           \
                                 SERVICEACCOUNT
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

SERVICEACCOUNT

mc-cmd

Required

The access key to enable.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.25 - mc admin config

Description

The mc admin config command manages configuration settings for the minio server.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Examples

Syntax

mc admin config set

mc-cmd

Sets a configuration key on the MinIO deployment. Configurations defined by environment variables override configurations defined by this command.

mc admin config get

mc-cmd

Gets a configuration key on the MinIO deployment created using mc admin config set.

mc admin config export

mc-cmd

Exports any configuration settings created using mc admin config set.

mc admin config history

mc-cmd

Lists the history of changes made to configuration keys by mc admin config.

Configurations defined by environment variables do not show.

mc admin config import

mc-cmd

Imports configuration settings exported using mc admin config export.

mc admin config reset

mc-cmd

Resets config to defaults. Configurations defined in environment variables are not affected.

mc admin config restore

mc-cmd

Roll back changes to configuration keys to a previous point in history.

Does not affect configurations defined by environment variables.

Configuration Settings

For a list of available configuration settings, see Settings Overview.

8.26 - mc admin policy entities

Syntax

List the entities associated with a policy, user, or group on a target MinIO deployment.

Note

Changed: RELEASE.2023-05-27T05-56-19Z

This command only returns minio-managed users and groups.

To list entities associated with an Active Directory or LDAP (AD/LDAP) configuration, use mc idp ldap policy entities.

For example, you can list all of the users and groups attached to a policy or list all of the policies attached to a specific user or group.

The following command returns a list of the policies associated with the user bob on the deployment at alias myminio.

mc admin policy entities myminio/ --user bob

The command has the following syntax:

mc admin policy entities         \
                TARGET           \
                [--user value]   \
                [--group value]  \
                [--policy value]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Warning

Important

This command is intended for managing policy associations for MinIO-managed users only.

For managing policies to OpenID-managed users, see OpenID Connect Access Management.

For viewing policies for Active Directory/LDAP users or groups, use mc idp ldap policy entities.

Parameters

The mc admin policy entities command accepts the following arguments:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment on which to add the new policy.

--group

mc-cmd

Optional

The name of the group identity for which you want to list attached policies.

You may include multiple groups by repeating the flag multiple times. The command returns each group with a list of associated entities.

--policy

mc-cmd

Optional

The name of a policy for which to list associated entities.

You may include multiple policies by repeating the flag multiple times. The command returns each policy with a list of all associated entities.

--user

mc-cmd

Optional

The username of the identity for which you want to list attached policies.

You may include multiple users by repeating the flag multiple times. The command returns each user with a list of associated policies.

Global Flags

This command supports any of the global flags.

Examples

List all entities and policy associations for a deployment

The following command lists all policies and the entity mappings associated with them on the deployment at alias myminio.

mc admin policy entities myminio/

List entities associated with two different policies

The following command lists all entities associated with the policies inteam-policy and mlteam-policy on the deployment at alias myminio.

mc admin policy entities myminio/ --policy finteam-policy --policy mlteam-policy

List policies associated with two different users

The following command lists all policies associated with the users bob and james on the deployment at alias myminio.

The command outputs the list of policies associated with bob then the list of policies associated with james on the deployment at alias myminio.

mc admin policy entities myminio/ --user bob --user james

List policies associated with two different groups

The following command lists all policies associated with the groups auditors and accounting on the deployment at alias myminio.

The command outputs the list of policies associated with the group auditors then the list of policies associated with the group accounting on the deployment at alias myminio.

mc admin policy entities play/ --group auditors --group accounting

List policies associated with a policy, a group, and a user

The following command lists all policies associated with the policy finteam-policy, the user bobfisher, and the group consulting on the deployment at alias myminio.

The command outputs the list of groups and users associated with the policy finteam-policy, then lists the policies associated with the user bobfisher, and finally lists the policies associated with the group consulting on the deployment at alias myminio.

mc admin policy entities play/ \
           --policy finteam-policy --user bobfisher --group consulting

Output

The output of the commands resembles the following:

Query time: 2023-04-04T20:39:27Z
  Policy -> Entity Mappings:
    Policy: finteam-policy
      User Mappings:
        bobfisher
    Policy: diagnostics
      User Mappings:
        james
        bobfisher
        marcia
      Group Mappings:
        consulting
        auditors
  User -> Policy Mappings:
    User: bobfisher
      ALLOW_PUBLIC_READ
      finteam-policy
      diagnostics
      readonly
      readwrite
      writeonly

8.27 - mc admin user info

Syntax

The mc admin user info command returns detailed information of a MinIO user on the target MinIO deployment.

To manage external Identity Provider users, see OIDC or AD/LDAP.

The following command returns details of user myuser on the myminio MinIO deployment:

mc admin user info myminio myuser

The command has the following syntax:

mc [GLOBALFLAGS] admin user info      \
                            ALIAS     \
                            USERNAME
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of a configured MinIO deployment to retrieve user information from.

USERNAME

mc-cmd

The username to retrieve information for.

Global Flags

This command supports any of the global flags.

Note

Changed: RELEASE.2023-05-26T23-31-54Z

mc admin user info --json output includes policies inherited from a user’s group memberships in memberOf.

Examples

View User Details

Use mc admin user info to view detailed user information for a user on a MinIO deployment:

mc admin user info ALIAS USERNAME
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace USERNAME with the username of the user to display information for.

For the MinIO internal IDentity Provider (IDP), the output resembles the following:

AccessKey: miniouser
Status: enabled
PolicyName:
MemberOf: []
Authentication: builtin (miniouser)

For a third-party identity service such as LDAP, the output resembles the following:

AccessKey: uid=dillon,ou=people,ou=swengg,dc=min,dc=io
Status:
PolicyName: consoleAdmin
MemberOf: []
Authentication: ldap/localhost:1389 (uid=dillon,ou=people,ou=swengg,dc=min,dc=io)

View Policies from Group Membership

Use mc admin user info with :option::–json <mc.–json> to view the policies inherited from a user’s group memberships:

mc admin user info ALIAS USERNAME --json
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace USERNAME with the username of the user to display information for.

The memberOf property in the output contains a list of groups the user is a member of, with the policies attached to each group. The output resembles the following:

{
 "status": "success",
 "accessKey": "myuser",
 "userStatus": "enabled",
 "memberOf": [
  {
   "name": "testingGroup",
   "policies": [
    "testingGroupPolicy"
   ]
 "authentication": builtin (myuser)
  }
 ]
}

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.28 - mc admin user svcacct enable

Warning

Important

This command has been replaced and will be deprecated in a future MinIO Client release.

As of MinIO Client RELEASE.2024-10-08T09-37-26Z, use the mc admin accesskey enable command to enable an access key for a built-in MinIO IDP user.

To enable access keys for AD/LDAP users, use the mc idp ldap accesskey enable command.

Syntax

The mc admin user svcacct enable command enables an existing access key.

The following command enables the specified access key:

mc admin user svcacct enable myminio myuserserviceaccount

The command has the following syntax:

mc [GLOBALFLAGS] admin user svcacct enable          \
                                    ALIAS           \
                                    SERVICEACCOUNT
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

SERVICEACCOUNT

mc-cmd

Required

The service account access key to enable.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.29 - mc admin accesskey info

Syntax

The mc admin accesskey info command returns a description of the specified access key(s).

The description output includes the following details, as available:

  • Access Key
  • Parent user of the specified access key
  • Access key status (on or off)
  • Policy or policies
  • Comment
  • Expiration

The following command returns information on the specified access key:

mc admin accesskey info myminio myuseraccesskey

The command has the following syntax:

mc [GLOBALFLAGS] admin accesskey info      \
                                 ALIAS     \
                                 ACCESSKEY
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

ACCESSKEY

mc-cmd

Required

The access key to display.

Return information for multiple access keys by separating each access key with a space.

Global Flags

This command supports any of the global flags.

Examples

Display access key details

Use mc admin accesskey info to display details of an access key on a MinIO deployment:

   mc admin accesskey info myminio myaccesskey
  • Replace myminio with the alias of the MinIO deployment.
  • Replace myaccesskey with the access key for which to display information. List multiple keys by separating each with a space.

The output resembles the following:

AccessKey: myuserserviceaccount
ParentUser: myuser
Status: on
Comment:
Policy: implied
Expiration: no-expiry

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.30 - mc admin decommission

Syntax

The mc admin decommission command starts the decommissioning process for a MinIO server pools. Decommissioning is designed for removing an older server pool whose hardware is no longer sufficient or performant compared to the pools in the deployment. MinIO automatically migrates data from the decommissioned pool to the remaining pools in the deployment based on the ratio of free space available in each pool.

See Decommission Server Pools for a complete procedure on decommissioning a server pool.

Note

Decommissioning is Permanent

Once MinIO begins decommissioning a pool, it marks that pool as permanently inactive (“draining”). Cancelling or otherwise interrupting the decommissioning procedure does not restore the pool to an active state.

Decommissioning is a major administrative operation that requires care in planning and execution, and is not a trivial or ‘daily’ task.

MinIO SUBNET users can log in and create a new issue related to decommissioning. Coordination with MinIO Engineering via SUBNET can ensure successful decommissioning, including performance testing and health diagnostics.

Community users can seek support on the MinIO Community Slack. Community Support is best-effort only and has no SLAs around responsiveness.

mc admin [GLOBALFLAGS] decommission start|status|cancel ALIAS TARGET

Parameters

start

mc-cmd

Required Starts the decommissioning process for the server pool specified to TARGET.

Requires specifying TARGET

status

mc-cmd

Required Returns the decommissioning status of all server pools on the specified ALIAS:

  • Active - The pool is active and not scheduled for decommissioning.
  • Draining - The pool is currently decommissioning.
  • Draining (Failed) - The decommissioning process failed and requires manually restart.
  • Draining (Cancelled) - The decommissioning process was manually cancelled.

If the command includes a TARGET, the command output includes the rate of data migration if decommissioning is in progress.

cancel

mc-cmd

Required Cancels an ongoing decommissioning process on the pool specified to TARGET.

Requires specifying TARGET.

Cancelling a decommissioning process does not return the pool to an active state. You must eventually complete the decommissioning process and remove the pool from the deployment. You can resume the process by running mc admin decommission start again against the pool.

ALIAS

mc-cmd

Required The alias of the MinIO deployment on which to start the decommissioning process.

TARGET

mc-cmd

The full description of the server pool on which the command operates. For example:

https://minio-{01...04}.example.net:9000/mnt/disk{1...4}

Global Flags

This command supports any of the global flags.

Examples

See Decommission Server Pools for a complete procedure on decommissioning a server pool.

8.31 - mc admin policy info

Syntax

Returns the specified policy in JSON format if it exists on the target MinIO deployment.

The following command displays the contents of the writeonly policy on the alias myminio.

 mc admin policy info myminio writeonly

The command has the following syntax:

mc admin policy info TARGET POLICYNAME
                     [--policy-file, -f <path>]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

The mc admin policy info command accepts the following arguments:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment from which to display the specified policy.

POLICYNAME

mc-cmd

Required

The name of the policy whose details you want to display.

--policy-file

mc-cmd

Optional

Specifly the path of a file to write the contents of the specified policy JSON. If the path already exists, the command overwrites the existing file with the contents of the specified file.

Global Flags

This command supports any of the global flags.

Examples

Display the contents of the writeonly policy on the alias myminio.

mc admin policy info myminio writeonly

Show information on a given policy and write the policy JSON content to /tmp/policy.json.

mc admin policy info myminio writeonly --policy-file /tmp/policy.json

Output

The command returns output that resembles the following:

{
   "Version": "2012-10-17",
   "Statement": [
      {
         "Effect": "Allow",
         "Action": [
            "s3:PutObject"
         ],
         "Resource": [
            "arn:aws:s3:::*"
         ]
      }
   ]
}

8.32 - mc admin user ls

Syntax

The mc admin user ls command lists all MinIO users on the target MinIO deployment.

The mc admin user list command has equivalent functionality to mc admin user ls.

mc admin user ls does not return the access key or secret key associated to a user. Use mc admin user info to retrieve detailed user information, including the user access key.

To manage external Identity Provider users, see OIDC or AD/LDAP.

The following command lists all users on the myminio MinIO deployment:

mc admin user ls myminio

The command has the following syntax:

mc [GLOBALFLAGS] admin user list   \
                            ALIAS
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of a configured MinIO deployment from which the command lists users.

Global Flags

This command supports any of the global flags.

Example

List Available Users

Use mc admin user ls to list all users on a MinIO deployment:

mc admin user ls ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.

The output resembles the following:

enabled    devadmin              readwrite
enabled    devtest               readonly
enabled    newuser

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.33 - mc admin user svcacct info

Warning

Important

This command has been replaced and will be deprecated in a future MinIO Client release.

As of MinIO Client RELEASE.2024-10-08T09-37-26Z, use the mc admin accesskey info command to display information about access keys for built-in MinIO IDP users.

For access keys for AD/LDAP users, use the mc idp ldap accesskey info command.

Syntax

The mc admin user svcacct info command returns a description of the specified access key.

“Access Keys” have equivalent functionality to and replace the concept of “Service Accounts” in MinIO.

The description output includes the following details, as available:

  • Access Key
  • Parent user of the specified access key
  • Access key status (on or off)
  • Policy or policies
  • Comment
  • Expiration

Use --policy to view the attached policies.

The following command returns information on the specified access key:

mc admin user svcacct info myminio myuseraccesskey

The command has the following syntax:

mc [GLOBALFLAGS] admin user svcacct info           \
                                    [--policy]     \
                                    ALIAS          \
                                    ACCESSKEY
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

ACCESSKEY

mc-cmd

Required

The service account access key to display.

--policy

mc-cmd

Optional

Displays policies attached to the specified service account.

Global Flags

This command supports any of the global flags.

Examples

Display Service Account Details

Use mc admin user svcacct info to display details of a service account on a MinIO deployment:

   mc admin user svcacct info ALIAS ACCESSKEY
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace ACCESSKEY with the service account access key.

The output resembles the following:

AccessKey: myuserserviceaccount
ParentUser: myuser
Status: on
Comment:
Policy: implied
Expiration: no-expiry

Display Service Account Policy Details

Use mc admin user svcacct info to display the policies attached to service account:

   mc admin user svcacct info --policy ALIAS ACCESSKEY
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace ACCESSKEY with the service account access key.

The output resembles the following:

{
 "Version": "2012-10-17",
 "Statement": [
  {
   "Effect": "Allow",
   "Action": [
    "s3:*"
   ],
   "Resource": [
    "arn:aws:s3:::*"
   ]
  }
 ]
}

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.34 - mc admin accesskey ls

Syntax

The mc admin accesskey ls command lists users, access keys, or temporary security token service keys managed by the MinIO deployment.

The alias mc admin accesskey list has equivalent functionality to mc admin accesskey ls.

The following command lists all access keys associated to the user with username admin1 on the deployment at alias myminio:

mc admin accesskey ls myminio admin1

The output resembles the following:

   Access Key        | Expiry
5XF3ZHNZK6FBDWH9JMLX | 2023-06-24 07:00:00 +0000 UTC
F4V2BBUZSWY7UG96ED70 | 2023-12-24 18:00:00 +0000 UTC
FZVSEZ8NM9JRBEQZ7B8Q | no-expiry
HOXGL8ON3RG0IKYCHCUD | no-expiry

The command has the following syntax:

mc [GLOBALFLAGS] admin accesskey ls             \
                                 ALIAS          \
                                 [USER]         \
                                 [--all]        \
                                 [--self]       \
                                 [--temp-only]  \
                                 [--users-only]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

USER

mc-cmd

Optional

The username of the user(s) to display access keys for. Separate multiple usernames with a space.

--all

mc-cmd

Optional

List all users and any access keys or temporary STS keys associated with them. Requires admin privileges for the deployment.

This flag is mutually exclusive with the other flags available for this command.

--svcacc-only

mc-cmd

Optional

List temporary Security Token Service (STS) keys on the deployment.

This flag is mutually exclusive with the other flags available for this command.

--self

mc-cmd

Optional

List access keys and STS keys for the currently authenticated user.

This flag is mutually exclusive with the other flags available for this command.

--temp-only

mc-cmd

Optional

List users with their access keys. This returns only users that have associated access keys.

This flag requires admin privileges for the user running the command.

This flag is mutually exclusive with the other flags available for this command.

--users-only

mc-cmd

Optional

List the MinIO users managed by the deployment. Use in conjunction with the --all flag to list all users on the deployment.

Global Flags

This command supports any of the global flags.

Examples

List all built-in users and associated access keys

The following command lists all users managed by the MinIO deployment at alias myminio and any associated access keys or temporary STS tokens.

mc admin accesskey list myminio/ --all

Return a list of access keys for the current authenticated user

The following command lists the access keys or temporary STS tokens associated with the currently authenticated user for the myminio deployment.

mc admin accesskey list myminio/ --self

List all users created and managed by the deployment

The following command returns a list of all of the users on the current deployment. The list only includes MinIO IDP managed users, not users managed by a third party tool on a protocol like OpenID or Active Directory/LDAP.

mc admin accesskey ls myminio/ --all --users-only

Return a list of access keys associated with the users miniouser1 and miniouser2

The following command returns a list of access keys for two users on the myminio deployment.

mc admin accesskey ls myminio/ miniouser1 miniouser2

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.35 - mc admin group

Description

The mc admin group command manages groups on a MinIO deployment.

A group is a collection of users. Each group can have one or more assigned policies that explicitly list the actions and resources to which group members are allowed or denied access. Groups provide a simplified method for managing shared permissions among users with common access patterns and workloads.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Groups and Policy-Based Access Control

MinIO uses Policy-Based Access Control (PBAC) to support authorization of users who have successfully authenticated to the deployment. Each policy includes rules that dictate the allowed or denied actions/resources on the deployment. You can assign one or more policies to a group. Users with membership in the group inherit the group’s assigned policies. A user’s total set of permissions includes their explicitly assigned policies and any policies inherited via group membership.

Newly created groups have no policies by default. To configure a group’s assigned policies, use the mc admin policy attach command.

For more information on MinIO users and groups, see User Management and Group Management. For more information on MinIO policies, see MinIO Policy Based Access Control.

Note

Deny overrides Allow

MinIO follows the IAM standard where a Deny rule overrides Allow rule on the same action or resource. For example, if a user has an explicitly assigned policy with an Allow rule for an action/resource while one of its groups has an assigned policy with a Deny rule for that action/resource, MinIO would apply only the Deny rule.

For more information on IAM policy evaluation logic, see the IAM documentation on Determining Whether a Request is Allowed or Denied Within an Account.

Examples

Create a New Group

Use mc admin group add to create a new group to an S3-compatible host:

mc admin group add ALIAS GROUPNAME MEMBER [MEMBER...]
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace GROUPNAME with the name of the group to create.
  • Replace MEMBER with at least one user on the S3 host. Specify multiple members as a list: MEMBER1 MEMBER2 MEMBER3

List Available Groups

Use mc admin group ls to list list all groups on an S3-compatible host:

mc admin group ls ALIAS
  • Replace ALIAS with the alias of the S3-compatible host.

View Group Details

Use mc admin group info to view detailed group information on an S3-compatible host:

mc admin group info ALIAS GROUPNAME
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace GROUPNAME with the name of the group.

Remove a Group

Use mc admin group rm to remove a group from an S3-compatible host:

mc admin group rm ALIAS GROUPNAME
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace GROUPNAME with the name of the group.

Disable a Group

Use mc admin group disable to disable a group on an S3-compatible host:

mc admin group disable ALIAS GROUPNAME
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace GROUPNAME with the name of the group.

Enable a Group

Use mc admin group enable to enable a group on an S3-compatible host:

mc admin group enable ALIAS GROUPNAME
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace GROUPNAME with the name of the group.

Quick Reference

mc admin group add TARGET GROUPNAME MEMBERS

Adds a user to a group on the MinIO deployment. Creates the group if it does not exist.

mc admin group info TARGET GROUPNAME

Returns detailed information for a group on the MinIO deployment.

mc admin group ls TARGET

Returns a list of all groups on the MinIO deployment.

mc admin group rm TARGET GROUPNAME

Removes a group on the MinIO deployment.

mc admin group enable TARGET GROUPNAME

Enables a group on the MinIO deployment. Users can only inherit policies assigned to an enabled group.

mc admin group disable TARGET GROUPNAME

Disables a group on the MinIO deployment. Users cannot inherit policies assigned to a disabled group.

Syntax

mc admin group add

mc-cmd

Adds an existing user to the group. The command creates the group if it does not exist. The command has the following syntax:

mc admin group add TARGET GROUPNAME MEMBERS

The command accepts the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment on which the command adds users to the new or existing group

GROUPNAME

mc-cmd

The name of the group. The command creates the group if it does not already exist. Use mc admin group ls to review the existing groups on a deployment.

A group name cannot contain the characters = (equal sign) or , (comma).

MEMBERS

mc-cmd

The name of the user to add to the group.

The user must exist on the TARGET MinIO deployment. Use mc admin user ls to review the available users on the deployment.

mc admin group info

mc-cmd

Returns details for the group on the target deployment, such as all users with membership in the group and the assigned policies. The command has the following syntax:

mc admin group info TARGET GROUPNAME

The command accepts the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment from which to retrieve the group information.

GROUPNAME

mc-cmd

The name of the group.

mc admin group ls, list

mc-cmd

List all groups on the target MinIO deployment. The command has the following syntax:

mc admin group ls TARGET

The command accepts the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment from which to retrieve groups.

mc admin group rm, remove

mc-cmd

Removes a group on the target MinIO deployment. Removing a group does not remove any users with membership in the group. Use mc admin user rm to remove users from a group.

The command has the following syntax:

mc admin group rm TARGET GROUPNAME

The command accepts the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment on which to remove the group.

GROUPNAME

mc-cmd

The name of the group to remove.

mc admin group enable

mc-cmd

Enables the group on the target MinIO deployment. Users can only inherit policies from an enabled group. Groups are enabled on creation by default. The command has the following syntax:

mc admin group enable TARGET GROUPNAME

The command accepts the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment on which to enable the group.

GROUPNAME

mc-cmd

The name of the group to enable.

mc admin group disable

mc-cmd

Disables the group on the target MinIO deployment. Users cannot inherit policies from a disabled group. The command has the following syntax:

mc admin group disable TARGET GROUPNAME

The command accepts the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment on which to disable the group.

GROUPNAME

mc-cmd

The name of the group to disable.

8.36 - mc admin policy ls

Syntax

Lists all policies on the target MinIO deployment.

The mc admin policy list command has equivalent functionality to mc admin policy ls.

The following command displays a list of the policies currently current on the alias play.

mc admin policy ls play

The command has the following syntax:

mc admin policy ls TARGET
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

The mc admin policy ls command accepts the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment from which the command lists the available policies.

Global Flags

This command supports any of the global flags.

Examples

List the policies that exist on the deployment at alias myminio.

mc admin policy ls myminio

Output

The command returns output that resembles the following:

readwrite
writeonly

8.37 - mc admin user rm

Syntax

The mc admin user rm command removes a MinIO user on the target MinIO deployment.

The mc admin user remove command has equivalent functionality to mc admin user rm.

To manage external Identity Provider users, see OIDC or AD/LDAP.

The following command removes user myuser on the myminio MinIO deployment:

mc admin user rm myminio myuser

Removes a user on the target MinIO deployment.

The command has the following syntax:

mc [GLOBALFLAGS] admin user remove    \
                            ALIAS     \
                            USERNAME
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the configured MinIO deployment with the user to remove.

USERNAME

mc-cmd

Required

The username of the user to remove.

Global Flags

This command supports any of the global flags.

Example

Remove a User

Use mc admin user rm to remove a user from a MinIO deployment:

mc admin user rm ALIAS USERNAME
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace USERNAME with the username of the user to remove.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.38 - mc admin user svcacct ls

Warning

Important

This command has been replaced and will be deprecated in a future MinIO Client release.

As of MinIO Client RELEASE.2024-10-08T09-37-26Z, use the mc admin accesskey ls command to list access keys for built-in MinIO IDP users.

For access keys for AD/LDAP users, use the mc idp ldap accesskey ls command.

Syntax

The mc admin user svcacct ls command lists all access keys associated to the specified user.

The alias mc admin user svcacct list has equivalent functionality to mc admin user svcacct ls.

The following command lists all access keys associated to the user with username admin1:

mc admin user svcacct ls myminio admin1

The output resembles the following:

   Access Key        | Expiry
5XF3ZHNZK6FBDWH9JMLX | 2023-06-24 07:00:00 +0000 UTC
F4V2BBUZSWY7UG96ED70 | 2023-12-24 18:00:00 +0000 UTC
FZVSEZ8NM9JRBEQZ7B8Q | no-expiry
HOXGL8ON3RG0IKYCHCUD | no-expiry
Note

Added: RELEASE.2023-05-26T23-31-54Z

The list of access keys includes the expiry date, or no-expiry for keys that do not expire.

The command has the following syntax:

mc [GLOBALFLAGS] admin user svcacct ls   \
                                    ALIAS  \
                                    USER
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

USER

mc-cmd

Required

The username of the user to display access keys for.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.39 - mc admin accesskey rm

Syntax

The mc admin accesskey rm command removes an access key associated to a user on the deployment.

The mc admin accesskey remove command has equivalent functionality to mc admin accesskey rm.

Caution

Warning

Applications can no longer authenticate using the access key after its removal.

The following command removes the specified access key:

mc admin accesskey rm myminio myuserserviceaccount

The command has the following syntax:

mc [GLOBALFLAGS] admin accesskey rm                \
                                 ALIAS             \
                                 ACCESSKEYTOREMOVE
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

ACCESSKEYTOREMOVE

mc-cmd

Required

The access key to remove.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.40 - mc admin heal

Description

The mc admin heal command scans for objects that are damaged or corrupted and heals those objects.

mc admin heal is resource intensive and typically not required as a manual process, even after drive failures or corruption events.

As a part of normal operations, MinIO:

  • automatically heals objects damaged by silent bit rot corruption, drive failure, or other issues on each POST or GET operation.
  • performs periodic background object healing using the scanner.
  • aggressively heals objects after drive replacement.

Refer to Object Healing for more details on how MinIO heals objects.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Syntax

mc admin heal has the following syntax:

mc admin heal [FLAGS] TARGET             \
                      [--all-drives, -a] \
                      [--force]          \
                      [--verbose, -v]

mc admin heal supports the following arguments:

TARGET

mc-cmd

Required

The full path to the bucket or bucket prefix on which the command should perform object healing. Specify the alias of a configured MinIO deployment as the prefix for the path. For example:

mc admin heal play/mybucket/myprefix

If the TARGET bucket or bucket prefix has an active healing scan, the command returns the status of that scan.

--all-drives, -a

mc-cmd

Optional

Select all drives and show verbose information.

--force

mc-cmd

Optional

Disables warning prompts.

--verbose, -v

mc-cmd

Optional

Show information about offline and faulty healing drives.

Healing Colors

Some versions of MinIO used a color key as a way to differentiate objects with different healing statuses.

Note

Changed: mc

RELEASE.2024-11-17T19-35-25Z

The color meaning has been updated.

  • Green indicates the bucket is healthy.
  • Yellow indicates the bucket requires healing on one or more drives.
  • Red indicates one or more drives are unhealthy.
  • Grey indicates an indeterminate healing state.

8.41 - mc admin policy rm

Syntax

Removes an IAM policy from the target MinIO deployment.

The mc admin policy remove command has equivalent functionality to mc admin policy rm.

The following command removes the policy names writeonly from the myminio MinIO deployment:

mc admin policy rm myminio writeonly

The command has the following syntax:

mc admin policy rm TARGET POLICYNAME
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

The mc admin policy rm command accepts the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment from which to remove the policy.

POLICYNAME

mc-cmd

The name of the policy to remove.

Global Flags

This command supports any of the global flags.

Examples

Remove a policy called listbuckets.

mc admin policy rm myminio listbuckets

8.42 - mc admin user sts info

Syntax

The mc admin user sts info command retrieves information on the specified STS credential, such as the parent MinIO user who generated the credentials, associated policies, and expiration.

STS credentials provide temporary access to the MinIO deployment.

The following command retrieves information on the STS credentials with specified access key:

mc admin user sts info myminio/ "J123C4ZXEQN8RK6ND35I"

The command has the following syntax:

mc [GLOBALFLAGS] admin user sts info          \
                                [--policy]    \
                                ALIAS         \
                                STSACCESSKEY
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

STSACCESSKEY

mc-cmd

Required

The access key for the STS credentials.

--policy

mc-cmd

Optional

Prints the policy attached to the specified STS credentials in JSON format.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.43 - mc admin user svcacct rm

Warning

Important

This command has been replaced and will be deprecated in a future MinIO Client release.

As of MinIO Client RELEASE.2024-10-08T09-37-26Z, use the mc admin accesskey rm command to delete access keys for built-in MinIO IDP users.

For access keys for AD/LDAP users, use the mc idp ldap accesskey rm command.

Syntax

The mc admin user svcacct rm command removes an access key associated to a user on the deployment.

The mc admin user svcacct remove command has equivalent functionality to mc admin user svcacct rm.

Applications can no longer authenticate using that access key after removal.

The following command removes the specified access key:

mc admin user svcacct rm myminio myuserserviceaccount

The command has the following syntax:

mc [GLOBALFLAGS] admin user svcacct remove          \
                                    ALIAS           \
                                    SERVICEACCOUNT
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

SERVICEACCOUNT

mc-cmd

Required

The service account access key to remove.

Global Flags

This command supports any of the global flags.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

8.44 - mc admin info

Description

The mc admin info command displays information on a MinIO server. For distributed MinIO deployments, mc admin info displays information for each MinIO server in the deployment.

Note

Added: mc

RELEASE.2024-05-03T11-21-07Z

The command output includes information about the erasure code setting for the cluster. This displays in the output in the format EC:#.

The output of the command resembles the following:

●  play.min.io
   Uptime: 2 hours
   Version: 2024-05-10T08:24:14Z
   Network: 1/1 OK
   Drives: 4/4 OK
   Pool: 1

Pools:
   1st, Erasure sets: 1, Drives per erasure set: 4

0 B Used, 3 Buckets, 0 Objects
4 drives online, 0 drives offline, EC:1

Examples

The following example assumes that the play alias exists in the mc configuration file. You can replace play with the alias for your preferred S3-compatible deployment.

See mc alias for more information on aliases.

mc admin info play

Syntax

mc admin info has the following syntax:

mc admin info TARGET      \
              [--offline]

Specify the alias of a configured MinIO deployment as the TARGET.

Parameters

TARGET

mc-cmd

Required

The alias about which you want to display information.

--offline

mc-cmd

Optional

Show only offline drives or nodes.

8.45 - mc admin user svcacct

Warning

Important

These commands have been replaced and will be deprecated in a future MinIO Client release.

As of MinIO Client RELEASE.2024-10-08T09-37-26Z, use the mc admin accesskey command and its subcommands for functions related to built-in MinIO IDP users and their access keys or STS tokens.

For access keys for AD/LDAP users, use the mc idp ldap accesskey command and its subcommands.

Description

The mc admin user svcacct command and its subcommands create and manage Access Keys on a MinIO deployment.

As of MinIO Client RELEASE.2024-10-08T09-37-26Z, these commands have been replaced by mc admin accesskey and mc idp ldap accesskey. This command and its subcommands will be deprecated in a future MinIO Client release.

Each access key is linked to a user identity and inherits the policies attached to its parent user or those groups in which the parent user has membership. Each access key also supports an optional inline policy which further restricts access to a subset of actions and resources available to the parent user.

mc admin user svcacct only supports creating access keys for MinIO-managed and Active Directory/LDAP-managed accounts.

To create access keys for OpenID Connect-managed users, log into the MinIO Console and generate the access keys through the UI.

The mc admin user svcacct command has the following subcommands:

Subcommand

Description

add

The mc admin user svcacct add command adds a new access key to an existing MinIO or AD/LDAP user.

disable

The mc admin user svcacct disable command disables an existing access key.

edit

The mc admin user svcacct edit command modifies the configuration of an access key associated to the specified user.

enable

The mc admin user svcacct enable command enables an existing access key.

info

The mc admin user svcacct info command returns a description of the specified access key.

list

The mc admin user svcacct ls command lists all access keys associated to the specified user.

rm

The mc admin user svcacct rm command removes an access key associated to a user on the deployment.

8.46 - mc admin kms key

Description

The mc admin kms key command performs cryptographic key management operations through the MinIO Key Encryption Service (KES).

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Syntax

mc admin kms key create

mc-cmd

Creates a new master key on a Key Management System (KMS).

The command has the following syntax:

mc admin kms key create TARGET [KEY_NAME]

The command accepts the following arguments:

TARGET

mc-cmd

Specify the alias of a configured MinIO deployment.

The TARGET deployment must include a configured MinIO Key Encryption Service (KES) server.

KEY_NAME

mc-cmd

Specify the name of the new master key.

mc admin kms key status

mc-cmd

Requests information on a Key Management System (KMS) master key.

The command has the following syntax:

mc admin kms key status TARGET [KEY_NAME]

The command accepts the following arguments:

TARGET

mc-cmd

Specify the alias of a configured MinIO deployment.

The TARGET deployment must include a configured MinIO Key Encryption Service (KES) server.

KEY_NAME

mc-cmd

Specify the name of a master key on the KMS.

Omit this argument to return the default master key on the TARGET deployment.

mc admin kms key list

mc-cmd

List all Key Management System (KMS) keys for a MinIO instance.

The command has the following syntax:

mc admin kms key list TARGET

The command accepts the following argument:

TARGET

mc-cmd

Specify the alias of a configured MinIO deployment.

The TARGET deployment must include a configured MinIO Key Encryption Service (KES) server.

8.47 - mc admin logs

Note

SUBNET Registration Required

The mc support commands are designed for MinIO deployments registered with MinIO SUBNET to ensure optimal outcome of diagnostics and performance testing. Deployments not registered with SUBNET cannot use the mc support commands.

Note

Changed: RELEASE.2022-12-02T23-48-47Z

mc support logs moved to mc admin logs and provide a simpler command interface for displaying server logs for the MinIO deployment.

The output is similar to what is available via journalctl -uf minio for systemd-controlled deployments.

Description

Use the mc admin logs command to show MinIO server logs.

The uploading feature remains disabled by default until explicitly enabled for a deployment on an opt-in only basis. If enabled, you can disable the feature at any time with mc support callhome disable.

Examples

Show Logs for a Deployment

The following command displays the most recent ten server logs of any type for the alias minio1.

mc admin logs minio1

Show Last 5 Log Entries for a Node

The following command shows the most recent five log entries for a node1 on the deployment with alias minio1.

mc admin logs --last 5 myminio node1

Show Application Type Log Entires for a Deployment

The following command shows log entries of the type application for all nodes on the deployment with alias minio1.

mc admin logs --type application minio1

Syntax

The command has the following syntax:

mc admin logs [GLOBAL FLAGS]     \
              [--last, -l value] \
              [--type, -t value] \
              ALIAS              \
              [NODE]

Parameters

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

--last, -l

mc-cmd

Optional

Show only the most recent specified number of log entries.

If this flag is not included, up to the last 10 log entries show.

--type, --type

mc-cmd

Optional

List log entries of a specified type. Valid types are minio, application, or all.

If not specified, all log entry types show.

NODE

mc-cmd

Optional

In distributed deployments, specify which node’s logs to show by entering the node’s name.

Global Flags

This command supports any of the global flags.

8.48 - mc admin policy

Note

Changed: mc

RELEASE.2023-03-20T17-17-53Z

The following commands are deprecated:

The following command is added:

Description

The mc admin policy commands manage policies for use with MinIO Policy-Based Access Control (PBAC). MinIO PBAC uses IAM-compatible policy JSON documents to define rules for accessing resources on a MinIO server.

For complete documentation on MinIO PBAC, including policy document JSON structure and syntax, see Access Management. To manage policies for deployments that use LDAP authentication, see mc idp ldap policy.

Subcommands

mc admin policy includes the following subcommands:

Subcommand

Description

attach

Attaches one or more IAM policies to either a MinIO-managed user or a group.

create

Creates a new policy on the target MinIO deployment.

detach

Remove one or more IAM policies from either a MinIO-managed user or a group.

entities

List the entities associated with a policy, user, or group on a target MinIO deployment.

info

Returns the specified policy in JSON format if it exists on the target MinIO deployment.

ls

Lists all policies on the target MinIO deployment.

rm

Removes an IAM policy from the target MinIO deployment.

8.49 - mc admin prometheus

Description

The mc admin prometheus command and its subcommands provide access to MinIO Prometheus metrics.

Subcommands

mc admin prometheus includes the following subcommands:

Subcommand

Description

generate

The mc admin prometheus generate command generates a metrics scraping configuration file for use with Prometheus.

metrics

The mc admin prometheus metrics command prints Prometheus metrics for a cluster.

8.50 - mc admin rebalance

Permission

This command requires that the user performing it have the admin:Rebalance policy action for the deployment.

Description

The mc admin rebalance command allows starts, monitors, or stops a rebalancing operation on a MinIO deployment. Rebalancing redistributes objects across all pools in the deployment.

MinIO does not automatically rebalance objects when adding a new server pool. Instead, MinIO writes new objects to the pool with relatively more free space compared to the other available pools on the deployment. Triggering a manual rebalancing procedure prompts MinIO to scan the entire deployment and move objects as necessary to achieve a similar available free space across all pools.

This is an expensive and time consuming operation. Consider only running a rebalance procedure during light or no use of the deployment. If write operations do occur during a rebalance operation, they process in parallel and write to a pool not actively in rebalancing.

You can stop a rebalance and start it again later as needed.

Follow the progress of an ongoing rebalance operation using the following command:

mc admin trace --call rebalance ALIAS
Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

The mc admin rebalance command has the following subcommands:

Subcommand Description
mc admin rebalance start Starts a rebalance operation on a MinIO deployment.
mc admin rebalance status Outputs the current status of an in-progress rebalance operation.
mc admin rebalance stop Stops an in-progress rebalance operation.

Syntax

mc admin rebalance start

mc-cmd

Start a rebalance operation for a MinIO deployment.

Consider a MinIO deployment with two pools with an assigned alias of minio1. One pool has 250 GB of free space while the other pool has 3 TB of free space.

The mc admin rebalance command shifts objects from the pool with less free space to the pool with more free space so that there is roughly equal free space on both pools.

mc admin rebalance start minio1

The command has the following syntax:

mc [GLOBALFLAGS] admin rebalance start ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to rebalance.

mc admin rebalance status

mc-cmd

Queries the deployment with an active rebalance process and returns information about the status of the rebalance process.

The status returns the ID of the rebalance operation, the time of the operation, and details for each pool on the deployment. For each pool, the status shows the pool ID, the pool’s rebalance status, the percentage of used space, and rebalance progress for the pool.

mc admin rebalance status minio1

The command has the following syntax:

mc [GLOBALFLAGS] admin rebalance ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.

mc admin rebalance stop

mc-cmd

Ends an in-progress rebalance job on the specified deployment.

mc admin rebalance stop minio1

The command has the following syntax:

mc [GLOBALFLAGS] admin rebalance stop ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.

Global Flags

This command supports any of the global flags.

Behavior

Back Up Cluster Settings First

Use the mc admin cluster bucket export and mc admin cluster iam export commands to take a snapshot of the bucket metadata and IAM configurations respectively prior to starting decommissioning. You can use these snapshots to restore bucket/IAM settings to recover from user or process errors as necessary.

Rebalancing Ignores Expired Objects and Trailing DeleteMarker

Starting with RELEASE.2023-06-23T20-26-00Z, rebalancing ignores object versions which have expired based on the configured lifecycle rules for the parent bucket.

Rebalancing also ignores objects where the only remaining version is a delete marker. This avoids inter-pool I/O for objects already considered fully deleted.

MinIO relies on the scanner to capture and remove those expired objects or trailing DeleteMarker objects.

8.51 - mc admin replicate

Note

Changed: RELEASE.2023-01-11T03-14-16Z

Description

The mc admin replicate command creates and manages site replication for a set of MinIO peer sites.

Site replication mimics an active-active bucket replication, but for multiple MinIO deployments. Wherever a change occurs to IAM settings, buckets, or objects across the set of sites, the change replicates across all sites in the site replication group.

Where bucket replication manages the mirroring of particular buckets or objects from one location to another within a deployment or across deployments, site replication continuously mirrors an entire MinIO site to other sites.

mc admin replicate only supports site replication for distributed deployments when configuring site replication.

Only one deployment can have any data when initiating a new site replication configuration.

Site replication enforces bucket versioning on all buckets, including existing buckets and any buckets added after initiating site replication. Site replication fully synchronizes versioned objects, compared to mc mirror which operates only on the latest version of an object

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

The mc admin replicate command has the following subcommands:

Subcommand Description
mc admin replicate add Create a new site replication configuration or expand an existing configuration.
mc admin replicate info Returns information about site replication configuration.
mc admin replicate resync Resynchronizes content from one site to a second site if the second site has lost data.
mc admin replicate rm Removes an entire site replication configuration or one or more peer sites from participating in site replication.
mc admin replicate status Displays the status for replicable data across participating sites.
mc admin replicate update Modify the endpoint of the specified peer site in the site replication configuration.

Syntax

mc admin replicate add

mc-cmd

Create or expand a site replication configuration. The configuration uses asynchronous site replication by default, as MinIO recommends.

To enable synchronous site replication, create the replication using this command first. Then use mc admin replicate update --mode sync to update the configuration.

Consider a multi-site MinIO topology with three separate MinIO deployments using the following aliases: minio1, minio2, and minio3. All three sites have complete bidirectional network access and low latency between sites.

mc admin replicate add minio1 minio2 minio3

The following command expands an existing site replication that includes peer sites minio1, minio2, minio3, and minio4 to an additional peer site, minio5. minio5 contains no data. List all existing peer sites first. List the site to expand to last.

If any existing sites are unreachable, first remove the unreachable sites with mc admin replicate rm, then proceed with the site replication expansion.

mc admin replicate add minio1 minio2 minio3 minio4 minio5

The following command creates a new site replication configuration with ILM expiration rule synchronization between peer sites minio1, minio2, and minio3.

mc admin replicate add minio1 minio2 minio3 --replicate-ilm-expiry

The command has the following syntax:

mc [GLOBALFLAGS] admin replicate add      \
                            ALIAS1        \
                            ALIAS2        \
                            [ALIAS3 ...]  \
                            [--replicate-ilm-expiry]

ALIAS

mc-cmd

Required

The alias of a MinIO deployment to include in site replication.

At least two MinIO deployment aliases are required to create a site replication. Only the first alias can have buckets or objects. The first site can also be empty.

To expand an existing site replication to one more new replication sites, list all existing peer site aliases in the site replication set to expand. Then include one or more additional aliases to add to the existing site replication. The peers being added must be empty.

--replicate-ilm-expiry

mc-cmd

Optional

Note

Added: mc

RELEASE.2023-12-02T02-03-28Z

Replicate ILM expiration rules across peers.

mc admin replicate update

mc-cmd

Modifies the endpoint used for an existing peer site participating in site replication.

Note

Changed: RELEASE.2023-01-11T03-14-16Z

mc admin replicate edit renamed to mc admin replicate update.

mc admin replicate update                                                   \
                   minio2                                                 \
                   --deployment-id c1758167-4426-454f-9aae-5c3dfdf6df64   \
                   --endpoint https://minio2:9000

The command has the following syntax:

mc [GLOBALFLAGS] admin replicate update                     \
                            ALIAS                           \
                            --deployment-id [deploymentID]  \
                            --endpoint [newEndpoint]        \
                            --mode ["sync" | "async"]       \
                            --enable-ilm-expiry-replication \
                            --disable-ilm-expiry-replication

ALIAS

mc-cmd

Required

The alias of the MinIO deployment.

--bucket-bandwidth

mc-cmd

Set default bandwidth limit for bucket in bits per second.

Valid units include:

  • B for bytes
  • K for kilobytes
  • M for megabytes
  • G for gigabytes
  • T for terabytes
  • Ki for kibibytes
  • Mi for mibibytes
  • Gi for gibibytes
  • Ti for tebibytes

For example, the following command limits the replication on the myminio deployment to no more than 2 Gigabytes per second.

mc admin replicate update myminio --deployment-id c1758167-4426-454f-9aae-5c3dfdf6df64 --bucket-bandwidth "2G"

--deployment-id

mc-cmd

Required

The unique id of the deployment to change.

The deployment ID can be found by running mc admin replicate info ALIAS

--disable-ilm-expiry-replication

mc-cmd

Optional

Note

Added: mc

RELEASE.2023-12-02T02-03-28Z

Stops the replication of ILM expiration rules between peer sites. Existing rules already synchronized across peers are not removed from any peer site.

--enable-ilm-expiry-replication

mc-cmd

Optional

Note

Added: mc

RELEASE.2023-12-02T02-03-28Z

Start replication of ILM expiration rules between peer sites.

--endpoint

mc-cmd

Required

The new endpoint or URL to associate with the peer site.

--mode

mc-cmd

Optional

Specify whether MinIO performs replication operations to the peer synchronously or asynchronously. Available values are sync and async.

Defaults to async.

--sync

mc-cmd

Optional

Warning

Important

The --sync flag has been deprecated as of RELEASE.2023-07-07T05-25-51Z. Use --mode instead.

Enable or disable synchronous site replication. Available values are enable and disable. If not defined, MInIO uses asynchronous site replication.

mc admin replicate rm, remove

mc-cmd

Note

Changed: RELEASE.2023-01-11T03-14-16Z

The mc admin replicate remove subcommand renamed to mc admin replicate rm.

Removes one or more sites from a site replication configuration.

Remember, if you intend to re-add the site to a site replication configuration in the future, it must be empty of replicable data.

Remove site replication for all connected sites for an existing site replication configuration that includes minio2. This deletes the site replication configuration for all participating sites.

mc admin replicate rm      \
                   minio2  \
                   --all   \
                   --force

Remove the sites with alias names minio5 and minio6 from an existing site replication configuration that includes minio2

mc admin replicate rm      \
                   minio2  \
                   minio5  \
                   minio6  \
                   --force

The command has the following syntax:

mc [GLOBALFLAGS] admin rm          \
                       TARGET      \
                       ALIAS1      \
                       [ALIAS2...] \
                       --all       \
                       --force

TARGET

mc-cmd

Required

The alias of an active MinIO deployment participating in the site replication to target. Do not use an alias of a deployment to be removed, unless removing all sites from site replication.

ALIAS

mc-cmd

Optional

The alias of an active MinIO deployment to remove from a site replication configuration. May be repeated to remove additional sites.

--all

mc-cmd

Optional

Include this flag to remove all sites configured for site replication and end the site replication configuration.

--force

mc-cmd

Required

This flag forces the removal of the specified peer site(s) from the site replication configuration.

mc admin replicate info

mc-cmd

Returns information about the sites in the site replication configuration.

EXAMPLE
mc admin replicate info minio1
SYNTAX
mc [GLOBALFLAGS] admin replicate info ALIAS

ALIAS

mc-cmd

Required

The alias of an active MinIO deployment in the site replication configuration.

mc admin replicate status

mc-cmd

Displays the status of the sites, buckets, users, groups, or policies for a site replication configuration.

Display the overall replication status for a site replication configuration that includes the site minio1.

mc admin replicate status minio1

Display the replication status of buckets across sites for a site replication configuration that includes the site minio1.

mc admin replicate status     \
                   minio1     \
                   --buckets

Display the site replication status of a bucket called images across sites for a site replication configuration that contains the site minio1.

mc admin replicate status           \
                    minio1          \
                    --bucket images

Display the site replication status for the setting for a user, janedoe, across sites for a site replication configuration that contains the site minio1.

mc admin replicate status         \
                   minio1         \
                   --user janedoe

The output of the above examples resembles the following:

Bucket replication status:
●  30/30 Buckets in sync

Policy replication status:
●  5/5 Policies in sync

User replication status:
●  3/3 Users in sync

Group replication status:
No Groups present

ILM Expiry Rules replication status:
●  5/5 ILM Expiry Rules in sync

Object replication status:
Replication status since 1 day
Summary:
Replicated:    0 objects (0 B)
Queued:        - 0 objects, (0 B) (avg: 0 objects, 0 B; max: 0 objects, 0 B)
Received:      0 objects (0 B)

Display the site replication status across sites for the ILM expiration rule with rule ID of ckok9v5b4dtgofkbi6tg for a site replication configuration that contains the site minio1.

mc admin replicate status minio1 --ilm-expiry-rule ckok9v5b4dtgofkbi6tg

The output resembles the following:

●  ILM Expiry Rule replication summary for: ckok9v5b4dtgofkbi6tg

ILMExpiryRule   | MINIO1          | MINIO2
ILM Expiry Rule ||
mc [GLOBALFLAGS] admin replicate status          \
                   TARGET                        \
                   [--all]                       \
                   [--buckets]                   \
                   [--bucket nameOfBucket]       \
                   [--groups]                    \
                   [--group nameOfGroup]         \
                   [--ilm-expiry-rules]          \
                   [--ilm-expiry-rule <rule ID>] \
                   [--policies]                  \
                   [--policy nameOfPolicy]       \
                   [--users]                     \
                   [--user accessKey]

TARGET

mc-cmd

Required

The alias of an active MinIO deployment in the site replication configuration.

--all

mc-cmd

Optional

Display all available site replication status information.

--buckets

mc-cmd

Optional

Display the replication status of all buckets.

--bucket

mc-cmd

Optional

Display the replication status of a specific bucket by including the bucket name after the flag.

--groups

mc-cmd

Optional

Display the replication status of all groups.

--group

mc-cmd

Optional

Display the replication status of a specific group by including the group name after the flag.

--ilm-expiry-rules

mc-cmd

Optional

Note

Added: mc

RELEASE.2023-12-02T02-03-28Z

Display sync information about ILM expiration rules.

Mutually exclusive with --ilm-expiry-rule

--ilm-expiry-rule

mc-cmd

Optional

Note

Added: mc

RELEASE.2023-12-02T02-03-28Z

Display replication status information about the specified ILM expiration rule.

Mutually exclusive with --ilm-expiry-rules

--policies

mc-cmd

Optional

Display the replication status of all policies.

--policy

mc-cmd

Optional

Display the replication status of a specific policy by including the policy name after the flag.

--users

mc-cmd

Optional

Display the replication status of all users.

--user

mc-cmd

Optional

Display the replication status of a specific user by including the user name after the flag.

mc admin replicate resync

mc-cmd

Resynchronizes data from one site in the replication configuration to a second site in the replication configuration in the event of lost data.

The following command starts a resynchronization process to restore minio2 from minio1

mc admin replicate resync start minio1 minio2

The following command shows the status of a resynchronization currently in progress.

mc admin replicate resync status minio1 minio2

The following command stops a resynchronization that is in progress.

mc admin replicate resync cancel minio1 minio2
mc [GLOBALFLAGS] admin replicate resync start|status|cancel ALIAS1 ALIAS2
  • Replace ALIAS1 with the alias for the site that has the data to restore.
  • Replace ALIAS2 with the alias for the site that needs resynched data.

start

mc-cmd

Launches a new resynchronization process from one site with data to a second site that needs synchronization.

status

mc-cmd

Shows the status of an existing resynchronization process between two sites configured for site replication.

cancel

mc-cmd

Ends a resynchronization process currently in progress between two sites configured for site replication.

alias1

mc-cmd

The alias of an active MinIO deployment in the site replication configuration with the data you want to resync to another site.

alias2

mc-cmd

The alias of an active MinIO deployment in the site replication configuration that needs data resynced from another site.

Global Flags

This command supports any of the global flags.

8.52 - mc admin scanner

Description

The mc admin scanner commands provide information about the scanner process.

Subcommands

mc admin scanner includes the following subcommands:

Subcommand

Description

status

The mc admin scanner status command displays a real-time summary of scanner information for a MinIO Server.

trace

The mc admin scanner trace command displays scanner-specific API operations occurring on the target MinIO deployment.

8.53 - mc admin service

Description

The mc admin service command can restart or unfreeze MinIO servers.

mc admin service affects all MinIO servers in the target deployment at the same time. The command interrupts in-progress API operations on the MinIO deployment. Use caution when issuing this command to a deployment.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Examples

Restart MinIO Servers in Target Deployment

The following example uses the default myminio alias. The myminio alias points to a local minio server running on port 9000. See <installation instructions> for more information on installing and running a local minio server instance.

See mc alias for more information on aliases.

mc admin service restart myminio

Resume S3 Calls on a Target Deployment

The following example uses the default myminio alias. The myminio alias points to a local minio server running on port 9000. See <installation instructions> for more information on installing and running a local minio server instance.

See mc alias for more information on aliases.

mc admin service unfreeze myminio

Syntax

mc admin service has the following syntax:

mc admin service COMMAND [ARGUMENTS]

mc admin service supports the following commands:

restart

mc-cmd

Restarts MinIO servers. If needed, the command may suggest restarting the node based on the status.

mc admin service restart has the following syntax:

mc admin service restart ALIAS

Specify the alias of a configured MinIO deployment. restart restarts all MinIO servers in the deployment.

unfreeze

mc-cmd

Restart S3 API calls on a MinIO cluster.

mc admin service unfreeze has the following syntax:

mc admin service unfreeze ALIAS

Specify the alias of a configured MinIO deployment.

8.54 - mc admin trace

Description

The mc admin trace command displays API operations occurring on the target MinIO deployment.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Examples

Monitor All API operations

Use mc admin trace to monitor API operations on a MinIO deployment:

mc admin trace -a ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.

See Calls that Return 503 Errors

Use mc admin trace to monitor API operations that return a service unavailable 503 error:

mc admin trace -v --status-code 503 ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.

See Console Trace for a Path

Use mc admin trace to monitor activity for a specific path:

mc admin trace --path my-bucket/my-prefix/* ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace my-bucket/my-prefix/* with the bucket, prefix, and object name or wildcard you wish to trace.

See Console Trace for a Response Size Greater than 1Mb

Use mc admin trace to monitor responses over a specific size:

mc admin trace --filter-response --filter-size 1Mb ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.
  • Replace 1Mb with the desired response size.

See Console Trace for a Request Operation Durations Greater than 5ms

Use mc admin trace to monitor long operations:

mc admin trace --filter-duration --filter-size 5ms ALIAS
  • Replace ALIAS with the alias of the MinIO deployment.

Syntax

mc admin trace has the following syntax:

mc admin trace [FLAGS] TARGET

mc admin trace supports the following argument:

TARGET

mc-cmd

Specify the alias of a configured MinIO deployment for which to monitor API operations.

--all, a

mc-cmd

Returns all traffic on the MinIO deployment, including internode traffic between MinIO servers.

--call

mc-cmd

Traces only matching client operation or call types. For example, the following command only traces operations of the type scanner.

mc admin trace --call scanner TARGET

Valid call types include:

  • batch-keyrotation
  • batch-replication
  • bootstrap
  • decommission
  • ftp
  • healing
  • ilm
  • internal
  • os
  • rebalance
  • replication-resync
  • s3
  • scanner
  • storage

If not specified, MinIO returns call types of s3.

--errors, e

mc-cmd

Returns failed API operations only.

--filter-request

mc-cmd

Trace client operations or calls with request size greater than the specified --filter-size value.

Must be used with --filter-size flag.

--filter-response

mc-cmd

Trace client operations or calls with response size greater than the specified --filter-size value.

Must be used with --filter-size flag.

--filter-size

mc-cmd

Size limit of a filtered client operation or call.

Must be used with either --filter-request or --filter-response flag.

Valid units include:

Suffix Unit Size
k KB (Kilobyte, 1000 Bytes)
m MB (Megabyte, 1000 Kilobytes)
g GB (Gigabyte, 1000 Megabytes)
t TB (Terrabyte, 1000 Gigabytes)
ki KiB (Kibibyte, 1024 Bites)
mi MiB (Mebibyte, 1024 Kibibytes)
gi GiB (Gibibyte, 1024 Mebibytes)
ti TiB (Tebibyte, 1024 Gibibytes)

--funcname

mc-cmd

Returns calls for the entered function name.

--method

mc-cmd

Returns call of the specified HTTP method.

--node

mc-cmd

Returns calls for the specified server.

--path

mc-cmd

Returns calls for the specified path.

--request-header

mc-cmd

Returns calls matching the supplied request header.

--request-query

mc-cmd

Returns calls matching the supplied request query parameter. This debug option should only be used at the direction of MinIO Support.

--response-duration

mc-cmd

Trace calls with response duration greater than the specified value.

--response-threshold

mc-cmd

Takes a time string as a value, such as 5ms. Returns only calls with a response time greater than the supplied threshold.

If not specified, MinIO returns calls with a response time greater than 5ms.

--status-code

mc-cmd

Returns calls of the specified HTTP status code.

--stats

mc-cmd

Accumulates aggregated statistics for each traced function call during the current trace session.

The output table includes the following columns.

Call

The name of the captured client operation or function.

Count

The number of times the client operation or call occurred.

RPM

The Rate Per Minute (RPM) of the client operation or call.

Avg Time

The average time required for the client operation or call to complete.

Min Time

The minimum time spent for the client operation or call to complete.

Max Time

The maximum time spent for the client operation or call to complete.

Avg TTFB

The average Time To First Byte (TTFB) for the client operation or call response.

Max TTFB

The maximum Time To First Byte for the client operation or call response.

Avg Size

Average size of client operation or call responses.

Errors

The number of client operations or calls that failed with an error.

RX Avg

The average number of Bytes Received (RX) for the client operation or call. This stat only displays if not zero (0).

TX AVG

The average number of Bytes Sent (TX) for the client operation or call. This stat only displays if not zero (0).

Accumulate stats, such as name, count, duration, min time, max time, time to first byte, or errors. Accumulates up to 15 stat entries.

--verbose

mc-cmd

Returns verbose output.

Global Flags

This command supports any of the global flags.

8.55 - mc admin update

Description

The mc admin update command invokes the MinIO-compatible server-side in-place update API. The client can pass an optional release mirror URL, and the server distributes the selected binary to all nodes.

After running the command, a prompt displays to confirm the update. Type y and [ENTER] to confirm and proceed with the update.

The user must have write permissions for the target location where the binary installs.

Caution

Do not use the default update path on Silo

As of 2026-08-05, the latest published Silo server (RELEASE.2026-08-04T00-00-00Z) still resolves an omitted MIRROR_URL through the upstream dl.min.io release feed and retains the upstream MinIO signing key. Running mc admin update ALIAS against an update-enabled Silo server can therefore replace Silo with an upstream MinIO binary.

Set MINIO_UPDATE=off on Silo servers and upgrade through Download & Install, a trusted package repository, or a manually verified Silo artifact. This page retains the command contract for compatibility; it is not the recommended Silo upgrade procedure.

Note

Use mc admin on Silo or compatible MinIO deployments only

mc admin uses MinIO-specific administration APIs. General S3 API compatibility alone does not imply that another object store supports these commands.

Considerations

Coordinated Restart

mc admin update updates the binary and restarts all servers in the deployment simultaneously. Applications should expect a temporary loss of availability and retry failed or interrupted requests; atomic object operations do not make a full-cluster restart invisible.

Use a coordinated upgrade-and-restart procedure. Do not perform a rolling (one node at a time) binary replacement unless the release documentation explicitly states that mixed versions are supported.

Permissions

The user running the command must have write permissions to the target path where the MinIO Server binary installs.

Examples

The inherited default form below is shown only to identify the command contract. Do not run it against Silo, because omitting MIRROR_URL selects the upstream MinIO update feed:

mc admin update ALIAS

Replace ALIAS with the alias of the target deployment.

After running the command, answer yes to the prompt to confirm and process the update.

Syntax

mc admin update has the following syntax:

mc admin update ALIAS         \
                [MIRROR_URL]  \
                [--yes]

mc admin update supports the following arguments:

ALIAS

mc-cmd

The alias of the MinIO deployment to update.

If the specified ALIAS corresponds to a distributed MinIO deployment, mc admin update updates all MinIO servers in the deployment at the same time.

Use mc alias list to review the configured aliases and their corresponding MinIO deployment endpoints.

MIRROR_URL

mc-cmd

The release-manifest URL used by the target server to locate the minio binary. Supplying a URL does not make an artifact trusted; verify the complete update and signature contract before using this compatibility path. Silo operators should prefer the documented package or manual upgrade procedure.

--yes, -y

mc-cmd

Optional

Pass this flag to confirm the update and bypass the confirmation prompt.

Behavior

Binary Compression

Note

Changed: RELEASE.2024-01-28T22-35-53Z

mc admin update compresses the binary before sending to all nodes in the deployment.

This feature does not apply to systemctl managed deployments.

8.56 - mc admin user

Description

The mc admin user command and its subcommands manage MinIO users.

Clients must authenticate to the MinIO deployment with the access key and secret key associated to a user on the deployment. MinIO users constitute a key component in MinIO Identity and Access Management.

To manage users who authenticate using a 3rd party IDP, use the command for the appropriate provider:

Note

Use mc idp commands on MinIO Deployments Only

mc idp ldap and mc idp openid and their subcommands are only supported against MinIO deployments.

Subcommands

mc admin user includes the following subcommands:

Subcommand

Description

add

The mc admin user add command adds a new MinIO user to the target MinIO deployment.

disable

The mc admin user disable command disables a MinIO user on the target MinIO deployment.

enable

The mc admin user enable command enables a MinIO user on the target MinIO deployment.

info

The mc admin user info command returns detailed information of a MinIO user on the target MinIO deployment.

ls

The mc admin user ls command lists all MinIO users on the target MinIO deployment.

rm

The mc admin user rm command removes a MinIO user on the target MinIO deployment.

sts info

The mc admin user sts info command retrieves information on the specified STS credential, such as the parent MinIO user who generated the credentials, associated policies, and expiration.

svcacct

The mc admin user svcacct command and its subcommands create and manage Access Keys on a MinIO deployment.

As of MinIO Client RELEASE.2024-10-08T09-37-26Z, these commands have been replaced by mc admin accesskey and mc idp ldap accesskey. This command and its subcommands will be deprecated in a future MinIO Client release.

9 - mc ilm export

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm export replaced by mc ilm rule export.

Syntax

The mc ilm export command exports the object lifecycle management configuration for a MinIO bucket.

The mc ilm export command outputs to STDOUT by default. You can output the contents to a .json file for archival or ingestion using mc ilm import.

The following command exports the lifecycle management configuration of the mydata bucket on the myminio deployment to the mydata-lifecycle-config.json file:

mc ilm export myminio/mydata > mydata-lifecycle-config.json

The command has the following syntax:

mc [GLOBALFLAGS] ilm export ALIAS > STDOUT
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The alias and full path to the bucket on the MinIO deployment for which to export object lifecycle management rules. For example:

mc ilm export myminio/mydata > bucket-lifecycle.json

Global Flags

This command supports any of the global flags.

Examples

Export the Bucket Lifecycle Management Configuration

The following command exports the bucket lifecycle management configuration to the bucket-lifecycle.json file:

mc ilm export myminio/mybucket > bucket-lifecycle.json
mc ilm export ALIAS > file.json
  • Replace ALIAS with the alias of the MinIO deployment and the bucket for which to export object lifecycle management rules:

    myminio/mydata

  • Replace file.json with the name of the file to which to export the lifecycle management rules.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

10 - mc quota set

Note

Changed: RELEASE.2022-12-13T00-23-28Z

mc quota set replaced mc admin bucket quota --hard.

Note

Changed: RELEASE.2024-07-31T15-58-33Z

mc quota set is deprecated.

Description

The mc quota set assigns a hard quota limit to a bucket beyond which MinIO does not allow writes.

Units of Measurement

The mc quota set --size flag accepts the following case-insensitive suffixes to represent the unit of the specified size value:

Suffix Unit Size
k KB (Kilobyte, 1000 Bytes)
m MB (Megabyte, 1000 Kilobytes)
g GB (Gigabyte, 1000 Megabytes)
t TB (Terabyte, 1000 Gigabytes)
ki or kib KiB (Kibibyte, 1024 Bites)
mi or mib MiB (Mebibyte, 1024 Kibibytes)
gi or gib GiB (Gibibyte, 1024 Mebibytes)
ti or tib TiB (Tebibyte, 1024 Gibibytes)

Omitting a suffix defaults to bytes.

Examples

Configure a Hard Quota on a Bucket

Use mc quota set with the --size flag to specify a hard quota on a bucket. Hard quotas prevent the bucket size from growing past the specified limit.

mc quota set TARGET/BUCKET --size LIMIT
  • Replace TARGET with the alias of a configured MinIO deployment. Replace BUCKET with the name of the bucket on which to set the hard quota.
  • Replace LIMIT with the maximum size to which the bucket can grow as an integer and, as desired, a suffix. For example, to set a hard limit of 10 Terabytes, specify 10t.

Syntax

mc quota set has the following syntax:

mc quota set TARGET --size LIMIT

mc quota set supports the following arguments:

TARGET

mc-cmd

Required

The full path to the bucket for which the command creates the quota. Specify the alias of the MinIO deployment as a prefix to the path. For example:

mc quota set play/mybucket --size 10Gi

--size

mc-cmd

Required

Sets a maximum limit to the bucket storage size. The MinIO server rejects any incoming PUT request whose contents would exceed the bucket’s configured quota.

For example, a hard limit of 10G would prevent adding any additional objects if the bucket reaches 10 gigabytes of size.

Global Flags

This command supports any of the global flags.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

11 - Operator Helm Charts

The archived MinIO Operator project published an Operator Chart and Tenant Chart. This page documents its final v7.1.1 Operator Chart.

The following page documents the values.yaml chart for the MinIO Operator. For documentation on the chart for a MinIO Tenant, see Tenant Helm Charts

Warning

The upstream MinIO Operator repository was archived on March 20, 2026. Treat these values as a frozen v7.1.1 reference snapshot, not as evidence of ongoing upstream maintenance or support.

MinIO Operator Chart

operator

Root key for Operator Helm Chart

env

An array of environment variables to pass to the Operator deployment. Pass an empty array to start Operator with defaults.

For example:

env:
- name: CLUSTER_DOMAIN
  value: "cluster.domain"
- name: WATCHED_NAMESPACE
  value: ""
- name: MINIO_OPERATOR_RUNTIME
  value: "OpenShift"

See Operator environment variables for a list of all supported values.

image

Specify the Operator container image to use for the deployment. image.tag For example, the following sets the image to the quay.io/minio/operator repo and the v7.1.1 tag. The container pulls the image if not already present:

image:
  repository: quay.io/minio/operator
  tag: v7.1.1
  pullPolicy: IfNotPresent

The chart also supports specifying an image based on digest value:

image:
  repository: quay.io/minio/operator@sha256
  digest: 28c80b379c75242c6fe793dfbf212f43c602140a0de5ebe3d9c2a3a7b9f9f983
  pullPolicy: IfNotPresent

sidecarImage

Specify the sidecar container image to deploy on tenant pods for init container and sidecar. Only need to change this if want to use a different version that the default, or want to set a custom registry. sidecarImage.tag For example, the following sets the image to the quay.io/minio/operator-sidecar repo and the v7.1.1 tag. The container pulls the image if not already present:

sidecarImage:
  repository: quay.io/minio/operator-sidecar
  tag: v7.1.1
  pullPolicy: IfNotPresent

The chart also supports specifying an image based on digest value:

sidecarImage:
  repository: quay.io/minio/operator-sidecar@sha256
  digest: a11947a230b80fb1b0bffa97173147a505d4f1207958f722e348d11ab9e972c1
  pullPolicy: IfNotPresent

imagePullSecrets

An array of Kubernetes secrets to use for pulling images from a private image.repository. Only one array element is supported at this time.

runtimeClassName

The name of a custom Container Runtime to use for the Operator pods.

initContainers

An array of initContainers to start up before the Operator pods. Exercise care as initContainer failures prevent Operator pods from starting. Pass an empty array to start the Operator normally.

replicaCount

The number of Operator pods to deploy. Higher values increase availability in the event of worker node failures.

The cluster must have sufficient number of available worker nodes to fulfill the request. Operator pods deploy with pod anti-affinity by default, preventing Kubernetes from scheduling multiple pods onto a single Worker node.

securityContext

The Kubernetes SecurityContext to use for deploying Operator resources.

You may need to modify these values to meet your cluster’s security and access settings.

containerSecurityContext

The Kubernetes SecurityContext to use for deploying Operator containers. You may need to modify these values to meet your cluster’s security and access settings.

volumes

An array of Volumes which the Operator can mount to pods.

The volumes must exist and be accessible to the Operator pods.

volumeMounts

An array of volume mount points associated to each Operator container.

Specify each item in the array as follows:

volumeMounts:
- name: volumename
  mountPath: /path/to/mount

The name field must correspond to an entry in the volumes array.

nodeSelector

Any Node Selectors to apply to Operator pods.

The Kubernetes scheduler uses these selectors to determine which worker nodes onto which it can deploy Operator pods.

If no worker nodes match the specified selectors, the Operator deployment will fail.

priorityClassName

The Pod Priority to assign to Operator pods.

affinity

The affinity or anti-affinity settings to apply to Operator pods.

These settings determine the distribution of pods across worker nodes and can help prevent or allow colocating pods onto the same worker nodes.

tolerations

An array of Toleration labels to associate to Operator pods.

These settings determine the distribution of pods across worker nodes.

topologySpreadConstraints

An array of Topology Spread Constraints to associate to Operator pods.

These settings determine the distribution of pods across worker nodes.

resources

The Requests or Limits for resources to associate to Operator pods.

These settings can control the minimum and maximum resources requested for each pod. If no worker nodes can meet the specified requests, the Operator may fail to deploy.

###
# Root key for Operator Helm Chart
operator:
  ###
  # An array of environment variables to pass to the Operator deployment.
  # Pass an empty array to start Operator with defaults.
  #
  # For example:
  #
  # .. code-block:: yaml
  #
  #    env:
  #    - name: CLUSTER_DOMAIN
  #      value: "cluster.domain"
  #    - name: WATCHED_NAMESPACE
  #      value: ""
  #    - name: MINIO_OPERATOR_RUNTIME
  #      value: "OpenShift"
  #
  # See `Operator environment variables <https://github.com/minio/operator/blob/v7.1.1/docs/env-variables.md>`__ for a list of all supported values.
  env:
    - name: OPERATOR_STS_ENABLED
      value: "on"
  # An array of additional annotations to be applied to the operator service account
  serviceAccountAnnotations: []
  # additional labels to be applied to operator resources
  additionalLabels: {}
  ###
  # Specify the Operator container image to use for the deployment.
  # ``image.tag``
  # For example, the following sets the image to the ``quay.io/minio/operator`` repo and the v7.1.1 tag.
  # The container pulls the image if not already present:
  #
  # .. code-block:: yaml
  #
  #    image:
  #      repository: quay.io/minio/operator
  #      tag: v7.1.1
  #      pullPolicy: IfNotPresent
  #
  # The chart also supports specifying an image based on digest value:
  #
  # .. code-block:: yaml
  #
  #    image:
  #      repository: quay.io/minio/operator@sha256
  #      digest: 28c80b379c75242c6fe793dfbf212f43c602140a0de5ebe3d9c2a3a7b9f9f983
  #      pullPolicy: IfNotPresent
  #
  image:
    repository: quay.io/minio/operator
    tag: v7.1.1
    pullPolicy: IfNotPresent
  ###
  # Specify the sidecar container image to deploy on tenant pods for init container and sidecar.
  # Only need to change this if want to use a different version that the default, or want to set a custom registry.
  # ``sidecarImage.tag``
  # For example, the following sets the image to the ``quay.io/minio/operator-sidecar`` repo and the v7.1.1 tag.
  # The container pulls the image if not already present:
  #
  # .. code-block:: yaml
  #
  #    sidecarImage:
  #      repository: quay.io/minio/operator-sidecar
  #      tag: v7.1.1
  #      pullPolicy: IfNotPresent
  #
  # The chart also supports specifying an image based on digest value:
  #
  # .. code-block:: yaml
  #
  #    sidecarImage:
  #      repository: quay.io/minio/operator-sidecar@sha256
  #      digest: a11947a230b80fb1b0bffa97173147a505d4f1207958f722e348d11ab9e972c1
  #      pullPolicy: IfNotPresent
  #
  sidecarImage: {}
  ###
  #
  # An array of Kubernetes secrets to use for pulling images from a private ``image.repository``.
  # Only one array element is supported at this time.
  imagePullSecrets: [ ]
  ###
  #
  # The name of a custom `Container Runtime <https://kubernetes.io/docs/concepts/containers/runtime-class/>`__ to use for the Operator pods.
  runtimeClassName: ~
  ###
  # An array of `initContainers <https://kubernetes.io/docs/concepts/workloads/pods/init-containers/>`__ to start up before the Operator pods.
  # Exercise care as ``initContainer`` failures prevent Operator pods from starting.
  # Pass an empty array to start the Operator normally.
  initContainers: [ ]
  ###
  # The number of Operator pods to deploy.
  # Higher values increase availability in the event of worker node failures.
  #
  # The cluster must have sufficient number of available worker nodes to fulfill the request.
  # Operator pods deploy with pod anti-affinity by default, preventing Kubernetes from scheduling multiple pods onto a single Worker node.
  replicaCount: 2
  ###
  # The Kubernetes `SecurityContext <https://kubernetes.io/docs/tasks/configure-pod-container/security-context/>`__ to use for deploying Operator resources.
  #
  # You may need to modify these values to meet your cluster's security and access settings.
  securityContext:
    runAsUser: 1000
    runAsGroup: 1000
    runAsNonRoot: true
    fsGroup: 1000
  ###
  # The Kubernetes `SecurityContext <https://kubernetes.io/docs/tasks/configure-pod-container/security-context/>`__ to use for deploying Operator containers.
  # You may need to modify these values to meet your cluster's security and access settings.
  containerSecurityContext:
    runAsUser: 1000
    runAsGroup: 1000
    runAsNonRoot: true
    allowPrivilegeEscalation: false
    capabilities:
      drop:
        - ALL
    seccompProfile:
      type: RuntimeDefault
  ###
  # An array of `Volumes <https://kubernetes.io/docs/concepts/storage/volumes/>`__ which the Operator can mount to pods.
  #
  # The volumes must exist *and* be accessible to the Operator pods.
  volumes: [ ]
  ###
  # An array of volume mount points associated to each Operator container.
  #
  # Specify each item in the array as follows:
  #
  # .. code-block:: yaml
  #
  #    volumeMounts:
  #    - name: volumename
  #      mountPath: /path/to/mount
  #
  # The ``name`` field must correspond to an entry in the ``volumes`` array.
  volumeMounts: [ ]
  ###
  # Any `Node Selectors <https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/>`__ to apply to Operator pods.
  #
  # The Kubernetes scheduler uses these selectors to determine which worker nodes onto which it can deploy Operator pods.
  #
  # If no worker nodes match the specified selectors, the Operator deployment will fail.
  nodeSelector: { }
  ###
  #
  # The `Pod Priority <https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/>`__ to assign to Operator pods.
  priorityClassName: ""
  ###
  #
  # The `affinity <https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/>`__ or anti-affinity settings to apply to Operator pods.
  #
  # These settings determine the distribution of pods across worker nodes and can help prevent or allow colocating pods onto the same worker nodes.
  affinity:
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        - labelSelector:
            matchExpressions:
              - key: name
                operator: In
                values:
                  - minio-operator
          topologyKey: kubernetes.io/hostname
  ###
  #
  # An array of `Toleration labels <https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/>`__ to associate to Operator pods.
  #
  # These settings determine the distribution of pods across worker nodes.
  tolerations: [ ]
  ###
  #
  # An array of `Topology Spread Constraints <https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/>`__ to associate to Operator pods.
  #
  # These settings determine the distribution of pods across worker nodes.
  topologySpreadConstraints: [ ]
  ###
  #
  # The `Requests or Limits <https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/>`__ for resources to associate to Operator pods.
  #
  # These settings can control the minimum and maximum resources requested for each pod.
  # If no worker nodes can meet the specified requests, the Operator may fail to deploy.
  resources:
    requests:
      cpu: 200m
      memory: 256Mi
      ephemeral-storage: 500Mi

12 - Silo Server (minio)

Silo Server

The minio server command starts the Silo server process. The executable and subcommand names remain minio server as a compatibility contract:

minio server /mnt/disk{1...4}

For examples of deploying minio server on a bare metal environment, see Installation and Management.

For examples of deploying minio server on Kubernetes, see Deploying a Silo Tenant.

Syntax

Starts the minio server process.

The command has the following syntax:

minio server [FLAGS] HOSTNAME/DIRECTORIES [HOSTNAME/DIRECTORIES..]

The command accepts the following arguments:

HOSTNAME

mc-cmd

The hostname of a minio server process.

For standalone deployments, this field is optional. You can start a standalone server process with only the DIRECTORIES argument.

For distributed deployments, specify the hostname of each minio server in the deployment. The group of minio server processes represent a single Server Pool.

HOSTNAME supports expansion notation {x...y} to denote a sequential series of hostnames. Silo requires sequential hostnames to identify each minio server process in the set.

For example, https://minio{1...4}.example.net expands to:

  • https://minio1.example.net
  • https://minio2.example.net
  • https://minio3.example.net
  • https://minio4.example.net

You must run the minio server command with the same combination of HOSTNAME and DIRECTORIES on each host in the Server Pool.

Each additional HOSTNAME/DIRECTORIES pair denotes an additional Server Set for horizontal expansion of the Silo deployment. For more information on Server Pools, see Server Pool.

DIRECTORIES

mc-cmd

Required

The directories or drives the minio server process uses as the storage backend.

DIRECTORIES supports expansion notation {x...y} to denote a sequential series of folders or drives. For example, /mnt/disk{1...4} expands to:

  • /mnt/disk1
  • /mnt/disk2
  • /mnt/disk3
  • /mnt/disk4

The DIRECTORIES path(s) must be empty when first starting the minio process.

The minio server process requires at least 4 drives or directories to enable erasure coding.

Warning

Important

Silo recommends locally attached drives, where the DIRECTORIES path points to each drive on the host machine. Avoid network-attached storage for primary object data unless the complete stack has been validated, because network latency and failure semantics differ from locally attached storage.

For development or evaluation, you can specify multiple logical directories or partitions on a single physical volume to enable erasure coding on the deployment.

For production environments, do not treat multiple logical directories or partitions on one physical disk as independent failure domains. The apparent drive count does not provide physical-disk redundancy.

--address

mc-cmd

Optional

Binds the minio server process to a specific network address and port number. Specify the address and port as ADDRESS:PORT, where ADDRESS is an IP address or hostname and PORT is a valid and open port on the host system. MinIO supports both IPv4 and IPv6 addressing, provided that the specified addresses are routable and resolveable.

To change the port number for all IP addresses or hostnames configured on the host machine, specify only :PORT where PORT is a valid and open port on the host.

Note

Changed: RELEASE.2023-01-02T09-40-09Z

You can configure your hosts file to have MinIO only listen on specific IPs. For example, if the machine’s /etc/hosts file contains the following:

127.0.1.1       minioip
127.0.1.2       minioip

A command like the following would listen for API calls on port 9000 on both configured IP addresses.

minio server --address "minioip:9000" ~/miniodirectory

If omitted, minio binds to port 9000 on all configured IPv4 addresses, IPv6 addresses, and hostnames on the host machine.

--console-address

mc-cmd

Optional

Specifies a static port for the embedded MinIO Console.

Omit to direct MinIO to generate a dynamic port at server startup. The MinIO server outputs the port to the system log.

--ftp

mc-cmd

Optional

Enable and configure a File Transfer Protocol (FTP) or File Transfer Protocol over SSL/TLS (FTPS) server. Use this flag multiple times to specify an address port, a passive port range of addresses, or a TLS certificate and key as key-value pairs.

Valid keys:

  • address, which takes a single port to use for the server, typically 8021

  • (Optional) passive-port-range, which restricts the range of potential ports the server can use to transfer data, such as when tight firewall rules limit the port the FTP server can request for the connection

  • (Optional) tls-private-key, which takes the path to the user’s private key for accessing the MinIO deployment by TLS

    Use with tls-public-cert.

  • (Optional) tls-public-cert, which takes the path to the certificate for accessing the MinIO deployment by TLS

    Use with tls-private-key.

For MinIO deployments with TLS enabled, omit tls-private-key and tls-public-key to direct MinIO to use the default TLS keys for the MinIO deployment. See Network Encryption (TLS) for more information. You only need to specify a certificate and private key to a different set of TLS certificate and key than the MinIO default (for example, to use a different domain).

For example:

minio server http://server{1...4}/disk{1...4} \
--ftp="address=:8021"                         \
--ftp="passive-port-range=30000-40000"        \
--ftp="tls-private-key=path/to/private.key"   \
--ftp="tls-public-cert=path/to/public.crt"    \
...
--sftp

mc-cmd

Optional

Enable and configure a SSH File Transfer Protocol (SFTP) server. Use multiple times to specify each desired key-value pair.

The following table lists valid keys.

Key

Description

Valid values

address

Port to use for connecting to SFTP.

Any valid port number, typically 8022.

ssh-private-key

Path to the user’s private key file.

Absolute path or relative path from current location to the key file to use.

trusted-user-ca-key

Specifies a file containing public key of a certificate authority that is trusted to sign user certificates for authentication. The file must contain a user principals list, and the list must include the user(s) that can authenticate with the key.

Absolute path or relative path from current location to the user’s trusted certificate authority public key file.

pub-key-algos

Comma-separated list of the public key algorithms to support.

ssh-ed25519
[email protected]
[email protected]
ecdsa-sha2-nistp256
ecdsa-sha2-nistp384
ecdsa-sha2-nistp521
rsa-sha2-256
rsa-sha2-512
ssh-rsa
ssh-dss

kex-algos

Comma-separated list in priority order of the key-exchange algorithms to support.

curve25519-sha256
[email protected]
ecdh-sha2-nistp256
ecdh-sha2-nistp384
ecdh-sha2-nistp521
diffie-hellman-group14-sha256
diffie-hellman-group16-sha512
diffie-hellman-group14-sha1
diffie-hellman-group1-sha1

cipher-algos

Comma-separated list of cipher algorithms to support

aes128-ctr
aes192-ctr
aes256-ctr
[email protected]
[email protected]
[email protected]
arcfour256
arcfour128
arcfour
aes128-cbc
3des-cbc

mac-algos

Comma-separated list in preference order of MAC algorithms to support. Based on RFC 4253 section 6.4 with the exception of hmac-md5 variants, which are end of life.

[email protected]
[email protected]
hmac-sha2-256
hmac-sha2-512
hmac-sha1
hmac-sha1-96

disable-password-auth

Disable password authentication.

true

For example:

minio server http://server{1...4}/disk{1...4}                                 \
--sftp="address=:8022" --sftp="ssh-private-key=/home/miniouser/.ssh/id_rsa"   \
--sftp="kex-algos=diffie-hellman-group14-sha256,[email protected]" \
...
--certs-dir, -S

mc-cmd

Optional

Specifies the path to the folder containing certificates the minio process uses for configuring TLS/SSL connectivity.

The contents of the specified folder must follow that of the default path structure. For example, the path contents of --certs-dir /etc/minio should resemble the following:

/etc/minio
  private.key
  public.crt
  domain.tld/
    private.key
    public.crt
  CAs/
    full-chain-ca.crt

Omit to use the default directory paths:

  • Linux/macOS: ${HOME}/.minio/certs
  • Windows: %%USERPROFILE%%\.minio\certs.

See Network Encryption (TLS) for more information on TLS/SSL connectivity.

Warning

Important

MinIO Server RELEASE.2023-12-09T18-17-51Z removes the deprecated --config-dir | -C parameter. Deployments using this flag may start without TLS enabled. Replace those parameters with --certs-dir | -S and restart to re-enable TLS.

--quiet

mc-cmd

Optional

Disables startup information.

--anonymous

mc-cmd

Optional

Hides sensitive information from logging.

--json

mc-cmd

Optional

Outputs server logs and startup information in JSON format.

Note

Note

You can define any of the minio parameters above by setting them in the MINIO_OPTS environment variable. This variable takes as its value a single string that contains any of the above parameters and their values that you want to set when starting the MinIO Server.

Settings

You can perform other customizations to the MinIO Server process by defining additional Configuration Values or Environment Variables.

Many configuration values and environment variables define the same value. If you set both a configuration value and the matching environment variable, MinIO uses the value from the environment variable.

12.1 - Settings Overview

The minio server process stores its configuration in the storage backend directory.

MinIO Settings

MinIO settings define runtime behavior of the MinIO server process.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Additional settings include those to customize:

12.1.1 - Core Settings

This page covers settings that control core behavior of the MinIO process.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

MinIO Server CLI Options

MINIO_OPTS

envvar

There is no configuration setting for this variable, as these settings apply at server startup.

Optional

Set a string of parameters to use when starting the MinIO Server.

For Unix-like systems using the recommended MinIO systemd service, use the /etc/default/minio file and create an environment variable MINIO_OPTS for specifying parameters to append to the minio systemd process:

# Editing /etc/default/minio

MINIO_OPTS=' --console-address=":9001" --ftp="address=:8021" --ftp="passive-port-range=30000-40000" '

For systems running minio on the command line, MINIO_OPTS is optional. To use it, declare the environment variable using standard shell semantics, then reference the environment variable when starting up the MinIO Server:

export MINIO_OPTS=' --console-address=":9001" --ftp="address=:8021" --ftp="passive-port-range=30000-40000" '

minio server $MINIO_OPTS ...

# The above is equivalent to running the following:
# minio server --console-address=":9001" \
#              --ftp="address=:8021"     \
#              --ftp="passive-port-range=30000-40000"
Warning

Important

The minio server command does not read $MINIO_OPTS directly. The variable only functions if used as described above.

Storage Volumes

MINIO_VOLUMES

envvar

The directories or drives the minio server process uses as the storage backend.

Functionally equivalent to setting minio server DIRECTORIES. Use this value when configuring MinIO to run using an environment file.

This setting does not have a configuration setting option.

Environment Variable File Path

MINIO_CONFIG_ENV_FILE

envvar

Specifies the full path to the file the MinIO server process uses for loading environment variables.

For systemd-managed files, set this value to the path of the environment file (/etc/default/minio) to direct MinIO to reload changes to that file when using mc admin service restart to restart the deployment.

This setting does not have a configuration setting option.

Workers for Expiration

MINIO_ILM_EXPIRY_WORKERS

envvar

Specifies the number of workers to make available to expire objects configured with ILM rules for expiration. When not set, MinIO defaults to using up to half of the available processing cores available.

This setting does not have a configuration setting option.

Domain

MINIO_DOMAIN

envvar

Enables Virtual Host-style requests to the MinIO deployment. Set the value to the Fully Qualified Domain Name (FQDN) for MinIO to accept incoming virtual host requests.

Omitting this setting directs MinIO to only accept the default path-style requests.

For example, consider a MinIO deployment with an assigned FQDN of minio.example.net.

  • With path-style lookups, applications can access the bucket using its full path as minio.example.net/mybucket.
  • With virtual-host lookups, application can access the bucket as a virtual host as mybucket.minio.example.net/.
Warning

Important

If you configure MINIO_DOMAIN, you must consider all subdomains of the specified FQDN as exclusively assigned for use as bucket names. Any MinIO services which conflict with those domains, such as replication targets, may exhibit unexpected or undesired behavior as a result of the collision.

For example, if setting MINIO_DOMAIN=minio.example.net, you cannot assign any subdomains of minio.example.net (in the form of *.minio.example.net) to any MinIO service or target. This includes hostnames for use with bucket, batch, or site replication.

This setting does not have a configuration setting option.

Scanner Speed

MINIO_SCANNER_SPEED

envvar

scanner speed

mc-conf

Manage the maximum wait period for the scanner when balancing MinIO read/write performance to scanner processes.

MinIO utilizes the scanner for bucket replication, site replication, lifecycle management, and healing tasks.

Valid values include:

fastest

Removes scanner wait on read/write latency, allowing the scanner to operate at full-speed and IOPS consumption. This setting may result in reduced read and write performance.

fast

Sets a short scanner wait time on read/write latency, allowing the scanner to operate at a higher speed and IOPS consumption. This setting may result in reduced read and write performance.

default

Sets a moderate scanner wait time on read/write latency, allowing the scanner to operate at a balanced speed and IOPS consumption. This setting seeks to maintain read and write performance while allowing ongoing scanner activity.

slow

Sets a medium scanner wait time on read/write latency, where the scanner operates at a reduced speed and IOPS consumption. This setting allows better read and write performance while reducing scanner performance.

May impact scanner-dependent features, such as lifecycle management and replication.

slowest

Sets a large scanner wait time on read/write latency, where the scanner operates at a substantially lower speed and IOPS consumption. This setting prioritizes read and write operations at the potential cost of scanner operations.

May impact scanner-dependent features, such as lifecycle management and replication.

Batch Replication

This setting does not have a configuration setting option.

Data Compression

The following section documents settings for enabling data compression for objects. See Data Compression for tutorials on using these configuration settings.

All of the settings in this section fall under the following top-level key:

compression

mc-conf

Enable Compression

MINIO_COMPRESSION_ENABLE

envvar

compression enable

mc-conf

Optional

Set to on to enable data compression for new objects. Defaults to off.

Enabling or disabling data compression does not change existing objects.

Allow Encryption

MINIO_COMPRESSION_ALLOW_ENCRYPTION

envvar

compression allow_encryption

mc-conf

Optional

Set to on to encrypt objects after compressing them. Defaults to off.

Note

Encrypting compressed objects may compromise security

MinIO strongly recommends against encrypting compressed objects. If you require encryption, carefully evaluate the risk of potentially leaking information about the contents of encrypted objects.

Compression Extensions

MINIO_COMPRESSION_EXTENSIONS

envvar

compression extensions

mc-conf

Optional

Comma-separated list of the file extensions to compress. Setting a new list of file extensions replaces the previously configured list. Defaults to ".txt, .log, .csv, .json, .tar, .xml, .bin".

Note

Changed: RELEASE.2024-03-15T01-07-19Z

Specify "*" to direct MinIO to compress all supported file types.

MinIO does not support compressing file types on the Excluded File Types list, even if explicitly specified in this argument.

Compression MIME Types

MINIO_COMPRESSION_MIME_TYPES

envvar

compression mime_types

mc-conf

Optional

Comma-separated list of the MIME types to compress. Setting a new list of types replaces the previously configured list. Defaults to "text/*, application/json, application/xml, binary/octet-stream".

Note

Default excluded files

Some types of files cannot be significantly reduced in size. MinIO will not compress these, even if specified in an mime_types argument. See Excluded types for details.

Comments

This setting does not have an environment variable option. Use the configuration setting instead.

compression comment

envvar

Optional

Specify a comment to associate with the data compression configuration.

Erasure Stripe Size

MINIO_ERASURE_SET_DRIVE_COUNT

envvar

This setting does not have a configuration setting option.

Optional

The erasure set size to apply for all drives in a given server pool.

If you set this value, you must do so before you initialize the cluster The selected stripe size is immutable after the cluster has been initialized and affects any future server pools added to the cluster.

MinIO SUBNET users should log in and open an issue to discuss stripe size settings prior to implementing them in any environment.

Caution

Warning

Do not change the stripe size setting unless directed to by MinIO engineering.

Changes to stripe size have significant impact to deployment functionality, availability, performance, and behavior. MinIO’s stripe selection algorithms set appropriate defaults for the majority of workloads. Changing the stripe size from this default is unusual and generally not necessary or advised.

Maximum Object Versions

MINIO_API_OBJECT_MAX_VERSIONS

envvar

api object_max_versions

mc-conf

Optional

Defines the default maximum versions to allow per object.

By default, MinIO allows up to the maximum value of an Int64 versions per object, or over 9.2 quintillion.

Note

Note

MinIO versions from RELEASE.2023-08-04T17-40-21Z to RELEASE.2024-03-26T22-10-45Z had a default limit of 10,000 object versions. This setting can be used to override that limit to another value.

Arbitrarily high versions per objects may cause performance degradation on some operations, such as LIST. This is especially true on systems running budget hardware or spinning drives (HDD). Applications or workloads which produce thousands or more versions per object may require design or architecture review to mitigate potential performance degradations.

Setting a limit of no more than 100 should provide enough versions for most typical use cases.

Client Source Address Trust

MINIO_API_TRUSTED_PROXIES

envvar

Specifies which peers may tell the server where a request came from.

By default MinIO believes the X-Forwarded-For, X-Real-IP and RFC 7239 Forwarded headers from any peer, so a client with direct network access to the API port can set its own apparent source address. That address feeds aws:SourceIp policy conditions, the audit log remotehost field, and event notification Host fields.

Set this to a comma-separated list of addresses or CIDR blocks to believe forwarded headers only from those peers. The forwarding chain is then read right to left past listed hops, which also discards the client-supplied left-most entry that an appending proxy leaves in place — the stock nginx $proxy_add_x_forwarded_for recipe and HAProxy’s added second header line both produce one.

Set this to none to believe no forwarding header at all and always use the peer address.

Note

Note

Unset is the default and preserves the historical behaviour, so this setting is inert until you configure it.

List the proxies themselves, not the subnet they sit in. Listed entries are skipped while walking the chain, so a range that also covers clients lets those clients forge. Multi-node deployments must include their own node addresses, because MinIO forwards some requests between nodes. Loopback is always trusted as a peer so FTP and SFTP keep attributing their sessions. A malformed value, or one that names no proxy at all, stops startup.

If you use IpAddress or NotIpAddress policy conditions, they are not enforceable until this setting names your proxies, or the deployment is otherwise unreachable except through them.

This setting does not have a configuration setting option.

Legacy Bucket Resource Matching

MINIO_API_LEGACY_BUCKET_RESOURCE_MATCH

envvar

Set to on to restore the historical matching of IAM policy resources for bucket-level requests.

By default, twelve bucket-level write actions are not authorized through an object-only resource pattern such as arn:aws:s3:::mybucket/*. See Bucket and Object Resources for the action list and for the policy change that grants them properly.

Setting this to on returns to matching bucket-level requests against the string mybucket/, which an object pattern also matches. It is read once at startup and is intended as a temporary measure while stored policies are updated.

Warning

This restores an over-grant

The historical matching is what allowed a principal holding only s3:* on arn:aws:s3:::mybucket/* to rewrite the bucket policy — including making the bucket public — or to delete the bucket. The switch is all-or-nothing: enabling it for one action reopens all twelve.

This setting does not have a configuration setting option.

12.1.2 - Root Access Settings

This page covers settings that control root (superuser) access for the MinIO process. The root user has complete access and permissions to perform operations on the MinIO deployment.

Root User and Root Password are required even if you use the MinIO Key Encryption Service or other key management utility.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Root User

MINIO_ROOT_USER

envvar

The access key for the root user.

Caution

Warning

If MINIO_ROOT_USER is unset, minio defaults to minioadmin.

NEVER use the default credentials in production environments. MinIO strongly recommends specifying a unique, long, and random MINIO_ROOT_USER value for all environments.

This setting does not have a configuration variable setting. Use the Environment Variable instead.

Root Password

MINIO_ROOT_PASSWORD

envvar

The secret key for the root user.

Caution

Warning

If MINIO_ROOT_PASSWORD is unset, minio defaults to minioadmin.

NEVER use the default credentials in production environments. MinIO strongly recommends specifying a unique, long, and random MINIO_ROOT_PASSWORD value for all environments.

This setting does not have a configuration variable setting. Use the Environment Variable instead.

Root Access

MINIO_API_ROOT_ACCESS

envvar

api root-access

mc-conf

Note

Added: MinIO

Server RELEASE.2023-05-04T21-44-30Z

Specify on to enable and off to disable the root user account. Disabling the root service account also disables all service accounts associated with root, excluding those used by site replication. Defaults to on.

Warning

Important

If you disable root API access with this setting, you must still set a root user and a root password for internal use.

Ensure you have at least one other admin user, such as one with the consoleAdmin policy, before disabling the root account. If you do not have another admin user, disabling the root account locks administrative access to the deployment.

You can use this variable to temporarily override the configuration setting and re-enable root access to the deployment.

To reset after an unintentional lock, set MINIO_API_ROOT_ACCESS on to override this setting and temporarily re-enable the root account. You can then change this setting to on or make the necessary user/policy changes to ensure normal administrative access through other non-root accounts.

Unique Root Credentials

Note

Added: Server

RELEASE.2024-03-03T17-50-39Z

MinIO automatically generates unique root credentials if all of the following conditions are true:

When those conditions are met at startup, MinIO uses the KMS to generate unique root credentials for the deployment using a hash-based message authentication code (HMAC).

If MinIO generates such credentials, the key used to generate the credentials must remain the same and continue to exist. All data on the deployment is encrypted with this key!

To rotate the generated root credentials, generate a new key in the KMS, then update the value of the MINIO_KMS_KES_KEY_NAME with the new key.

12.1.3 - Erasure Code Settings

This page covers settings that configure the Erasure Code parity to use for objects written to the MinIO cluster. This impacts how MinIO uses the space on the drive(s) and how MinIO can recover objects stored on lost drives or similar issues.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Standard Storage Class

Note

Note

MinIO Storage Classes are distinct from AWS Storage Classes.

AWS Storage Classes refer to the specific storage tier on which to store a given object, such as hot or glacier storage. MinIO Storage Classes affect the erasure code parity setting used and relate to Availability and Resiliency of objects.

For tiering from one type of storage to another, such as for cost management purposes, see Object Transition (“Tiering”).

MINIO_STORAGE_CLASS_STANDARD

envvar

storage_class standard

mc-conf

The parity level for the deployment. MinIO shards objects written with the default STANDARD storage class using this parity value.

MinIO references the x-amz-storage-class header in request metadata for determining which storage class to assign an object. The specific syntax or method for setting headers depends on your preferred method for interfacing with the MinIO server.

Specify the value using EC:M notation, where M refers to the number of parity blocks to create for the object.

The following table lists the default values based on the erasure set size of the initial server pool in the deployment:

Erasure Set Size Default Parity (EC:N)
1 EC:0
2-3 EC:1
4-5 EC:2
6 - 7 EC:3
8 - 16 EC:4

The minimum supported value is 0, which indicates no erasure coding protections. These deployments rely entirely on the storage controller or resource for availability / resiliency.

The maximum value depends on the erasure set size of the initial server pool in the deployment, where the upper bound is ERASURE_SET_SIZE2\frac{\text{ERASURE\_SET\_SIZE}}{2}. For example, a deployment with erasure set stripe size of 16 has a maximum standard parity of 8.

You can change this value after startup to any value between 0 and the upper bound for the erasure set size. MinIO only applies the changed parity to newly written objects. Existing objects retain the parity value in place at the time of their creation.

Reduced Redundancy Storage Class

Note

Note

MinIO Storage Classes are distinct from AWS Storage Classes.

AWS Storage Classes refer to the specific storage tier on which to store a given object, such as hot or glacier storage. MinIO Storage Classes affect the erasure code parity setting used and relate to Availability and Resiliency of objects.

For tiering from one type of storage to another, such as for cost management purposes, see Object Transition (“Tiering”).

MINIO_STORAGE_CLASS_RRS

envvar

storage_class rrs

mc-conf

The parity level for objects written with the REDUCED storage class.

MinIO references the x-amz-storage-class header in request metadata for determining which storage class to assign an object. The specific syntax or method for setting headers depends on your preferred method for interfacing with the MinIO server.

Specify the value using EC:M notation, where M refers to the number of parity blocks to create for the object.

This value must be less than or equal to MINIO_STORAGE_CLASS_STANDARD.

You cannot set this value for deployments with an erasure set size less than 2. Defaults to EC:1 for deployments with erasure set size greater than 1. Defaults to EC:0 for deployments of erasure set size of 1.

Parity Retention Optimization

MINIO_STORAGE_CLASS_OPTIMIZE

envvar

storage_class optimize

mc-conf

MinIO by default automatically “upgrades” parity for an object if the destination erasure set maintains write quorum but has one or more drives offline. This behavior helps ensure that the given object maintains the same availability as objects written to the healthy erasure set.

Specify capacity to this setting to direct MinIO to not create any additional parity for the object. This prioritizes the overall capacity of the cluster at the cost of potentially reduced object availability in the event more drives in that erasure set fail.

Comment

MINIO_STORAGE_CLASS_COMMENT

envvar

This setting does not have a configuration setting option.

Adds a comment to the storage class settings.

12.1.4 - Silo Console Settings

Note

Changed: RELEASE.2025-05-24T17-08-30Z

The Console now presents only object browser capabilities similar to those available through the mc tool. For administrative interactions, such as user management, use the mc admin command.

Some of the settings on this page may no longer be relevant for newer deployments.

This page covers settings that manage access and behavior for the MinIO Console.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Browser Settings

The following settings control behavior for the embedded MinIO Console.

MinIO Console

Optional

MINIO_BROWSER

envvar

Specify off to disable the embedded MinIO Console.

This setting does not have a configuration variable setting. Use the Environment Variable instead.

Animation

Optional

MINIO_BROWSER_LOGIN_ANIMATION

envvar

Note

Added: MinIO

Server RELEASE.2023-05-04T21-44-30Z

Specify off to disable the animated login screen for the MinIO Console. Defaults to on.

This setting does not have a configuration variable setting. Use the Environment Variable instead.

Browser Redirect

Optional

MINIO_BROWSER_REDIRECT

envvar

Note

Added: MinIO

Server RELEASE.2023-09-16T01-01-47Z

Specify whether requests from a web browser automatically redirect to the Console address. Defaults to true.

This setting does not have a configuration variable setting. Use the Environment Variable instead.

Browser Redirect URL

Optional

MINIO_BROWSER_REDIRECT_URL

envvar

Specify the Fully Qualified Domain Name (FQDN) the MinIO Console listens for incoming connections on.

If you want to host the MinIO Console exclusively from a reverse-proxy service, you must specify the hostname managed by that service.

For example, consider a reverse proxy configured to route https://example.net/minio/ to the MinIO Console. You must set this environment variable to match that hostname for the Console to both listen and respond to requests using that hostname.

If you omit this variable, the Console listens and responds to all IP addresses or hostnames associated to the host machine on which the MinIO Server runs.

This setting does not have a configuration variable setting. Use the Environment Variable instead.

Session Duration

Optional

MINIO_BROWSER_SESSION_DURATION

envvar

Note

Added: MinIO

Server RELEASE.2023-08-23T10-07-06Z

Specify the duration of a browser session for working with the MinIO Console.

MinIO supports the following units of time measurement:

  • s - seconds, “60s”
  • m - minutes, “60m”
  • h - hours, “24h”
  • d - days, “7d”

Defaults to 12h.

This setting does not have a configuration variable setting. Use the Environment Variable instead.

Log Query URL

Optional

MINIO_LOG_QUERY_URL

envvar

Specify the URL of a PostgreSQL service to which MinIO writes Audit logs. The embedded MinIO Console provides a Log Search tool that allows querying the PostgreSQL service for collected logs.

This setting does not have a configuration variable setting. Use the Environment Variable instead.

Content Security Policy

Optional

Configure MinIO Console to generate a Content-Security-Policy header in HTTP responses. Defaults to default-src 'self' 'unsafe-eval' 'unsafe-inline';

MINIO_BROWSER_CONTENT_SECURITY_POLICY

envvar

export MINIO_BROWSER_CONTENT_SECURITY_POLICY="default-src 'self' 'unsafe-eval' 'unsafe-inline';"
browser csp_policy

mc-conf

mc admin config set browser \
   csp_policy="default-src 'self' 'unsafe-eval' 'unsafe-inline';" \
   [ARGUMENT=VALUE ...]

Strict Transport Security

Optional

Configure MinIO console to generate a Strict-Transport-Security header in HTTP responses.

To generate the header, you must set a duration using either MINIO_BROWSER_HSTS_SECONDS or hsts_seconds. Other HSTS settings are optional.

MINIO_BROWSER_HSTS_SECONDS

envvar

The max_age the configured policy remains in effect, in seconds. Defaults to 0, disabled. You must configure a non-zero duration to enable the Strict-Transport-Security header.

export MINIO_BROWSER_HSTS_SECONDS=31536000
MINIO_BROWSER_HSTS_INCLUDE_SUB_DOMAINS

envvar

Set to on to also apply the configured HSTS policy to all MinIO Console subdomains. Defaults to off.

export MINIO_BROWSER_HSTS_INCLUDE_SUB_DOMAINS="on"
MINIO_BROWSER_HSTS_PRELOAD

envvar

Set to on to direct the client browser to add the MinIO Console domain to its HSTS preload list. Defaults to off.

export MINIO_BROWSER_HSTS_PRELOAD="on"

The following configuration settings require a service restart to take effect. To restart the service, use mc admin service restart.

browser hsts_seconds

mc-conf

The max_age the configured policy remains in effect, in seconds. Defaults to 0, disabled. You must configure a non-zero duration to enable the Strict-Transport-Security header.

mc admin config set browser \
   hsts_seconds="31536000" \
   [ARGUMENT=VALUE ...]
browser hsts_include_subdomains

mc-conf

Set to on to also apply the configured HSTS policy to all MinIO Console subdomains. Defaults to off.

mc admin config set browser \
   hsts_include_subdomains="on" \
   hsts_seconds="31536000" \
   [ARGUMENT=VALUE ...]
browser hsts_preload

mc-conf

Set to on to direct the client browser to add the MinIO Console domain to its HSTS preload list. Defaults to off.

mc admin config set browser \
   hsts_preload="on" \
   hsts_seconds="31536000" \
   [ARGUMENT=VALUE ...]

Examples

The following examples show the rendered header for the given configuration settings. The equivalent environment variables generate the same result. All examples use a value of 31536000, which is the number of seconds in a calendar year (365 days).

hsts_seconds

mc admin config set ALIAS browser hsts_seconds=31536000
Strict-Transport-Security: max-age=31536000

hsts_include_subdomains

mc admin config set ALIAS browser hsts_seconds=31536000 hsts_include_subdomains=on
Strict-Transport-Security: max-age=31536000; includeSubDomains

hsts_preload

mc admin config set ALIAS browser hsts_seconds=31536000 hsts_include_subdomains=on hsts_preload=on
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

Referrer Policy

Optional

Configure MinIO Console to generate a Referrer-Policy header in HTTP responses. Defaults to strict-origin-when-cross-origin.

MINIO_BROWSER_REFERRER_POLICY

envvar

export MINIO_BROWSER_REFERRER_POLICY="strict-origin-when-cross-origin"
browser referrer_policy

mc-conf

mc admin config set browser \
   referrer_policy="strict-origin-when-cross-origin" \
   [ARGUMENT=VALUE ...]

Prometheus Settings

The following settings manage how MinIO interacts with your Prometheus service.

Prometheus URL

Optional

MINIO_PROMETHEUS_URL

envvar

Specify the URL for a Prometheus service configured to scrape MinIO metrics.

The MinIO Console populates the Dashboard with cluster metrics using the minio-job Prometheus scraping job.

If you are using a standalone MinIO Console process, this variable corresponds with CONSOLE_PROMETHEUS_URL.

This setting does not have a configuration variable setting. Use the Environment Variable instead.

Prometheus Job ID

Optional

MINIO_PROMETHEUS_JOB_ID

envvar

Specify the custom Prometheus job ID used for scraping MinIO metrics.

MinIO defaults to minio-job.

If you are using a standalone MinIO Console process, this variable corresponds with CONSOLE_PROMETHEUS_JOB_ID.

This setting does not have a configuration variable setting. Use the Environment Variable instead.

Prometheus Auth Token

Optional

MINIO_PROMETHEUS_AUTH_TOKEN

envvar

Specify the basic auth token the Console should use to connect to a Prometheus service.

For example, a basic auth token you might use could resemble the following:

eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJwcm9tZXRoZXVzIiwic3ViIjoibWluaW8iLCJleHAiOjQ4NTAwMzg0MDJ9.GZCKR3d0FH2TCvNHSd39HaVfSuQVVV0s8glICBDmhT51V6CQ_hw8gTYlKHJmcpR8aHkqiJwCqcYJhaMmqwe00XY

If you are using a standalone MinIO Console process, this variable corresponds with CONSOLE_PROMETHEUS_AUTH_TOKEN.

This setting does not have a configuration variable setting. Use the Environment Variable instead.

12.1.5 - Metrics and Logging Settings

This page covers settings that control behavior related to MinIO metrics and logging. See Metrics and alerts for more information.

These settings configure publishing regular minio server logs and audit logs to an HTTP webhook. See Publish Server or Audit Logs to an External Service for more complete documentation.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Prometheus Authentication

This setting controls how MinIO authenticates to Prometheus.

MINIO_PROMETHEUS_AUTH_TYPE

envvar

This setting does not have a configuration setting option.

Specifies the authentication mode for the Prometheus scraping endpoints.

  • jwt - Default MinIO requires that the scraping client specify a JWT token for authenticating requests.

    Use mc admin prometheus generate to generate the necessary JWT bearer tokens.

  • public MinIO does not require that scraping clients authenticate their requests.

Server Logs

The following section documents settings for configuring MinIO to publish minio server logs to an HTTP webhook endpoint. See Publish Server Logs to HTTP Webhook for more complete documentation and tutorials on using these settings.

Defining Multiple Endpoints

You can specify multiple webhook endpoints as log targets by appending a unique identifier _ID for each set of related logging environment variables. For example, the following settings define two distinct server logs webhook endpoints:

Environment Variables
export MINIO_LOGGER_WEBHOOK_ENABLE_PRIMARY="on"
export MINIO_LOGGER_WEBHOOK_AUTH_TOKEN_PRIMARY="TOKEN"
export MINIO_LOGGER_WEBHOOK_ENDPOINT_PRIMARY="http://webhook-1.example.net"

export MINIO_LOGGER_WEBHOOK_ENABLE_SECONDARY="on"
export MINIO_LOGGER_WEBHOOK_AUTH_TOKEN_SECONDARY="TOKEN"
export MINIO_LOGGER_WEBHOOK_ENDPOINT_SECONDARY="http://webhook-2.example.net"
Configuration Setting
mc admin config set logger_webhook:primary \
   endpoint="http://webhook-01.example.net" [ARGUMENTS=VALUE ...]

mc admin config set logger_webhook:secondary \
   endpoint="http://webhook-02.example.net" [ARGUMENTS=VALUE ...]

Settings

Enable

MINIO_LOGGER_WEBHOOK_ENABLE

envvar

Specify "on" to enable publishing minio server logs to the HTTP webhook endpoint.

Requires specifying MINIO_LOGGER_WEBHOOK_ENDPOINT.

logger_webhook

mc-conf

The top level key for the configuration settings to configure logging to an HTTP webhook endpoint.

Endpoint

Required

MINIO_LOGGER_WEBHOOK_ENDPOINT

envvar

logger_webhook endpoint

mc-conf

The HTTP endpoint of the webhook.

Auth Token

Optional

MINIO_LOGGER_WEBHOOK_AUTH_TOKEN

envvar

An authentication token of the appropriate type for the endpoint. Omit for endpoints which do not require authentication.

To allow for a variety of token types, MinIO creates the request authentication header using the value exactly as specified. Depending on the endpoint, you may need to include additional information.

For example: for a Bearer token, prepend Bearer:

export MINIO_LOGGER_WEBHOOK_AUTH_TOKEN_myendpoint="Bearer 1a2b3c4f5e"

Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:

export MINIO_LOGGER_WEBHOOK_AUTH_TOKEN_xyz="ServiceXYZ 1a2b3c4f5e"

Consult the documentation for the desired service for more details.

This environment variable corresponds with the logger_webhook auth_token configuration setting.

logger_webhook auth_token

mc-conf

An authentication token of the appropriate type for the endpoint. Omit for endpoints which do not require authentication.

To allow for a variety of token types, MinIO creates the request authentication header using the value exactly as specified. Depending on the endpoint, you may need to include additional information.

For example: for a Bearer token, prepend Bearer:

   mc admin config set myminio logger_webhook   \
      endpoint="https://webhook-1.example.net"  \
      auth_token="Bearer 1a2b3c4f5e"

Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:

   mc admin config set myminio logger_webhook   \
        endpoint="https://webhook-1.example.net"  \
      auth_token="ServiceXYZ 1a2b3c4f5e"

Consult the documentation for the desired service for more details.

Batch Size

Note

Added: MinIO

Server RELEASE.2024-03-10T02-53-48Z

Optional

MINIO_LOGGER_WEBHOOK_BATCH_SIZE

envvar

logger_webhook batch_size

mc-conf

Collect and send the specified number of events to the webhook as a batch. If not set, MinIO sends one event per request.

Client Certificate

Optional

Requires also setting the Client Key.

MINIO_LOGGER_WEBHOOK_CLIENT_CERT

envvar

logger_webhook client_cert

mc-conf

The path to the mTLS certificate to use for authenticating to the webhook logger.

Client Key

Optional

Required if you define the Client Certificate.

MINIO_LOGGER_WEBHOOK_CLIENT_KEY

envvar

logger_webhook client_key

mc-conf

The path to the mTLS certificate key to use to authenticate with the webhook logger service.

Proxy

Optional

MINIO_LOGGER_WEBHOOK_PROXY

envvar

logger_webhook proxy

mc-conf

Note

Added: MinIO

RELEASE.2023-02-22T18-23-45Z

Define a proxy to use for the webhook logger when communicating from MinIO to external webhooks.

Queue Directory

Optional

Note

Added: RELEASE.2023-05-18T00-05-36Z

MINIO_LOGGER_WEBHOOK_QUEUE_DIR

envvar

logger_webhook queue_dir

mc-conf

Specify the directory path, such as /opt/minio/events, to enable MinIO’s persistent event store for undelivered messages. The MinIO process must have read, write, and list access on the specified directory.

MinIO stores undelivered events in the specified store while the webhook service is offline and replays the stored events when connectivity resumes.

Queue Size

Optional

MINIO_LOGGER_WEBHOOK_QUEUE_SIZE

envvar

logger_webhook queue_size

mc-conf

An integer value to use for the queue size for logger webhook targets.

Webhook Audit Logs

The following section documents environment variables for configuring MinIO to publish audit logs to an HTTP webhook endpoint. See Publish Audit Logs to HTTP Webhook for more complete documentation and tutorials on using these environment variables.

Multiple Targets

You can specify multiple webhook endpoints as audit log targets by appending a unique identifier _ID for each set of related logging settings.

For example, the following commands set two distinct audit log webhook endpoints:

export MINIO_AUDIT_WEBHOOK_ENABLE_PRIMARY="on"
export MINIO_AUDIT_WEBHOOK_AUTH_TOKEN_PRIMARY="TOKEN"
export MINIO_AUDIT_WEBHOOK_ENDPOINT_PRIMARY="http://webhook-1.example.net"
export MINIO_AUDIT_WEBHOOK_CLIENT_CERT_SECONDARY="/tmp/cert.pem"
export MINIO_AUDIT_WEBHOOK_CLIENT_KEY_SECONDARY="/tmp/key.pem"

export MINIO_AUDIT_WEBHOOK_ENABLE_SECONDARY="on"
export MINIO_AUDIT_WEBHOOK_AUTH_TOKEN_SECONDARY="TOKEN"
export MINIO_AUDIT_WEBHOOK_ENDPOINT_SECONDARY="http://webhook-1.example.net"
export MINIO_AUDIT_WEBHOOK_CLIENT_CERT_SECONDARY="/tmp/cert.pem"
export MINIO_AUDIT_WEBHOOK_CLIENT_KEY_SECONDARY="/tmp/key.pem"
audit_webhook

mc-conf

The top-level configuration key for defining an HTTP webhook target for publishing MinIO audit logs.

Use mc admin config set to set or update an HTTP webhook target. Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set audit_webhook \
   endpoint="http://webhook.example.net" [ARGUMENTS=VALUE ...]

You can specify multiple HTTP webhook targets by appending [:name] to the top-level key. For example, the following commands set two distinct HTTP webhook targets as primary and secondary respectively:

mc admin config set audit_webhook:primary \
   endpoint="http://webhook-01.example.net" [ARGUMENTS=VALUE ...]


mc admin config set audit_webhook:secondary \
   endpoint="http://webhook-02.example.net" [ARGUMENTS=VALUE ...]

Settings

Enable

MINIO_AUDIT_WEBHOOK_ENABLE

envvar

Specify "on" to enable publishing audit logs to the HTTP webhook endpoint.

Requires specifying MINIO_AUDIT_WEBHOOK_ENDPOINT.

Configure an audit webhook to enable it. There is not a separate enable configuration setting.

Endpoint

Required

MINIO_AUDIT_WEBHOOK_ENDPOINT

envvar

audit_webhook endpoint

mc-conf

The HTTP endpoint of the webhook.

Auth Token

Optional

MINIO_AUDIT_WEBHOOK_AUTH_TOKEN

envvar

audit_webhook auth_token

mc-conf

An authentication token of the appropriate type for the endpoint. Omit for endpoints which do not require authentication.

To allow for a variety of token types, MinIO creates the request authentication header using the value exactly as specified. Depending on the endpoint, you may need to include additional information.

For example, for a Bearer token, prepend Bearer:

export MINIO_AUDIT_WEBHOOK_AUTH_TOKEN_myendpoint="Bearer 1a2b3c4f5e"

Modify the value according to the endpoint requirements.

A custom authentication format could resemble the following:

export MINIO_AUDIT_WEBHOOK_AUTH_TOKEN_xyz="ServiceXYZ 1a2b3c4f5e"
mc admin config set myminio audit_webhook       \
         endpoint="http://webhook.example.net"  \
         auth_token="Bearer 1a2b3c4f5e"

Modify the value according to the endpoint requirements.

A command for a custom authentication format could resemble the following:

mc admin config set myminio audit_webhook       \
         endpoint="http://webhook.example.net"  \
         auth_token="ServiceXYZ 1a2b3c4f5e"

Consult the documentation for the desired service for more details.

Batch Size

Note

Added: MinIO

Server RELEASE.2024-03-10T02-53-48Z

Optional

MINIO_AUDIT_WEBHOOK_BATCH_SIZE

envvar

audit_webhook batch_size

mc-conf

Collect and send the specified number of events to the webhook as a batch. If not set, MinIO sends one event per request.

Client Certificate

Optional

MINIO_AUDIT_WEBHOOK_CLIENT_CERT

envvar

Requires also specifying MINIO_AUDIT_WEBHOOK_CLIENT_KEY.

audit_webhook client_cert

mc-conf

Requires also specifying client_key.

The x.509 client certificate to present to the HTTP webhook. Omit for webhooks which do not require clients to present a known TLS certificate.

Client Key

Optional

MINIO_AUDIT_WEBHOOK_CLIENT_KEY

envvar

Requires also specifying MINIO_AUDIT_WEBHOOK_CLIENT_CERT.

audit_webhook client_key

mc-conf

Requires specifying client_cert.

The x.509 private key to present to the HTTP webhook. Omit for webhooks which do not require clients to present a known TLS certificate.

Queue Directory

Optional

MINIO_AUDIT_WEBHOOK_QUEUE_DIR

envvar

audit_webhook queue_dir

mc-conf

Note

Added: RELEASE.2023-05-18T00-05-36Z

Specify the directory path, such as /opt/minio/events, to enable MinIO’s persistent event store for undelivered messages. The MinIO process must have read, write, and list access on the specified directory.

MinIO stores undelivered events in the specified store while the webhook service is offline and replays the stored events when connectivity resumes.

Queue Size

Optional

MINIO_AUDIT_WEBHOOK_QUEUE_SIZE

envvar

audit_webhook queue_size

mc-conf

An integer value to use for the queue size for audit webhook targets. The default is 100000 events.

Kafka Audit Logs

The following section documents environment variables for configuring MinIO to publish audit logs to a Kafka broker.

audit_kafka

mc-conf

The top-level configuration key for defining a Kafka broker target for publishing MinIO audit logs.

Use mc admin config set to set or update a Kafka audit target. Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set audit_kafka \
   brokers="https://kafka-endpoint.example.net:9092" [ARGUMENTS=VALUE ...]

Settings

Enable

Required

MINIO_AUDIT_KAFKA_ENABLE

envvar

Set to "on" to enable the target.

Set to "off" to disable the target.

There is not a configuration setting for this value. Use the environment variable to disable a configured audit webhook target.

Brokers

Required

MINIO_AUDIT_KAFKA_BROKERS

envvar

audit_kafka brokers

mc-conf

A comma-separated list of Kafka broker addresses:

brokers="https://kafka-1.example.net:9092,https://kafka-2.example.net:9092"

At least one broker must be online and reachable by the MinIO server to initialize and send audit log events. MinIO checks each specified broker in order of specification.

Topic

Required

MINIO_AUDIT_KAFKA_TOPIC

envvar

audit_kafka topic

mc-conf

The name of the Kafka topic to associate to MinIO audit log events.

TLS

Optional

MINIO_AUDIT_KAFKA_TLS

envvar

audit_kafka tls

mc-conf

Set to "on" to enable TLS connectivity to the specified Kafka brokers.

Defaults to "off".

TLS Skip Verify

Optional

MINIO_AUDIT_KAFKA_TLS_SKIP_VERIFY

envvar

audit_kafka tls_skip_verify

mc-conf

Set to "on" to direct MinIO to skip verification of the Kafka broker TLS certificates.

You can use this option for enabling connectivity to Kafka brokers using TLS certificates signed by unknown parties, such as self-signed or corporate-internal Certificate Authorities (CA).

MinIO by default uses the system trust store and the contents of the MinIO CA directory for verifying remote client TLS certificates.

Defaults to "off" for strict verification of TLS certificates.

SASL

Optional

MINIO_AUDIT_KAFKA_SASL

envvar

Requires specifying MINIO_AUDIT_KAFKA_SASL_USERNAME and MINIO_AUDIT_KAFKA_SASL_PASSWORD.

audit_kafka sasl

mc-conf

Requires specifying sasl_username and sasl_password.

Set to "on" to direct MinIO to use SASL to authenticate against the Kafka brokers.

SASL Username

Optional

MINIO_AUDIT_KAFKA_SASL_USERNAME

envvar

Requires specifying MINIO_AUDIT_KAFKA_SASL and MINIO_AUDIT_KAFKA_SASL_PASSWORD.

audit_kafka sasl_username

mc-conf

Requires specifying sasl and sasl_password.

The SASL username MinIO uses for authentication against the Kafka brokers.

SASL Password

Optional

MINIO_AUDIT_KAFKA_SASL_PASSWORD

envvar

Requires specifying MINIO_AUDIT_KAFKA_SASL and MINIO_AUDIT_KAFKA_SASL_USERNAME.

audit_kafka sasl_password

mc-conf

Requires specifying sasl and sasl_username.

The SASL password MinIO uses for authentication against the Kafka brokers.

SASL Mechanism

Optional

MINIO_AUDIT_KAFKA_SASL_MECHANISM

envvar

Warning

Important

The PLAIN authentication mechanism sends credentials in plain text over the network. Use MINIO_AUDIT_KAFKA_TLS or to enable TLS connectivity to the Kafka brokers and ensure secure transmission of SASL credentials.

audit_kafka sasl_mechanism

mc-conf

Warning

Important

The PLAIN authentication mechanism sends credentials in plain text over the network. Use tls to enable TLS connectivity to the Kafka brokers and ensure secure transmission of SASL credentials.

The SASL mechanism MinIO uses for authentication against the Kafka brokers.

Defaults to plain.

TLS Client Auth

Optional

MINIO_AUDIT_KAFKA_TLS_CLIENT_AUTH

envvar

Requires specifying MINIO_AUDIT_KAFKA_CLIENT_TLS_CERT and MINIO_AUDIT_KAFKA_CLIENT_TLS_KEY.

audit_kafka tls_client_auth

mc-conf

Requires specifying client_tls_cert and client_tls_key.

Set to "on" to direct MinIO to use mTLS to authenticate against the Kafka brokers.

Client TLS Certificate

Optional

MINIO_AUDIT_KAFKA_CLIENT_TLS_CERT

envvar

audit_kafka client_tls_cert

mc-conf

The path to the TLS client certificate to use for mTLS authentication.

Client TLS Key

Optional

MINIO_AUDIT_KAFKA_CLIENT_TLS_KEY

envvar

audit_kafka client_tls_key

mc-conf

The path to the TLS client private key to use for mTLS authentication.

Version

Optional

MINIO_AUDIT_KAFKA_VERSION

envvar

audit_kafka version

mc-conf

The version of the Kafka broker MinIO expects at the specified endpoints.

MinIO returns an error if the Kakfa broker version does not match those specified to this setting.

Comment

Optional

MINIO_AUDIT_KAFKA_COMMENT

envvar

audit_kafka comment

mc-conf

A comment to associate with the configuration.

Queue Directory

Optional

MINIO_AUDIT_KAFKA_QUEUE_DIR

envvar

audit_kafka queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the Kafka service is offline and replays the stored events when connectivity resumes.

Queue Size

Optional

MINIO_AUDIT_KAFKA_QUEUE_SIZE

envvar

audit_kafka queue_size

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

12.1.6 - Bucket Notifications Settings

This page covers settings that control behavior related to MinIO bucket notifications.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Sync Events

Optional

MINIO_API_SYNC_EVENTS

envvar

api sync_events

mc-conf

Enables synchronous bucket notifications.

Specify on to direct MinIO to wait until the remote target returns success on receipt of an event before processing further events.

Defaults to off, or asynchronous bucket notifications where MinIO does not wait for the remote target to return success on receipt of an event.

Supported Notification Targets

Notifications require a target to receive the events. MinIO supports a variety of possible targets. Settings for each target type have their own pages. Select the appropriate link below for the type of target you use for notifications.

12.1.6.1 - AMQP Notification Settings

This page documents settings for configuring an AMQP service as a target for Bucket Notifications. See Publish Events to AMQP (RabbitMQ) for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Multiple AMQP Targets

You can specify multiple AMQP service endpoints by appending a unique identifier _ID for each set of related AMQP settings to the top level key.

Examples

For example, the following commands set two distinct AMQP service endpoints as PRIMARY and SECONDARY respectively:

export MINIO_NOTIFY_AMQP_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_AMQP_URL_PRIMARY="amqp://user:[email protected]:5672"

export MINIO_NOTIFY_AMQP_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_AMQP_URL_SECONDARY="amqp://user:[email protected]:5672"

For example, MINIO_NOTIFY_AMQP_ENABLE_PRIMARY indicates the environment variable is associated to an AMQP service endpoint with ID of PRIMARY.

mc admin config set notify_amqp:primary \
   url="user:password@amqp://amqp-endpoint.example.net:5672" [ARGUMENT=VALUE ...]

mc admin config set notify_amqp:secondary \
   url="user:password@amqp://amqp-endpoint.example.net:5672" [ARGUMENT=VALUE ...]

Notice that for configuration settings, the unique identifier appends to amqp only, not to each individual argument.

Settings

Enable

MINIO_NOTIFY_AMQP_ENABLE

envvar

Requires specifying MINIO_NOTIFY_AMQP_URL if set to on.

Specify on to enable publishing bucket notifications to an AMQP endpoint.

Defaults to off.

notify_amqp

mc-conf

The top-level configuration key for defining an AMQP service endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an AMQP service endpoint. The url argument is required for each target. Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_amqp \
  url="amqp://user:password@endpoint:port" \
  [ARGUMENT="VALUE"] ...

URL

Required

MINIO_NOTIFY_AMQP_URL

envvar

notify_amqp url

mc-conf

Specify the AMQP server endpoint to which MinIO publishes bucket events. For example, amqp://myuser:mypassword@localhost:5672.

Note

Changed: RELEASE.2023-05-27T05-56-19Z

MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.

Exchange

Optional

MINIO_NOTIFY_AMQP_EXCHANGE

envvar

notify_amqp exchange

mc-conf

Specify the name of the AMQP exchange to use.

Exchange Type

Optional

MINIO_NOTIFY_AMQP_EXCHANGE_TYPE

envvar

notify_amqp exchange_type

mc-conf

Specify the type of the AMQP exchange.

Routing Key

Optional

MINIO_NOTIFY_AMQP_ROUTING_KEY

envvar

notify_amqp routing_key

mc-conf

Specify the routing key for publishing events.

Mandatory

Optional

MINIO_NOTIFY_AMQP_MANDATORY

envvar

notify_amqp mandatory

mc-conf

Specify off to ignore undelivered messages errors. Defaults to on.

Durable

Optional

MINIO_NOTIFY_AMQP_DURABLE

envvar

notify_amqp durable

mc-conf

Specify on to persist the message queue across broker restarts. Defaults to off.

No Wait

Optional

MINIO_NOTIFY_AMQP_NO_WAIT

envvar

notify_amqp no_wait

mc-conf

Specify on to enable non-blocking message delivery. Defaults to off.

Internal

Optional

MINIO_NOTIFY_AMQP_INTERNAL

envvar

notify_amqp internal

mc-conf

Specify on to use the exchange only if it is bound to other exchanges. See the RabbitMQ documentation on Exchange to Exchange Bindings for more information on AMQP exchange binding.

Auto Deleted

Optional

MINIO_NOTIFY_AMQP_AUTO_DELETED

envvar

notify_amqp auto_deleted

mc-conf

Specify on to automatically delete the message queue if there are no consumers. Defaults to off.

Delivery Mode

Optional

MINIO_NOTIFY_AMQP_DELIVERY_MODE

envvar

notify_amqp delivery_mode

mc-conf

Specify 1 for set the delivery mode to non-persistent queue.

Specify 2 to set the delivery mode to persistent queue.

Queue Directory

Optional

MINIO_NOTIFY_AMQP_QUEUE_DIR

envvar

notify_amqp queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the AMQP service is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_AMQP_QUEUE_LIMIT

envvar

notify_amqp queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_AMQP_COMMENT

envvar

notify_amqp comment

mc-conf

Specify a comment for the AMQP configuration.

12.1.6.2 - Elasticsearch Notification Settings

This page documents settings for configuring an Elasticsearch service as a target for Bucket Notifications. See Publish Events to Elasticsearch for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Multiple Elasticsearch Targets

You can specify multiple Elasticsearch service endpoints by appending a unique identifier _ID for each set of related settings. For example, the following commands set two distinct Elasticsearch service endpoints as PRIMARY and SECONDARY, respectively:

Examples

export MINIO_NOTIFY_ELASTICSEARCH_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_ELASTICSEARCH_URL_PRIMARY="https://user:[email protected]:9200"
export MINIO_NOTIFY_ELASTICSEARCH_INDEX_PRIMARY="bucketevents"
export MINIO_NOTIFY_ELASTICSEARCH_FORMAT_PRIMARY="namespace"

export MINIO_NOTIFY_ELASTICSEARCH_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_ELASTICSEARCH_URL_SECONDARY="https://user:[email protected]:9200"
export MINIO_NOTIFY_ELASTICSEARCH_INDEX_SECONDARY="bucketevents"
export MINIO_NOTIFY_ELASTICSEARCH_FORMAT_SECONDARY="namespace"
mc admin config set notify_elasticsearch:primary \
   url="user:password@https://elasticsearch-endpoint.example.net:9200" \
   index="bucketevents" \
   format="namespace" \
   [ARGUMENT=VALUE ...]

mc admin config set notify_elasticsearch:secondary \
   url="user:password@https://elasticsearch-endpoint.example.net:9200" \
   index="bucketevents" \
   format="namespace" \
   [ARGUMENT=VALUE ...]

Notice that for configuration settings, the unique identifier appends to notify_elasticsearch only, not to each individual argument.

Settings

Enable

Required

MINIO_NOTIFY_ELASTICSEARCH_ENABLE

envvar

Specify on to enable publishing bucket notifications to an Elasticsearch service endpoint.

Defaults to off.

Requires specifying the following additional environment variables if set to on:

notify_elasticsearch

mc-conf

The top-level configuration key for defining an Elasticsearch service endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an Elasticsearch service endpoint. The following arguments are required for each target:

Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_elasticsearch \
  url="https://user:[email protected]:9200" \
  [ARGUMENT="VALUE"] ... \

URL

Required

MINIO_NOTIFY_ELASTICSEARCH_URL

envvar

notify_elasticsearch url

mc-conf

Specify the Elasticsearch service endpoint to which MinIO publishes bucket events. For example, https://elasticsearch.example.com:9200.

MinIO supports passing authentication information using as URL parameters using the format PROTOCOL://USERNAME:PASSWORD@HOSTNAME:PORT.

Note

Changed: RELEASE.2023-05-27T05-56-19Z

MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.

Index

Required

MINIO_NOTIFY_ELASTICSEARCH_INDEX

envvar

notify_elasticsearch index

mc-conf

Specify the name of the Elasticsearch index in which to store or update MinIO bucket events. Elasticsearch automatically creates the index if it does not exist.

Format

Required

MINIO_NOTIFY_ELASTICSEARCH_FORMAT

envvar

notify_elasticsearch format

mc-conf

Specify the format of event data written to the Elasticsearch index. MinIO supports the following values:

namespace

For each bucket event, MinIO creates a JSON document with the bucket and object name from the event as the document ID and the actual event as part of the document body. Additional updates to that object modify the existing index entry for that object. Similarly, deleting the object also deletes the corresponding index entry.

access

For each bucket event, MinIO creates a JSON document with the event details and appends it to the index with an Elasticsearch-generated random ID. Additional updates to an object result in new index entries, and existing entries remain unmodified.

Username

Optional

MINIO_NOTIFY_ELASTICSEARCH_USERNAME

envvar

notify_elasticsearch username

mc-conf

The username for connecting to an Elasticsearch service endpoint which enforces authentication.

Password

Optional

MINIO_NOTIFY_ELASTICSEARCH_PASSWORD

envvar

notify_elasticsearch password

mc-conf

The password for connecting to an Elasticsearch service endpoint which enforces authentication.

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

Queue Directory

Optional

MINIO_NOTIFY_ELASTICSEARCH_QUEUE_DIR

envvar

notify_elasticsearch queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the Elasticsearch service is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_ELASTICSEARCH_QUEUE_LIMIT

envvar

notify_elasticsearch queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_ELASTICSEARCH_COMMENT

envvar

notify_elasticsearch comment

mc-conf

Specify a comment to associate with the Elasticsearch configuration.

12.1.6.3 - Kafka Notification Settings

This page documents settings for configuring an Kafka service as a target for Bucket Notifications. See Publish Events to Kafka for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Multiple Kafka Targets

You can specify multiple Kafka service endpoints by appending a unique identifier _ID for each set of related Kafka settings on to the top level key.

Examples

For example, the following commands set two distinct Kafka service endpoints as PRIMARY and SECONDARY respectively:

export MINIO_NOTIFY_KAFKA_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_KAFKA_BROKERS_PRIMARY="https://kafka1.example.net:9200, https://kafka2.example.net:9200"

export MINIO_NOTIFY_KAFKA_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_KAFKA_BROKERS_SECONDARY="https://kafka1.example.net:9200, https://kafka2.example.net:9200"
mc admin config set notify_kafka:primary \
   brokers="https://kafka1.example.net:9200, https://kafka2.example.net:9200"
   [ARGUMENT=VALUE ...]

mc admin config set notify_kafka:secondary \
   brokers="https://kafka1.example.net:9200, https://kafka2.example.net:9200"
   [ARGUMENT=VALUE ...]

Notice that for configuration settings, the unique identifier appends to notify_kafka only, not to each individual argument.

Settings

Enable

Required

MINIO_NOTIFY_KAFKA_ENABLE

envvar

Specify on to enable publishing bucket notifications to a Kafka service endpoint.

Defaults to off.

notify_kafka

mc-conf

The top-level configuration key for defining an Kafka service endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an Kafka service endpoint. The brokers argument is required for each target. Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_kafka \
  brokers="https://kafka1.example.net:9200, https://kafka2.example.net:9200"
  [ARGUMENT="VALUE"] ... \

Brokers

Required

MINIO_NOTIFY_KAFKA_BROKERS

envvar

notify_kafka brokers

mc-conf

Specify a comma-separated list of Kafka broker addresses. For example:

"kafka1.example.com:2021,kafka2.example.com:2021"

Note

Changed: RELEASE.2023-05-27T05-56-19Z

MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.

Topic

Optional

MINIO_NOTIFY_KAFKA_TOPIC

envvar

notify_kafka topic

mc-conf

Specify the name of the Kafka topic to which MinIO publishes bucket events.

SASL

Optional

MINIO_NOTIFY_KAFKA_SASL

envvar

notify_kafka sasl

mc-conf

Specify on to enable SASL authentication.

SASL Username

Optional

MINIO_NOTIFY_KAFKA_SASL_USERNAME

envvar

notify_kafka sasl_username

mc-conf

Specify the username for performing SASL/PLAIN or SASL/SCRAM authentication to the Kafka broker(s).

SASL Password

Optional

MINIO_NOTIFY_KAFKA_SASL_PASSWORD

envvar

notify_kafka sasl_password

mc-conf

Specify the password for performing SASL/PLAIN or SASL/SCRAM authentication to the Kafka broker(s).

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

SASL Mechanism

Optional

MINIO_NOTIFY_KAFKA_SASL_MECHANISM

envvar

notify_kafka sasl_mechanism

mc-conf

Specify the SASL mechanism to use for authenticating to the Kafka broker(s). MinIO supports the following mechanisms:

  • PLAIN (Default)
  • SHA256
  • SHA512

TLS Client Auth

Optional

MINIO_NOTIFY_KAFKA_TLS_CLIENT_AUTH

envvar

notify_kafka tls_client_auth

mc-conf

Specify the client authentication type of the Kafka broker(s). The following table lists the supported values and their mappings

Value Authentication Type
0 NoClientCert
1 RequestClientCert
2 RequireAnyClientCert
3 VerifyClientCertIfGiven
4 RequireAndVerifyClientCert

See ClientAuthType for more information on each client auth type.

TLS

Optional

MINIO_NOTIFY_KAFKA_TLS

envvar

notify_kafka tls

mc-conf

Specify on to enable TLS connectivity to the Kafka broker(s).

TLS Skip Verify

Optional

MINIO_NOTIFY_KAFKA_TLS_SKIP_VERIFY

envvar

notify_kafka tls_skip_verify

mc-conf

Enables or disables TLS verification of the NATS service endpoint TLS certificates.

  • Specify on to disable TLS verification (Default).
  • Specify off to enable TLS verification.

Client TLS Cert

Optional

MINIO_NOTIFY_KAFKA_CLIENT_TLS_CERT

envvar

notify_kafka client_tls_cert

mc-conf

Specify the path to the client certificate to use for performing mTLS authentication to the Kafka broker(s).

Client TLS Key

Optional

MINIO_NOTIFY_KAFKA_CLIENT_TLS_KEY

envvar

notify_kafka client_tls_key

mc-conf

Specify the path to the client private key to use for performing mTLS authentication to the Kafka broker(s).

Version

Optional

MINIO_NOTIFY_KAFKA_VERSION

envvar

notify_kafka version

mc-conf

Specify the version of the Kafka cluster to assume when performing operations against that cluster. See the sarama reference documentation for more information on this field’s behavior.

Batch Size

Optional

MINIO_NOTIFY_KAFKA_BATCH_SIZE

envvar

notify_kafka batch_size

mc-conf

Specify the integer value to use as the batch size for sending records to Kafka.

Note

Changed: RELEASE.2023-12-02T10-51-33Z

MinIO previously limited this value to 100.

Queue Directory

Optional

MINIO_NOTIFY_KAFKA_QUEUE_DIR

envvar

notify_kafka queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the Kafka server/broker is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_KAFKA_QUEUE_LIMIT

envvar

notify_kafka queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_KAFKA_COMMENT

envvar

notify_kafka comment

mc-conf

Specify a comment to associate with the Kafka configuration.

Compression Codec

Note

Added: MinIO

Server RELEASE.2023-12-09T18-17-51Z

Optional

MINIO_NOTIFY_KAFKA_PRODUCER_COMPRESSION_CODEC

envvar

notify_kafka compression_codec

mc-conf

Specify the compression codec to use when sending records to Kafka.

Supports the following values:

  • none
  • snappy
  • gzip
  • lz4
  • zstd

Compression Level

Note

Added: MinIO

Server RELEASE.2023-12-09T18-17-51Z

Optional

MINIO_NOTIFY_KAFKA_PRODUCER_COMPRESSION_LEVEL

envvar

notify_kafka compression_level

mc-conf

Controls the level of compression applied based on the configured compression codec.

Specify an integer value greater than or equal to 0. The effect of the value depends on the selected codec.

12.1.6.4 - MQTT Notification Settings

This page documents settings for configuring an MQTT service as a target for Bucket Notifications. See Publish Events to MQTT for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Multiple MQTT Targets

You can specify multiple MQTT service endpoints by appending a unique identifier _ID for each set of related MQTT settings to the top level key. For example, the following commands set two distinct MQTT service endpoints as PRIMARY and SECONDARY, respectively:

Environment Variables
export MINIO_NOTIFY_MQTT_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_MQTT_BROKER_PRIMARY="tcp://user:[email protected]:1883"

export MINIO_NOTIFY_MQTT_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_MQTT_BROKER_SECONDARY="tcp://user:[email protected]:1883"
Configuration Setting
mc admin config set notify_mqtt:primary \
   broker="tcp://endpoint:port" \
   topic="minio/bucket-name/events/" \
   username="username" \
   password="password" \
   [ARGUMENT="VALUE"] ... \

mc admin config set notify_mqtt:secondary \
   broker="tcp://endpoint:port" \
   topic="minio/bucket-name/events/" \
   username="username" \
   password="password" \
   [ARGUMENT="VALUE"] ... \

With these settings, MINIO_NOTIFY_MQTT_ENABLE_PRIMARY indicates the environment variable is associated to an MQTT service endpoint with an ID of PRIMARY.

Settings

Enable

Required

MINIO_NOTIFY_MQTT_ENABLE

envvar

Specify on to enable publishing bucket notifications to an MQTT endpoint.

Defaults to off.

notify_mqtt

mc-conf

The top-level configuration key for defining an MQTT server/broker endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an MQTT server/broker endpoint. The following arguments are required for each endpoint:

  • broker
  • topic
  • username Optional if MQTT server/broker does not enforce authentication/authorization
  • password Optional if MQTT server/broker does not enforce authentication/authorization

Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_mqtt \
   broker="tcp://endpoint:port" \
   topic="minio/bucket-name/events/" \
   username="username" \
   password="password" \
   [ARGUMENT="VALUE"] ... \

Broker

Required

MINIO_NOTIFY_MQTT_BROKER

envvar

notify_mqtt broker

mc-conf

Specify the MQTT server/broker endpoint. MinIO supports TCP, TLS, or Websocket connections to the server/broker URL. For example:

  • tcp://mqtt.example.net:1883
  • tls://mqtt.example.net:1883
  • ws://mqtt.example.net:1883
Note

Changed: RELEASE.2023-05-27T05-56-19Z

MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.

Topic

Required

MINIO_NOTIFY_MQTT_TOPIC

envvar

notify_mqtt topic

mc-conf

Specify the name of the MQTT topic to associate with events published by MinIO to the MQTT endpoint.

Username

Required if the MQTT server/broker enforces authentication/authorization

MINIO_NOTIFY_MQTT_USERNAME

envvar

notify_mqtt username

mc-conf

Specify the MQTT username MinIO should use to authenticate to the MQTT server/broker.

Password

Required if the MQTT server/broker enforces authentication/authorization

MINIO_NOTIFY_MQTT_PASSWORD

envvar

notify_mqtt password

mc-conf

Specify the password for the MQTT username MinIO uses to authenticate to the MQTT server/broker.

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

Quality of Service

Optional

MINIO_NOTIFY_MQTT_QOS

envvar

notify_mqtt qos

mc-conf

Specify the Quality of Service priority for the published events.

Defaults to 0.

Keep Alive Interval

Optional

MINIO_NOTIFY_MQTT_KEEP_ALIVE_INTERVAL

envvar

notify_mqtt keep_alive_interval

mc-conf

Specify the keep-alive interval for the MQTT connections. MinIO supports the following units of time measurement:

  • s - seconds, “60s”
  • m - minutes, “60m”
  • h - hours, “24h”
  • d - days, “7d”

Reconnect Interval

Optional

MINIO_NOTIFY_MQTT_RECONNECT_INTERVAL

envvar

notify_mqtt reconnect_interval

mc-conf

Specify the reconnect interval for the MQTT connections. MinIO supports the following units of time measurement:

  • s - seconds, “60s”
  • m - minutes, “60m”
  • h - hours, “24h”
  • d - days, “7d”

Queue Directory

Optional

MINIO_NOTIFY_MQTT_QUEUE_DIR

envvar

notify_mqtt queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the MQTT server/broker is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_MQTT_QUEUE_LIMIT

envvar

notify_mqtt queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_MQTT_COMMENT

envvar

notify_mqtt comment

mc-conf

Specify a comment to associate with the MQTT configuration.

12.1.6.5 - MySQL Notification Settings

This page documents settings for configuring a MYSQL service as a target for Bucket Notifications. See Publish Events to MySQL for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Multiple MYSQL Targets

You can specify multiple MySQL service endpoints by appending a unique identifier _ID for each set of related MySQL settings on to the top level key.

Examples

The following commands set two distinct MySQL service endpoints as PRIMARY and SECONDARY respectively:

export MINIO_NOTIFY_MYSQL_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_MYSQL_DSN_STRING_PRIMARY="username:password@tcp(mysql.example.com:3306)/miniodb"
export MINIO_NOTIFY_MYSQL_TABLE_PRIMARY="minioevents"
export MINIO_NOTIFY_MYSQL_FORMAT_PRIMARY="namespace"

export MINIO_NOTIFY_MYSQL_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_MYSQL_DSN_STRING_SECONDARY="username:password@tcp(mysql.example.com:3306)/miniodb"
export MINIO_NOTIFY_MYSQL_TABLE_SECONDARY="minioevents"
export MINIO_NOTIFY_MYSQL_FORMAT_SECONDARY="namespace"

With these settings, MINIO_NOTIFY_MYSQL_ENABLE_PRIMARY indicates the environment variable is associated to a MySQL service endpoint with ID of PRIMARY.

mc admin config set notify_mysql:primary \
   dsn_string="username:password@tcp(mysql.example.com:3306)/miniodb"
   table="minioevents" \
   format="namespace" \
   [ARGUMENT=VALUE ...]

mc admin config set notify_mysql:secondary \
   dsn_string="username:password@tcp(mysql.example.com:3306)/miniodb"
   table="minioevents" \
   format="namespace" \
   [ARGUMENT=VALUE ...]

Settings

Enable

Required

MINIO_NOTIFY_MYSQL_ENABLE

envvar

Specify on to enable publishing bucket notifications to a MySQL service endpoint.

Defaults to off.

Requires specifying the following additional environment variables if set to on:

notify_mysql

mc-conf

The top-level configuration key for defining an MySQL service endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an MySQL service endpoint. The following arguments are required for each target:

Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_mysql \
  dsn_string="username:password@tcp(mysql.example.com:3306)/miniodb"
  table="minioevents" \
  format="namespace" \
  [ARGUMENT="VALUE"] ... \

Data Source Name (DSN) String

Required

MINIO_NOTIFY_MYSQL_DSN_STRING

envvar

notify_mysql dsn_string

mc-conf

Specify the data source name (DSN) of the MySQL service endpoint. MinIO expects the following format:

<user>:<password>@tcp(<host>:<port>)/<database>

For example:

"username:password@tcp(mysql.example.com:3306)/miniodb"

Note

Changed: RELEASE.2023-05-27T05-56-19Z

MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.

Table

Required

MINIO_NOTIFY_MYSQL_TABLE

envvar

notify_mysql table

mc-conf

Specify the name of the MySQL table to which MinIO publishes event notifications.

Format

Required

MINIO_NOTIFY_MYSQL_FORMAT

envvar

notify_mysql format

mc-conf

Specify the format of event data written to the MySQL service endpoint. MinIO supports the following values:

namespace

For each bucket event, MinIO creates a JSON document with the bucket and object name from the event as the document ID and the actual event as part of the document body. Additional updates to that object modify the existing table entry for that object. Similarly, deleting the object also deletes the corresponding table entry.

access

For each bucket event, MinIO creates a JSON document with the event details and appends it to the table with a MySQL-generated random ID. Additional updates to an object result in new index entries, and existing entries remain unmodified.

Max Open Connections

Optional

MINIO_NOTIFY_MYSQL_MAX_OPEN_CONNECTIONS

envvar

notify_mysql max_open_connections

mc-conf

Specify the maximum number of open connections to the MySQL database.

Defaults to 2.

Queue Directory

Optional

MINIO_NOTIFY_MYSQL_QUEUE_DIR

envvar

notify_mysql queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the MySQL server/broker is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_MYSQL_QUEUE_LIMIT

envvar

notify_mysql queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_MYSQL_COMMENT

envvar

notify_mysql comment

mc-conf

Specify a comment to associate with the MySQL configuration.

12.1.6.6 - NATS Notification Settings

Note

NATS Streaming Deprecated

NATS Streaming is deprecated. Migrate to JetStream instead.

The related MinIO configuration options and environment variables are deprecated.

This page documents settings for configuring an NATS service as a target for Bucket Notifications. See Publish Events to NATS for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Multiple NATS Targets

You can specify multiple NATS service endpoints by appending a unique identifier _ID for each set of related NATS settings on to the top level key.

Example

For example, the following commands set two distinct NATS service endpoints as PRIMARY and SECONDARY respectively:

export MINIO_NOTIFY_NATS_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_NATS_ADDRESS_PRIMARY="nats-endpoint.example.net:4222"

export MINIO_NOTIFY_NATS_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_NATS_ADDRESS_SECONDARY="nats-endpoint.example.net:4222"

With these settings, MINIO_NOTIFY_NATS_ENABLE_PRIMARY indicates the environment variable is associated to an NATS service endpoint with ID of PRIMARY.

mc admin config set notify_nats:primary \
   address="nats-endpoint.example.com:4222" \
   subject="minioevents" \
   [ARGUMENT=VALUE ...]

mc admin config set notify_nats:secondary \
   address="nats-endpoint.example.com:4222" \
   subject="minioevents" \
   [ARGUMENT=VALUE ...]

Settings

Enable

Required

MINIO_NOTIFY_NATS_ENABLE

envvar

Specify on to enable publishing bucket notifications to an NATS service endpoint.

Defaults to off.

notify_nats

mc-conf

The top-level configuration key for defining an NATS service endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an NATS service endpoint. The address and subject arguments are required for each target. Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_nats \
  address="nats-endpoint.example.com:4222" \
  subject="minioevents" \
  [ARGUMENT="VALUE"] ... \

Address

Required

MINIO_NOTIFY_NATS_ADDRESS

envvar

notify_nats address

mc-conf

Specify the NATS service endpoint to which MinIO publishes bucket events. For example, nats-endpoint.example.com:4222.

Note

Changed: RELEASE.2023-05-27T05-56-19Z

MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.

Subject

Required

MINIO_NOTIFY_NATS_SUBJECT

envvar

notify_nats subject

mc-conf

Specify the subscription to which MinIO associates events published to the NATS endpoint.

Username

Optional

MINIO_NOTIFY_NATS_USERNAME

envvar

notify_nats username

mc-conf

Specify the username for connecting to the NATS service endpoint.

Password

Optional

MINIO_NOTIFY_NATS_PASSWORD

envvar

notify_nats password

mc-conf

Specify the passport for connecting to the NATS service endpoint.

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

Token

Optional

MINIO_NOTIFY_NATS_TOKEN

envvar

notify_nats token

mc-conf

Specify the token for connecting to the NATS service endpoint.

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

User Credentials File

Optional

MINIO_NOTIFY_NATS_USER_CREDENTIALS

envvar

notify_nats user_credentials

mc-conf

Specify the user credentials file to use to connect to the NATS service endpoint.

TLS

Optional

MINIO_NOTIFY_NATS_TLS

envvar

notify_nats tls

mc-conf

Specify on to enable TLS connectivity to the NATS service endpoint.

TLS Skip Verify

Optional

MINIO_NOTIFY_NATS_TLS_SKIP_VERIFY

envvar

notify_nats tls_skip_verify

mc-conf

Enables or disables TLS verification of the NATS service endpoint TLS certificates.

  • Specify on to disable TLS verification (Default).
  • Specify off to enable TLS verification.

Ping Interval

Optional

MINIO_NOTIFY_NATS_PING_INTERVAL

envvar

notify_nats ping_interval

mc-conf

Specify the duration interval for client pings to the NATS server. MinIO supports the following time units:

  • s - seconds, "60s"
  • m - minutes, "5m"
  • h - hours, "1h"
  • d - days, "1d"

Jetstream

Optional

MINIO_NOTIFY_NATS_JETSTREAM

envvar

notify_nats jetstream

mc-conf

Specify on to enable JetStream support for streaming events to a NATS JetStream service endpoint.

Streaming

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING

envvar

notify_nats streaming

mc-conf

Specify on to enable asynchronous publishing of events to the NATS service endpoint.

Streaming Async

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING_ASYNC

envvar

notify_nats streaming_async

mc-conf

Specify on to enable asynchronous publishing of events to the NATS service endpoint.

Max ACK Responses In Flight

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING_MAX_PUB_ACKS_IN_FLIGHT

envvar

notify_nats streaming_max_pub_acks_in_flight

mc-conf

Specify the number of messages to publish without waiting for an ACK response from the NATS service endpoint.

Streaming Cluster ID

Deprecated

Optional

MINIO_NOTIFY_NATS_STREAMING_CLUSTER_ID

envvar

notify_nats streaming_cluster_id

mc-conf

Specify the unique ID for the NATS streaming cluster.

Cert Authority

Optional

MINIO_NOTIFY_NATS_CERT_AUTHORITY

envvar

notify_nats cert_authority

mc-conf

Specify the path to the Certificate Authority chain used to sign the NATS service endpoint TLS certificates.

Client Cert

Optional

MINIO_NOTIFY_NATS_CLIENT_CERT

envvar

notify_nats client_cert

mc-conf

Specify the path to the client certificate to use for performing mTLS authentication to the NATS service endpoint.

Client Key

Optional

MINIO_NOTIFY_NATS_CLIENT_KEY

envvar

notify_nats client_key

mc-conf

Specify the path to the client private key to use for performing mTLS authentication to the NATS service endpoint.

Queue Directory

Optional

MINIO_NOTIFY_NATS_QUEUE_DIR

envvar

notify_nats queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the NATS server/broker is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_NATS_QUEUE_LIMIT

envvar

notify_nats queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_NATS_COMMENT

envvar

notify_nats comment

mc-conf

Specify a comment to associate with the NATS configuration.

12.1.6.7 - NSQ Notification Settings

This page documents settings for configuring an NSQ service as a target for Bucket Notifications. See Publish Events to NSQ for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Multiple NSQ Targets

You can specify multiple NSQ service endpoints by appending a unique identifier _ID to the end of the top level key for each set of related NSQ settings. For example, the following commands set two distinct NSQ service endpoints as PRIMARY and SECONDARY respectively:

Environment Variables
export MINIO_NOTIFY_NSQ_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_NSQ_NSQD_ADDRESS_PRIMARY="https://user:[email protected]:9200"
export MINIO_NOTIFY_NSQ_TOPIC_PRIMARY="bucketevents"

export MINIO_NOTIFY_NSQ_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_NSQ_NSQD_ADDRESS_SECONDARY="https://user:[email protected]:9200"
export MINIO_NOTIFY_NSQ_TOPIC_SECONDARY="bucketevents"
Configuration Settings
mc admin config set notify_nsq:primary \
   nsqd_address="ENDPOINT" \
   topic="<string>" \
   [ARGUMENT="VALUE"] ... \

mc admin config set notify_nsq:secondary \
   nsqd_address="ENDPOINT" \
   topic="<string>" \
   [ARGUMENT="VALUE"] ... \

Settings

Enable

Required

MINIO_NOTIFY_NSQ_ENABLE

envvar

Specify on to enable publishing bucket notifications to an NSQ endpoint.

notify_nsq

mc-conf

The top-level configuration key for defining an NSQ server/broker endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an NSQ server/broker endpoint. The following arguments are required for each endpoint:

Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_nsq                          \
   nsqd_address="https://nsq-endpoint.example.net:4150" \
   topic="<string>"                                     \
   [ARGUMENT="VALUE"] ...

NSQ Daemon Server Address

Required

MINIO_NOTIFY_NSQ_NSQD_ADDRESS

envvar

notify_nsq nsqd_address

mc-conf

Specify the NSQ server address where the NSQ Daemon runs. For example:

https://nsq-endpoint.example.net:4150

Note

Changed: RELEASE.2023-05-27T05-56-19Z

MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.

Topic

Required

MINIO_NOTIFY_NSQ_TOPIC

envvar

notify_nsq topic

mc-conf

Specify the name of the NSQ topic MinIO uses when publishing events to the broker.

TLS

Optional

MINIO_NOTIFY_NSQ_TLS

envvar

notify_nsq tls

mc-conf

Specify on to enable TLS connectivity to the NSQ service broker.

TLS Skip Verify

Optional

MINIO_NOTIFY_NSQ_TLS_SKIP_VERIFY

envvar

notify_nsq tls_skip_verify

mc-conf

Enables or disables TLS verification of the NSQ service broker TLS certificates.

  • Specify on to disable TLS verification (Default).
  • Specify off to enable TLS verification.

Queue Directory

Optional

MINIO_NOTIFY_NSQ_QUEUE_DIR

envvar

notify_nsq queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the NSQ server/broker is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_NSQ_QUEUE_LIMIT

envvar

notify_nsq queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_NSQ_COMMENT

envvar

notify_nsq comment

mc-conf

Specify a comment to associate with the NSQ configuration.

12.1.6.8 - PostgreSQL Notification Settings

This page documents settings for configuring an POSTGRES service as a target for Bucket Notifications. See Publish Events to PostgreSQL for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Multiple PostgreSQL Targets

You can specify multiple PostgreSQL service endpoints by appending a unique identifier _ID for each set of related PostgreSQL settings on to the top level key. For example, the following commands set two distinct PostgreSQL service endpoints as PRIMARY and SECONDARY respectively:

Environment Variables
export MINIO_NOTIFY_POSTGRES_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_POSTGRES_CONNECTION_STRING_PRIMARY="host=postgresql-endpoint.example.net port=4222..."
export MINIO_NOTIFY_POSTGRES_TABLE_PRIMARY="minioevents"
export MINIO_NOTIFY_POSTGRES_FORMAT_PRIMARY="namespace"

export MINIO_NOTIFY_POSTGRES_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_POSTGRES_CONNECTION_STRING_SECONDARY="host=postgresql-endpoint.example.net port=4222..."
export MINIO_NOTIFY_POSTGRES_TABLE_SECONDARY="minioevents"
export MINIO_NOTIFY_POSTGRES_FORMAT_SECONDARY="namespace"
Configuration Settings
mc admin config set notify_postgres:primary \
   connection_string="host=postgresql.example.com port=5432..."
   table="minioevents" \
   format="namespace" \
   [ARGUMENT=VALUE ...]

mc admin config set notify_postgres:secondary \
   connection_string="host=postgresql.example.com port=5432..."
   table="minioevents" \
   format="namespace" \
   [ARGUMENT=VALUE ...]

With these settings, MINIO_NOTIFY_POSTGRES_ENABLE_PRIMARY indicates the environment variable is associated to an PostgreSQL service endpoint with ID of PRIMARY.

Settings

Enable

Required

MINIO_NOTIFY_POSTGRES_ENABLE

envvar

Specify on to enable publishing bucket notifications to a PostgreSQL service endpoint.

Defaults to off.

Requires specifying the following additional environment variables if set to on:

notify_postgres

mc-conf

The top-level configuration key for defining an PostgreSQL service endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an PostgreSQL service endpoint. The following arguments are required for each target:

Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_postgres                            \
  connection_string="host=postgresql.example.com port=5432..." \
  table="minioevents"                                          \
  format="namespace"                                           \
  [ARGUMENT="VALUE"] ...

Connection String

Required

MINIO_NOTIFY_POSTGRES_CONNECTION_STRING

envvar

notify_postgres connection_string

mc-conf

Specify the URI connection string of the PostgreSQL service endpoint. MinIO supports key=value format for the PostgreSQL connection string. For example:

"host=https://postgresql.example.com port=5432 ..."

For more complete documentation on supported PostgreSQL connection string parameters, see the PostgreSQL Connection Strings documentation.

Note

Changed: RELEASE.2023-05-27T05-56-19Z

MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.

Table

Required

MINIO_NOTIFY_POSTGRES_TABLE

envvar

notify_postgres table

mc-conf

Specify the name of the PostgreSQL table to which MinIO publishes event notifications.

Format

Required

MINIO_NOTIFY_POSTGRES_FORMAT

envvar

notify_postgres format

mc-conf

Specify the format of event data written to the PostgreSQL service endpoint. MinIO supports the following values:

namespace

For each bucket event, MinIO creates a JSON document with the bucket and object name from the event as the document ID and the actual event as part of the document body. Additional updates to that object modify the existing table entry for that object. Similarly, deleting the object also deletes the corresponding table entry.

access

For each bucket event, MinIO creates a JSON document with the event details and appends it to the table with a PostgreSQL-generated random ID. Additional updates to an object result in new index entries, and existing entries remain unmodified.

Max Open Connections

Optional

MINIO_NOTIFY_POSTGRES_MAX_OPEN_CONNECTIONS

envvar

notify_postgres max_open_connections

mc-conf

Specify the maximum number of open connections to the PostgreSQL database.

Defaults to 2.

Queue Directory

Optional

MINIO_NOTIFY_POSTGRES_QUEUE_DIR

envvar

notify_postgres queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the PostgreSQL server/broker is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_POSTGRES_QUEUE_LIMIT

envvar

notify_postgres queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_POSTGRES_COMMENT

envvar

notify_postgres comment

mc-conf

Specify a comment to associate with the PostgreSQL configuration.

12.1.6.9 - Redis Notification Settings

This page documents settings for configuring a Redis service as a target for Bucket Notifications. See Publish Events to Redis for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Multiple Redis Targets

You can specify multiple Redis service endpoints by appending a unique identifier _ID to the end of the top level key for each set of related Redis settings. For example, the following commands set two distinct Redis service endpoints as PRIMARY and SECONDARY respectively:

Environment Variables
export MINIO_NOTIFY_REDIS_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_REDIS_ADDRESS_PRIMARY="redis-endpoint.example.net:9200"
export MINIO_NOTIFY_REDIS_KEY_PRIMARY="bucketevents"
export MINIO_NOTIFY_REDIS_FORMAT_PRIMARY="namespace"


export MINIO_NOTIFY_REDIS_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_REDIS_REDIS_ADDRESS_SECONDARY="redis-endpoint2.example.net:9200"
export MINIO_NOTIFY_REDIS_KEY_SECONDARY="bucketevents"
export MINIO_NOTIFY_REDIS_FORMAT_SECONDARY="namespace"
Configuration Settings
mc admin config set notify_redis:primary              \
   address="redis-endpoint.example.net:9200"  \
   key="bucketevents"                                 \
   format="namespace"                                 \
   [ARGUMENT="VALUE"] ...                             \

mc admin config set notify_redis:secondary            \
   address="redis-endpoint2.example.net:9200" \
   key="bucketevents"                                 \
   format="namespace"                                 \
   [ARGUMENT="VALUE"] ...

Settings

Enable

Required

MINIO_NOTIFY_REDIS_ENABLE

envvar

Specify on to enable publishing bucket notifications to a Redis service endpoint.

Defaults to off.

Requires specifying the following additional environment variables if set to on:

notify_redis

mc-conf

The top-level configuration key for defining an Redis server/broker endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an Redis server/broker endpoint. The following arguments are required for each endpoint:

Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_redis \
   address="ENDPOINT" \
   key="<string>" \
   format="<string>" \
   [ARGUMENT="VALUE"] ... \

Address

Required

MINIO_NOTIFY_REDIS_ADDRESS

envvar

notify_redis address

mc-conf

Specify the Redis service endpoint to which MinIO publishes bucket events. For example, redis.example.com:6369.

Note

Changed: RELEASE.2023-05-27T05-56-19Z

MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.

Key

Required

MINIO_NOTIFY_REDIS_KEY

envvar

notify_redis key

mc-conf

Specify the Redis key to use for storing and updating events. Redis auto-creates the key if it does not exist.

Format

Required

MINIO_NOTIFY_REDIS_FORMAT

envvar

notify_redis format

mc-conf

Specify the format of event data written to the Redis service endpoint. MinIO supports the following values:

namespace

For each bucket event, MinIO creates a JSON document with the bucket and object name from the event as the document ID and the actual event as part of the document body. Additional updates to that object modify the existing index entry for that object. Similarly, deleting the object also deletes the corresponding index entry.

access

For each bucket event, MinIO creates a JSON document with the event details and appends it to the key with a Redis-generated random ID. Additional updates to an object result in new index entries, and existing entries remain unmodified.

Password

Optional

MINIO_NOTIFY_REDIS_PASSWORD

envvar

notify_redis password

mc-conf

Specify the password for the Redis server.

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

User

Optional

Note

Added: RELEASE.2024-03-21T23-13-43Z

MINIO_NOTIFY_REDIS_USER

envvar

notify_redis user

mc-conf

Specify the user for the Redis server.

Queue Directory

Optional

MINIO_NOTIFY_REDIS_QUEUE_DIR

envvar

notify_redis queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the Redis server/broker is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_REDIS_QUEUE_LIMIT

envvar

notify_redis queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Comment

Optional

MINIO_NOTIFY_REDIS_COMMENT

envvar

notify_redis comment

mc-conf

Specify a comment to associate with the Redis configuration.

12.1.6.10 - Webhook Service Notification Settings

This page documents settings for configuring an Webhook service as a target for Bucket Notifications. See Publish Events to Webhook for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Multiple Webhook Service Targets

You can specify multiple Webhook service endpoints by appending a unique identifier _ID for each set of related Webhook settings on to the top level key. For example, the following commands set two distinct Webhook service endpoints as PRIMARY and SECONDARY respectively:

Environment Variables
export MINIO_NOTIFY_WEBHOOK_ENABLE_PRIMARY="on"
export MINIO_NOTIFY_WEBHOOK_ENDPOINT_PRIMARY="https://webhook1.example.net"

export MINIO_NOTIFY_WEBHOOK_ENABLE_SECONDARY="on"
export MINIO_NOTIFY_WEBHOOK_ENDPOINT_SECONDARY="https://webhook1.example.net"
Configuration Settings
mc admin config set notify_webhook:primary \
   endpoint="https://webhook1.example.net"
   [ARGUMENT=VALUE ...]

mc admin config set notify_webhook:secondary \
   endpoint="https://webhook2.example.net
   [ARGUMENT=VALUE ...]

Settings

Enable

Required

MINIO_NOTIFY_WEBHOOK_ENABLE

envvar

Specify on to enable publishing bucket notifications to a Webhook service endpoint.

Defaults to off.

notify_webhook

mc-conf

The top-level configuration key for defining an Webhook service endpoint for use with MinIO bucket notifications.

Use mc admin config set to set or update an Webhook service endpoint. The endpoint argument is required for each target. Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set notify_webhook \
  endpoint="https://webhook.example.net"
  [ARGUMENT="VALUE"] ... \

Endpoint

Required

MINIO_NOTIFY_WEBHOOK_ENDPOINT

envvar

notify_webhook endpoint

mc-conf

Specify the URL for the webhook service.

Note

Changed: RELEASE.2023-05-27T05-56-19Z

MinIO checks the health of the specified URL (if it is resolvable and reachable) prior to adding the target. MinIO no longer blocks adding new notification targets if existing targets are offline.

Auth Token

Required

MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN

envvar

An authentication token of the appropriate type for the endpoint. Omit for endpoints which do not require authentication.

To allow for a variety of token types, MinIO creates the request authentication header using the value exactly as specified. Depending on the endpoint, you may need to include additional information.

For example, for a Bearer token, prepend Bearer:

export MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN_myendpoint="Bearer 1a2b3c4f5e"

Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:

export MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN_xyz="ServiceXYZ 1a2b3c4f5e"

Consult the documentation for the desired service for more details.

notify_webhook auth_token

mc-conf

An authentication token of the appropriate type for the endpoint. Omit for endpoints which do not require authentication.

To allow for a variety of token types, MinIO creates the request authentication header using the value exactly as specified. Depending on the endpoint, you may need to include additional information.

For example, for a Bearer token, prepend Bearer:

   mc admin config set myminio notify_webhook   \
   endpoint="https://webhook-1.example.net"  \
      auth_token="Bearer 1a2b3c4f5e"

Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:

   mc admin config set myminio notify_webhook   \
      endpoint="https://webhook-1.example.net"  \
      auth_token="ServiceXYZ 1a2b3c4f5e"

Consult the documentation for the desired service for more details.

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

Queue Directory

Optional

MINIO_NOTIFY_WEBHOOK_QUEUE_DIR

envvar

notify_webhook queue_dir

mc-conf

Specify the directory path to enable MinIO’s persistent event store for undelivered messages, such as /opt/minio/events.

MinIO stores undelivered events in the specified store while the webhook service is offline and replays the stored events when connectivity resumes.

Queue Limit

Optional

MINIO_NOTIFY_WEBHOOK_QUEUE_LIMIT

envvar

notify_webhook queue_limit

mc-conf

Specify the maximum limit for undelivered messages. Defaults to 100000.

Client Certificate

Optional

MINIO_NOTIFY_WEBHOOK_CLIENT_CERT

envvar

notify_webhook client_cert

mc-conf

Specify the path to the client certificate to use for performing mTLS authentication to the webhook service.

Client Key

Optional

MINIO_NOTIFY_WEBHOOK_CLIENT_KEY

envvar

notify_webhook client_key

mc-conf

Specify the path to the client private key to use for performing mTLS authentication to the webhook service.

12.1.7 - Identity and Access Management Settings

The pages in this section document settings for configuring MinIO to work with identity and access management (IAM) solutions. There is a page of settings for each of the IAM methods MinIO supports.

12.1.7.1 - Active Directory / LDAP Settings

This page documents settings for enabling external identity management using an Active Directory or LDAP service. See Configure MinIO for Authentication using Active Directory / LDAP for a tutorial on using these settings.

Warning

Important

New in version RELEASE.2023-05-26T23-31-54Z:

mc idp ldap commands are preferred over using configuration settings to configure MinIO to use Active Directory or LDAP for identity management.

MinIO recommends using the mc idp ldap commands for LDAP management operations. These commands offer better validation and additional features, while providing the same settings as the identity_ldap configuration key. See Configure MinIO for Authentication using Active Directory / LDAP for a tutorial on using mc idp ldap.

The identity_ldap configuration settings remains available for existing scripts and other tools.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Examples

MINIO_IDENTITY_LDAP_SERVER_ADDR="ldapserver.com:636"
Note

Note

srv_record_name automatically identifies the port.

If your AD/LDAP server uses DNS SRV Records, do not append the port number to your server_addr value. SRV requests automatically include port numbers when returning the list of available servers.

identity_ldap

mc-conf

The following settings are required when defining LDAP using mc admin config set:

  • enabled
  • server_addr
  • lookup_bind_dn
  • lookup_bind_dn_password
  • user_dn_search_base_dn
  • user_dn_search_filter
mc admin config set identity_ldap                        \
   enabled="true"                                        \
   server_addr="ad-ldap.example.net/"                    \
   lookup_bind_dn="cn=miniolookupuser,dc=example,dc=net" \
   lookup_bind_dn_password="userpassword"                \
   user_dn_search_base_dn="dc=example,dc=net"            \
   user_dn_search_filter="(&(objectCategory=user)(sAMAccountName=%s))"

Settings

Server Address

Required

MINIO_IDENTITY_LDAP_SERVER_ADDR

envvar

Specify the hostname for the Active Directory / LDAP server. For example:

ldapserver.com:636
Note

srv_record_name automatically identifies the port

If your AD/LDAP server uses DNS SRV Records, do not append the port number to your server_addr value. SRV requests automatically include port numbers when returning the list of available servers.

identity_ldap server_addr

mc-conf

Specify the hostname for the Active Directory / LDAP server. For example:

ldapserver.com:636
Note

srv_record_name automatically identifies the port

If your AD/LDAP server uses DNS SRV Records, do not append the port number to your server_addr value. SRV requests automatically include port numbers when returning the list of available servers.

Lookup Bind DN

Required

MINIO_IDENTITY_LDAP_LOOKUP_BIND_DN

envvar

identity_ldap lookup_bind_dn

mc-conf

Specify the Distinguished Name (DN) for an AD/LDAP account MinIO uses when querying the AD/LDAP server. Enables Lookup-Bind authentication to the AD/LDAP server.

The DN account should be a read-only access keys with sufficient privileges to support querying performing user and group lookups.

Lookup Bind Password

Required

MINIO_IDENTITY_LDAP_LOOKUP_BIND_PASSWORD

envvar

identity_ldap lookup_bind_password

mc-conf

Specify the password for the Lookup-Bind user account.

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

User DN Search Base DN

Required

MINIO_IDENTITY_LDAP_USER_DN_SEARCH_BASE_DN

envvar

identity_ldap user_dn_search_base_dn

mc-conf

Specify the base Distinguished Name (DN) MinIO uses when querying for user credentials matching those provided by an authenticating client.

Separate multiple DNs with a semicolon (;).

For example:

cn=miniousers,dc=myldapserver,dc=net;ou=swengg,dc=min,dc=io

Supports Lookup-Bind mode.

User DN Search Filter

Required

MINIO_IDENTITY_LDAP_USER_DN_SEARCH_FILTER

envvar

identity_ldap user_dn_search_filter

mc-conf

Specify the AD/LDAP search filter MinIO uses when querying for user credentials matching those provided by an authenticating client.

Use the %s substitution character to insert the client-specified username into the search string. For example:

(userPrincipalName=%s)

User DN Attributes

Optional

MINIO_IDENTITY_LDAP_USER_DN_ATTRIBUTES

envvar

identity_ldap user_dn_attributes

mc-conf

Note

Added: RELEASE.2024-06-06T09-36-42Z

Comma-separated list of user DN attributes.

Some valid values include, uid,cn,mail,sshPublicKey.

To enable public authentication for LDAP users, pass sshPublicKey as a DN attribute. The user can then use the passed SSH Public Key to log in to SFTP servers.

mc idp ldap update ALIAS user_dn_attributes=sshPublicKey

Enabled

Optional

This setting does not have an environment variable option. Use the configuration setting instead.

identity_ldap enabled

mc-conf

Set to false to disable the AD/LDAP configuration.

If false, applications cannot generate STS credentials or otherwise authenticate to MinIO using the configured provider.

Defaults to true or “enabled”.

Group Search Filter

Optional

MINIO_IDENTITY_LDAP_GROUP_SEARCH_FILTER

envvar

identity_ldap group_search_filter

mc-conf

Specify an AD/LDAP search filter for performing group lookups for the authenticated user

Use the %s substitution character to insert the client-specified username into the search string. Use the %d substitution character to insert the Distinguished Name of the client-specified username into the search string.

For example:

(&(objectclass=groupOfNames)(memberUid=%s))

When providing an AD/LDAP group search filter, configure a filter that returns the minimum number of relevant groups for the purpose of supporting authentication. Filters that return large group assignments increase the size of associated calls and resources. Functions sensitive to large request or response bodies may exhibit unexpected behaviors as a result.

When providing an AD/LDAP group search filter, configure a filter that returns the minimum number of relevant groups for the purpose of supporting authentication. Filters that return large group assignments increase the size of associated calls and resources. Functions sensitive to large request or response bodies may exhibit unexpected behaviors as a result.

Group Search Base DN

Optional

MINIO_IDENTITY_LDAP_GROUP_SEARCH_BASE_DN

envvar

identity_ldap group_search_base_dn

mc-conf

Specify a semicolon-separated (;) list of group search base Distinguished Names MinIO uses when performing group lookups.

For example:

cn=miniogroups,dc=myldapserver,dc=net;ou=swengg,dc=min,dc=io

TLS Skip Verify

Optional

MINIO_IDENTITY_LDAP_TLS_SKIP_VERIFY

envvar

identity_ldap tls_skip_verify

mc-conf

Specify on to trust the AD/LDAP server TLS certificates without verification. This option may be required if the AD/LDAP server TLS certificates are signed by an untrusted Certificate Authority (e.g. self-signed).

Defaults to off

Server Insecure

Optional

MINIO_IDENTITY_LDAP_SERVER_INSECURE

envvar

identity_ldap server_insecure

mc-conf

Specify on to allow unsecured (non-TLS encrypted) connections to the AD/LDAP server.

MinIO sends AD/LDAP user credentials in plain text to the AD/LDAP server, such that enabling TLS is required to prevent reading credentials over the wire. Using this option presents a security risk where any user with access to network traffic can observe the unencrypted plaintext credentials.

Defaults to off.

Server Start TLS

Optional

MINIO_IDENTITY_LDAP_SERVER_STARTTLS

envvar

identity_ldap server_starttls

mc-conf

Specify on to enable StartTLS connections to an AD/LDAP server.

Defaults to off

For more about StartTLS, refer to section 4.14 of the LDAP RFC 4511 specification.

SRV Record Name

Optional

Note

Added: RELEASE.2022-12-12T19-27-27Z

MINIO_IDENTITY_LDAP_SRV_RECORD_NAME

envvar

identity_ldap srv_record_name

mc-conf

Specify the appropriate value to enable MinIO to select an AD/LDAP server using a DNS SRV record request.

When enabled, MinIO selects an AD/LDAP server by:

  • Constructing the target SRV record name following standard naming conventions.
  • Requesting a list of available AD/LDAP servers.
  • Choosing an appropriate target based on priority and weight.

The configuration examples below presume the AD/LDAP server address is set to example.com and the SRV record protocol is _tcp.

For SRV record names beginning with _ldap, specify ldap. The constructed DNS SRV record name resembles the following:

_ldap._tcp.example.com

For SRV record names with beginning with _ldaps, specify ldaps. The constructed DNS SRV record name resembles the following:

_ldaps._tcp.example.com

If your DNS SRV record name uses alternate service or protocol names, specify on and provide the full record name as your LDAP server address. Example: _ldapserver._specialtcp.example.com

For more about DNS SRV records, see DNS SRV Records for LDAP.

Note

Server address for DNS SRV record configurations

The specified server name must not include a port number. This is different from a standard AD/LDAP configuration, where the port number is required.

See server_addr or MINIO_IDENTITY_LDAP_SERVER_ADDR for more about configuring an AD/LDAP server address.

Comment

Optional

MINIO_IDENTITY_LDAP_COMMENT

envvar

identity_ldap identity_ldap comment

mc-conf

Specify a comment to associate to the AD/LDAP configuration.

12.1.7.2 - OpenID Identity Management Settings

This page documents settings for enabling external identity management using an OpenID Connect (OIDC)-compatible provider. See OpenID Connect Access Management for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Examples

MINIO_IDENTITY_OPENID_CONFIG_URL="https://openid-provider.example.net/.well-known/openid-configuration"

identity_openid

mc-conf

Use mc admin config set to set or update the OpenID configuration. The config_url argument is required. Specify additional optional arguments as a whitespace (" ")-delimited list.

mc admin config set identity_openid                                               \
  config_url="https://openid-provider.example.net/.well-known/openid-configuration" \
  [ARGUMENT="VALUE"] ...

Settings

Config URL

Required

MINIO_IDENTITY_OPENID_CONFIG_URL

envvar

identity_openid config_url

mc-conf

Specify the URL for the OIDC compatible provider discovery document.

The OIDC Discovery URL typically resembles the following:

https://openid-provider.example.net/.well-known/openid-configuration

Enabled

Optional

This setting does not have an environment variable option. Use the Configuration Setting instead.

identity_openid enabled

mc-conf

Set to false to disable the OpenID configuration.

Applications cannot generate STS credentials or otherwise authenticate to MinIO using the configured provider if set to false.

Defaults to true or “enabled”.

Client ID

Optional

MINIO_IDENTITY_OPENID_CLIENT_ID

envvar

identity_openid client_id

mc-conf

Specify the unique public identifier MinIO uses when authenticating user credentials against the OIDC compatible provider.

Client Secret

Optional

MINIO_IDENTITY_OPENID_CLIENT_SECRET

envvar

identity_openid client_secret

mc-conf

Specify the client secret MinIO uses when authenticating user credentials against the OIDC compatible provider. This field may be optional depending on the provider.

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

Role Policy

Optional

This setting is mutually exclusive with the Claim Name setting.

MINIO_IDENTITY_OPENID_ROLE_POLICY

envvar

identity_openid role_policy

mc-conf

Specify a comma-separated list of policy names to use for the request’s RoleArn for all authentication requests for the provider. The specified policy or policies must already exist on the MinIO Server.

To use this OIDC configuration, you must specify the corresponding RoleArn in the STS request body.

Claim Name

Optional

This setting is mutually exclusive with the Role Policy setting.

MINIO_IDENTITY_OPENID_CLAIM_NAME

envvar

identity_openid claim_name

mc-conf

Specify the name of the JWT Claim MinIO uses to identify the policies to attach to the authenticated user.

The claim can contain one or more comma-separated policy names to attach to the user. The claim must contain at least one policy for the user to have any permissions on the MinIO server.

Defaults to policy.

Claim Prefix

Optional

This setting is deprecated and has been removed as of RELEASE.2024-07-13T01-46-15Z. Use MINIO_IDENTITY_OPENID_CLAIM_NAME instead.

MINIO_IDENTITY_OPENID_CLAIM_PREFIX

envvar

identity_openid claim_prefix

mc-conf

Specify the JWT Claim namespace prefix to apply to the specified claim name.

Display Name

Optional

MINIO_IDENTITY_OPENID_DISPLAY_NAME

envvar

identity_openid display_name

mc-conf

Specify the user-facing name the MinIO Console displays on the login screen.

Scopes

Optional

MINIO_IDENTITY_OPENID_SCOPES

envvar

identity_openid scopes

mc-conf

Specify a comma-separated list of scopes. Defaults to those scopes advertised in the discovery document.

Redirect URI

Optional

This setting is deprecated and has been removed as of RELEASE.2024-07-13T01-46-15Z. Use MINIO_BROWSER_REDIRECT_URL instead.

MINIO_IDENTITY_OPENID_REDIRECT_URI

envvar

identity_openid redirect_uri

mc-conf

Warning

Important

This parameter was removed in RELEASE.2023-02-27T18-10-45Z. Use the MINIO_BROWSER_REDIRECT_URL environment variable instead.

The MinIO Console defaults to using the hostname of the node making the authentication request. For MinIO deployments behind a load balancer or reverse proxy, specify this field to ensure the OIDC provider returns the authentication response to the correct MinIO Console URL. Include the Console hostname, port, and /oauth_callback:

http://minio.example.net:consoleport/oauth_callback

Ensure you start the MinIO Server with the --console-address option to set a static Console listen port. The default behavior with that option omitted is to select a random port number at startup.

The specified URI must match one of the approved redirect / callback URIs on the provider. See the OpenID Authentication Request for more information.

Dynamic URI Redirect

Optional

MINIO_IDENTITY_OPENID_REDIRECT_URI_DYNAMIC

envvar

identity_openid redirect_uri_dynamic

mc-conf

The MinIO Console defaults to using the hostname of the node making the authentication request as part of the redirect URI provided to the OIDC provider. For MinIO deployments behind a load balancer using a round-robin protocol, this may result in the load balancer returning the response to a different MinIO Node than the originating client.

Specify this option as on to direct the MinIO Console to use the Host header of the originating request to construct the redirect URI passed to the OIDC provider. Defaults to off.

User Info

Optional

MINIO_IDENTITY_OPENID_CLAIM_USERINFO

envvar

identity_openid claim_userinfo

mc-conf

Allow MinIO to fetch claims from the UserInfo Endpoint for the authenticated user.

Valid values are on or off.

Vendor

Optional

MINIO_IDENTITY_OPENID_VENDOR

envvar

identity_openid vendor

mc-conf

Specify the OIDC Vendor to enable specific supported behaviors for that vendor.

Supports the following value:

  • keycloak

Keycloak Realm

Optional

This setting requires that the OpenID Vendor setting be defined as keycloak.

MINIO_IDENTITY_OPENID_KEYCLOAK_REALM

envvar

identity_openid keycloak_realm

mc-conf

Specify the Keycloak Realm to use as part of Keycloak Admin API Operations, such as main.

Keycloak Admin URL

Optional

This setting requires that the OpenID Vendor setting be defined as keycloak.

MINIO_IDENTITY_OPENID_KEYCLOAK_ADMIN_URL

envvar

identity_openid keycloak_admin_url

mc-conf

Specify the Keycloak Admin API URL. MinIO can use this URL if configured to periodically validate authenticated Keycloak users as active/existing. For example, https://keycloak-endpoint:port/admin/.

Comment

Optional

MINIO_IDENTITY_OPENID_COMMENT

envvar

identity_openid comment

mc-conf

Specify a comment to associate with the OIDC compatible provider configuration.

12.1.7.3 - Silo Identity Management Plugin Settings

This page documents settings for enabling external identity management using the MinIO Identity Management Plugin. See MinIO External Identity Management Plugin for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Examples

When setting up the MinIO Identity Management Plugin, you must define at a minimum all of the required settings. The examples here represent the minimum required settings.

MINIO_IDENTITY_PLUGIN_URL="https://authservice.example.net:8080/auth"
MINIO_IDENTITY_PLUGIN_ROLE_POLICY="ConsoleUser"

identity_plugin

mc-conf

Use mc admin config set to create or update the identity plugin configuration. The identity_plugin url argument is required. Specify additional optional arguments as a whitespace (” “)-delimited list.

mc admin config set identity_plugin                  \
   url="https://external-auth.example.net:8080/auth" \
   role_policy="consoleAdmin"                        \
   [ARGUMENT=VALUE] ...

Settings

URL

Required

MINIO_IDENTITY_PLUGIN_URL

envvar

identity_plugin url

mc-conf

The webhook endpoint for the external identity management service (https://authservice.example.net:8080/auth).

Role Policy

Required

MINIO_IDENTITY_PLUGIN_ROLE_POLICY

envvar

identity_plugin role_policy

mc-conf

Specify a comma-separated list of MinIO policies to assign to authenticated users.

Enable

Optional

This setting does not have an environment variable option.

identity_plugin enabled

mc-conf

Set to false to disable the identity provider configuration.

Applications cannot generate STS credentials or otherwise authenticate to MinIO using the configured provider if set to false.

Defaults to true or “enabled”.

Token

Optional

MINIO_IDENTITY_PLUGIN_TOKEN

envvar

identity_plugin token

mc-conf

An authentication token to present to the configured webhook endpoint.

Specify a supported HTTP Authentication scheme as a string value, such as "Bearer TOKEN". MinIO sends the token using the HTTP Authorization header.

Role ID

Optional

MINIO_IDENTITY_PLUGIN_ROLE_ID

envvar

identity_plugin role_id

mc-conf

Specify a unique ID MinIO uses to generate an ARN for this identity manager. MinIO automatically adds an idmp- prefix to the specified ID when generating the ARN.

If omitted, MinIO automatically generates the ID and prints the full ARN to the server log.

Comment

Optional

MINIO_IDENTITY_PLUGIN_COMMENT

envvar

identity_plugin comment

mc-conf

Specify a comment to associate to the identity configuration.

12.1.7.4 - Silo Access Management Plugin Settings

This page documents settings for enabling external authorization management using the MinIO Access Management Plugin. See MinIO External Access Management Plugin for a tutorial on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Examples

When setting up the MinIO Access Management plugin, you must define at minimum all required settings. The examples here represent the minimum required setting.

MINIO_POLICY_PLUGIN_URL="https://authzservice.example.net:8080/authz"

policy_plugin

mc-conf

Use the mc admin config set command to create or update the access management plugin configuration. The policy_plugin url argument is required. Specify additional optional arguments as a whitespace (” “)-delimited list.

mc admin config set policy_plugin                     \
   url="https://authzservice.example.net:8080/authz"  \
   [ARGUMENT=VALUE] ...

Settings

URL

Required

MINIO_POLICY_PLUGIN_URL

envvar

policy_plugin url

mc-conf

The webhook endpoint for the external access management service (https://authzservice.example.net:8080/authz).

Auth Token

Optional

MINIO_POLICY_PLUGIN_AUTH_TOKEN

envvar

policy_plugin auth_token

mc-conf

An authentication token to present to the configured webhook endpoint.

Specify a supported HTTP Authentication scheme as a string value, such as "Bearer TOKEN". MinIO sends the token using the HTTP Authorization header.

HTTP2

Optional

MINIO_POLICY_PLUGIN_ENABLE_HTTP2

envvar

policy_plugin enable_http2

mc-conf

Enable experimental HTTP2 support for connecting to the configure webhook service.

Defaults to off

Comment

Optional

MINIO_POLICY_PLUGIN_COMMENT

envvar

policy_plugin comment

mc-conf

Specify a comment to associate to the external access management configuration.

12.1.8 - ILM Settings

This page covers settings that control Information Lifecycle Management (ILM) for the MinIO process.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Expiration Workers

MINIO_ILM_EXPIRATION_WORKERS

envvar

ilm expiration_workers

mc-conf

Note

Added: MinIO

Server RELEASE.2024-03-03T17-50-39Z

Set the number of workers to use for expiring objects. Valid values are 1 to 500.

The default value is 100.

12.1.9 - Key Encryption Service Settings

MinIO Server includes three groups of environment variables to manage how the MinIO Server interacts with the Key Encryption Service (KES), Key Management Service (KMS), or static key files. You may only define one of the three sets. If more than one type of environment variable sets is defined, MinIO returns an error.

Note

Note

These settings do not have configuration setting options for use with mc admin config set.

Define any one set of these environment variables in the host system prior to starting or restarting the MinIO process. Refer to your operating system’s documentation for how to define an environment variable.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Key Encryption Service

Define the following variables to use the Key Encryption Service (KES) to connect to a supported 3rd party Key Management Service provider.

MINIO_KMS_KES_ENDPOINT

envvar

The endpoint(s) for the MinIO Key Encryption Service (KES) process to use for supporting SSE-S3 and MinIO backend encryption operations. Separate multiple KES endpoints with a ,.

MINIO_KMS_KES_KEY_NAME

envvar

The name of an external key on the Key Management system (KMS) configured on the KES server and used for performing en/decryption operations. MinIO uses this key for the following:

  • Encrypting backend data (IAM, server configuration).
  • The default encryption key for Server-Side Encryption with SSE-KMS.
  • The encryption key for Server-Side Encryption with SSE-S3.
Warning

Important

Enabling SSE on a MinIO deployment automatically encrypts the backend data for that deployment using the default encryption key.

MinIO requires access to KES and the external KMS to decrypt the backend and start normally. The KMS must maintain and provide access to the MINIO_KMS_KES_KEY_NAME. You cannot disable KES later or “undo” the SSE configuration at a later point.

MINIO_KMS_KES_API_KEY

envvar

Preferred method for authenticating with the encryption service using the KES API key obtained from the kes identity new command.

This environment variable is mutually exclusive with the MINIO_KMS_KES_KEY_FILE and MINIO_KMS_KES_CERT_FILE environment variables.

MINIO_KMS_KES_KEY_FILE

envvar

The private key associated with the MINIO_KMS_KES_CERT_FILE X.509 certificate used when authenticating to the KES server. The KES server requires clients to present their certificate for mutual TLS (mTLS).

See the KES wiki for more complete documentation on KES access control.

You must also set the MINIO_KMS_KES_CERT_FILE. This variable is mutually exclusive with MINIO_KMS_KES_API_KEY.

MINIO_KMS_KES_CERT_FILE

envvar

The x.509 certificate to present to the KES server. The KES server requires clients to present their certificate for performing mutual TLS (mTLS).

The KES server computes an identity from the certificate and compares it to its configured policies. The KES server grants the minio server access to only those operations explicitly granted by the policy.

See the KES wiki for more complete documentation on KES access control.

You must also set the MINIO_KMS_KES_KEY_FILE. This variable is mutually exclusive with MINIO_KMS_KES_API_KEY.

MINIO_KMS_KES_CAPATH

envvar

Optional

Allows validation of the KES Server Certificate for a Self-Signed or Third-Party CA. Specify the path to the location of the CA certificate for your KES deployment.

This variable is not required if you use a public certificate authority.

MINIO_KMS_KES_KEY_PASSWORD

envvar

Optional

The password used to encrypt and decrypt the TLS private key, if used.

MinIO Key Management Server (KMS)

Define the following variables to use MinIO KMS to manage keys.

MINIO_KMS_SERVER

envvar

The endpoint(s) for the MinIO Key Management Service (KMS) process to use for supporting SSE-S3 and MinIO backend encryption operations. Separate multiple KMS endpoints with a ,.

MINIO_KMS_ENCLAVE

envvar

The MinIO KMS Enclave where the key and identity exist.

MINIO_KMS_SSE_KEY

envvar

The default key to use for SSE-S3 encryption when a call does not specify a key identity.

MINIO_KMS_API_KEY

envvar

The credential used to authenticate with the MinIO KMS service.

Static Key Files

Caution

Warning

These settings support early development and evaluation of Server-Side Encryption of Objects without depending on an external KMS. Do not use these settings in any extended development, QA, or production environments. See Server-Side Object Encryption with KES for guidance on deploying SSE using MinIO Key Encryption Service (KES) and an external KMS.

Provide a static KMS key or key file to use for encryption.

MINIO_KMS_SECRET_KEY

envvar

The base64 form of the static KMS key in the form <key-name>:<base64-32byte-key>. Implements a subset of KMS APIs.

MINIO_KMS_SECRET_KEY_FILE

envvar

Path to the file to read the static KMS key from.

12.1.10 - Object Lambda function settings

This page describes the settings available to configure MinIO to publish data to an HTTP webhook endpoint and trigger an Object Lambda function. See Transforms with Object Lambda for more complete documentation and tutorials on using these settings.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Enable

MINIO_LAMBDA_WEBHOOK_ENABLE

envvar

Specify "on" to enable the Object Lambda webhook endpoint for a handler function.

Requires specifying MINIO_LAMBDA_WEBHOOK_ENDPOINT.

You can specify multiple webhooks as Lambda targets by appending a unique identifier for each Object Lambda function. For example, the following command enables two distinct Object Lambda webhook endpoints:

export MINIO_LAMBDA_WEBHOOK_ENABLE_myfunction="on"
export MINIO_LAMBDA_WEBHOOK_ENABLE_yourfunction="on"

lambda_webhook enable

mc-conf

Optional

Specify "on" to enable the Object Lambda webhook endpoint for a handler function. Requires specifying endpoint.

Example:

mc admin config set myminio lambda_webhook:myfunction endpoint="https://example.com/" enable=on

Endpoint

MINIO_LAMBDA_WEBHOOK_ENDPOINT

envvar

The HTTP endpoint of the lambda webhook for the handler function.

You can specify multiple webhook endpoints as Lambda targets by appending a unique identifier for each Object Lambda function. For example, the following command sets two distinct Object Lambda webhook endpoints:

export MINIO_LAMBDA_WEBHOOK_ENDPOINT_myfunction="http://webhook-1.example.com"
export MINIO_LAMBDA_WEBHOOK_ENDPOINT_yourfunction="http://webhook-2.example.com"

lambda_webhook endpoint

mc-conf

Optional

The HTTP endpoint of the lambda webhook for the handler function.

Auth token

MINIO_LAMBDA_WEBHOOK_AUTH_TOKEN

envvar

Specify the opaque string or JWT authorization token to use for authenticating to the lambda webhook service.

You can specify the token for multiple Lambda targets by appending a unique identifier for each Object Lambda function. For example, the following command configures a token for two distinct Object Lambda webhook endpoints:

export MINIO_LAMBDA_WEBHOOK_AUTH_TOKEN_myfunction="1a2b3c4d5e"
export MINIO_LAMBDA_WEBHOOK_AUTH_TOKEN_yourfunction="1a2b3c4d5e"
Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

lambda_webhook auth_token

mc-conf

Optional

Specify the opaque string or JWT authorization token to use for authenticating to the lambda webhook service.

Note

Changed: RELEASE.2023-06-23T20-26-00Z

MinIO redacts this value when returned as part of mc admin config get.

Client cert

MINIO_LAMBDA_WEBHOOK_CLIENT_CERT

envvar

Specify the path to the client certificate to use for performing mTLS authentication to the lambda webhook service.

You can specify the client cert for multiple Lambda targets by appending a unique identifier for each Object Lambda function. For example, the following command configures a cert for two distinct Object Lambda webhook endpoints:

export MINIO_LAMBDA_WEBHOOK_CLIENT_CERT_myfunction="/path/to/cert1"
export MINIO_LAMBDA_WEBHOOK_CLIENT_CERT_yourfunction="/path/to/cert2"

lambda_webhook client_cert

mc-conf

Optional

Specify the path to the client certificate to use for performing mTLS authentication to the lambda webhook service.

Client key

MINIO_LAMBDA_WEBHOOK_CLIENT_KEY

envvar

Specify the path to the private key to use for performing mTLS authentication to the lambda webhook service.

You can specify the client key for multiple Lambda targets by appending a unique identifier for each Object Lambda function. For example, the following command configures a key for two distinct Object Lambda webhook endpoints:

export MINIO_LAMBDA_WEBHOOK_CLIENT_KEY_myfunction="/path/to/key1"
export MINIO_LAMBDA_WEBHOOK_CLIENT_KEY_yourfunction="/path/to/key2"

lambda_webhook client_key

mc-conf

Optional

Specify the path to the private key to use for performing mTLS authentication to the lambda webhook service.

12.1.11 - Deprecated Settings

This page covers deprecated settings that control core behavior of the MinIO process.

Settings on this page may be removed at any time. Users should migrate to the recommended replacement at the earliest opportunity.

You can establish or modify settings by defining:

  • an environment variable on the host system prior to starting or restarting the MinIO Server. Refer to your operating system’s documentation for how to define an environment variable.
  • a configuration setting using mc admin config set.

If you define both an environment variable and the similar configuration setting, MinIO uses the environment variable value.

Some settings have only an environment variable or a configuration setting, but not both.

Warning

Important

Each configuration setting controls fundamental MinIO behavior and functionality. MinIO strongly recommends testing configuration changes in a lower environment, such as DEV or QA, before applying to production.

Environment Variables

The following environment variables are deprecated. They are listed here for historical reference only.

MINIO_SECRET_KEY

envvar

Caution

Deprecated: RELEASE.2021-04-22T15-44-28Z

The secret key for the root user.

This environment variable is deprecated in favor of the MINIO_ROOT_PASSWORD environment variable.

Caution

Warning

If MINIO_SECRET_KEY is unset, minio defaults to minioadmin.

NEVER use the default credentials in production environments. MinIO strongly recommends specifying a unique, long, and random MINIO_ACCESS_KEY value for all environments.

MINIO_ACCESS_KEY

envvar

Caution

Deprecated: RELEASE.2021-04-22T15-44-28Z

The access key for the root user.

This environment variable is deprecated in favor of the MINIO_ROOT_USER environment variable.

Caution

Warning

If MINIO_ACCESS_KEY is unset, minio defaults to minioadmin.

NEVER use the default credentials in production environments. MinIO strongly recommends specifying a unique, long, and random MINIO_ACCESS_KEY value for all environments.

MINIO_ACCESS_KEY_OLD

envvar

Caution

Deprecated: RELEASE.2021-04-22T15-44-28Z

To perform root credential rotation, modify the MINIO_ROOT_USER and MINIO_ROOT_PASSWORD environment variables.

MINIO_OPERATOR_DEPLOYMENT_NAME

envvar

Caution

Deprecated: Operator

6.0.4

Specifies the namespace to create and use for Operator.

When not specified, the default value is minio-operator.

MINIO_SECRET_KEY_OLD

envvar

Caution

Deprecated: RELEASE.2021-04-22T15-44-28Z

To perform root credential rotation, modify the MINIO_ROOT_USER and MINIO_ROOT_PASSWORD environment variables.

MINIO_SERVER_URL

envvar

Caution

Deprecated: RELEASE.2024-05-10T01-41-38Z

The fully qualified domain name (FQDN) the MinIO Console uses for connecting to the MinIO Server.

For the Console to function correctly, the MinIO server URL must be the FQDN of the host, resolveable, and reachable.

If the specified value does not resolve to the MinIO server, logins via the MinIO Console fail and return a network error after a wait period. Older versions of the Console may return a generic ‘Invalid Login’ error instead. Unset the value or address the FQDN resolution issue to allow Console logins to proceed. This setting may be required if:

  • The MinIO Server uses a TLS certificate that does not include the host local IP(s) in the certificate Subject Alternative Name (SAN).

or

  • The Console must use a specific hostname to connect or reference the MinIO Server, such as due to a reverse proxy or similar configuration.

13 - Deprecated Commands

The following table lists the commands deprecated by MinIO. The table includes:

  • Deprecated Command
  • Replacement command (if applicable)
  • Version of deprecation

Table of Deprecated Commands

Deprecated Command Replacement Command Version of Change
mc ilm add mc ilm rule add mc RELEASE.2022-12-24T15-21-38Z
mc ilm edit mc ilm rule edit mc RELEASE.2022-12-24T15-21-38Z
mc ilm export mc ilm rule export mc RELEASE.2022-12-24T15-21-38Z
mc ilm import mc ilm rule import mc RELEASE.2022-12-24T15-21-38Z
mc ilm ls mc ilm rule ls mc RELEASE.2022-12-24T15-21-38Z
mc ilm rm mc ilm rule rm mc RELEASE.2022-12-24T15-21-38Z
mc quota None mc RELEASE.2024-07-31T15-58-33Z
mc quota clear None mc RELEASE.2024-07-31T15-58-33Z
mc quota info None mc RELEASE.2024-07-31T15-58-33Z
mc quota set None mc RELEASE.2024-07-31T15-58-33Z
mc replicate diff mc replicate backlog mc RELEASE.2023-07-18T21-05-38Z

Table of Deprecated Admin Commands

Deprecated Command Replacement Command Version of Change
mc admin bucket remote mc replicate mc RELEASE.2022-12-24T15-21-38Z
mc admin bucket remote add mc replicate add mc RELEASE.2022-12-24T15-21-38Z
mc admin bucket remote ls mc replicate ls mc RELEASE.2022-12-24T15-21-38Z
mc admin bucket remote rm mc replicate rm mc RELEASE.2022-12-24T15-21-38Z
mc admin bucket remote update mc replicate update mc RELEASE.2022-12-24T15-21-38Z
mc admin bucket quota mc quota clear, mc quota info, mc quota set mc RELEASE.2022-12-13T00-23-28Z
mc admin console mc admin logs mc RELEASE.2022-06-26T18-51-48Z
mc admin idp ldap add mc idp ldap add mc RELEASE.2023-05-26T23-31-54Z
mc admin idp ldap disable mc idp ldap disable mc RELEASE.2023-05-26T23-31-54Z
mc admin idp ldap enable mc idp ldap enable mc RELEASE.2023-05-26T23-31-54Z
mc admin idp ldap info mc idp ldap info mc RELEASE.2023-05-26T23-31-54Z
mc admin idp ldap ls mc idp ldap ls mc RELEASE.2023-05-26T23-31-54Z
mc admin idp ldap policy mc idp ldap policy mc RELEASE.2023-05-26T23-31-54Z
mc admin idp ldap rm mc idp ldap rm mc RELEASE.2023-05-26T23-31-54Z
mc admin idp ldap update mc idp ldap update mc RELEASE.2023-05-26T23-31-54Z
mc admin idp openid add mc idp openid add mc RELEASE.2023-05-26T23-31-54Z
mc admin idp openid disable mc idp openid disable mc RELEASE.2023-05-26T23-31-54Z
mc admin idp openid enable mc idp openid enable mc RELEASE.2023-05-26T23-31-54Z
mc admin idp openid info mc idp openid info mc RELEASE.2023-05-26T23-31-54Z
mc admin idp openid ls mc idp openid ls mc RELEASE.2023-05-26T23-31-54Z
mc admin idp openid rm mc idp openid rm mc RELEASE.2023-05-26T23-31-54Z
mc admin idp openid update mc idp openid update mc RELEASE.2023-05-26T23-31-54Z
mc admin policy add mc admin policy create mc RELEASE.2023-03-20T17-17-53Z
mc admin policy set mc admin policy attach mc RELEASE.2023-03-20T17-17-53Z
mc admin policy unset mc admin policy detach mc RELEASE.2023-03-20T17-17-53Z
mc admin policy update mc admin policy attach or mc admin policy detach mc RELEASE.2023-03-20T17-17-53Z
mc admin profile mc support profile mc RELEASE.2023-04-06T16-51-10Z
mc admin replicate edit mc admin replicate update mc RELEASE.2023-01-11T03-14-16Z
mc admin replicate remove mc admin replicate rm mc RELEASE.2023-01-11T03-14-16Z
mc admin speedtest mc support perf mc RELEASE.2022-07-24T02-25-13Z
mc admin tier add mc ilm tier add mc RELEASE.2022-12-24T15-21-38Z
mc admin tier edit mc ilm tier update mc RELEASE.2022-12-24T15-21-38Z
mc admin tier ls mc ilm tier ls mc RELEASE.2022-12-24T15-21-38Z
mc admin top mc support top mc RELEASE.2022-08-11T00-30-48Z

14 - mc ilm import

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm import replaced by mc ilm rule import.

Syntax

The mc ilm import command imports an object lifecycle management configuration and applies it to a MinIO bucket.

The mc ilm import command imports from STDIN by default. You can input the contents from a .json file, such as one produced by mc ilm export.

The following command imports the lifecycle management configuration from mydata-lifecycle-config.json and applies it to the mydata bucket on the myminio deployment:

mc ilm import myminio/mydata < mydata-lifecycle-config.json

The command has the following syntax:

mc [GLOBALFLAGS] ilm import ALIAS < STDIN
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The alias and full path to the bucket on the MinIO deployment into which to import object lifecycle management rules. For example:

mc ilm import myminio/mydata < bucket-lifecycle.json

Global Flags

This command supports any of the global flags.

Examples

Import the Bucket Lifecycle Management Configuration

The following command imports the bucket lifecycle management configuration from the bucket-lifecycle.json file:

mc ilm import myminio/mybucket < bucket-lifecycle.json
mc ilm import ALIAS < file.json
  • Replace ALIAS with the alias of the MinIO deployment and the bucket into which to import object lifecycle management rules:

    myminio/mydata

  • Replace file.json with the name of the file from which to import the lifecycle management rules.

Behavior

Importing Configuration Overrides Existing Rules

mc ilm import replaces the current bucket lifecycle management rules with those defined in the imported JSON configuration.

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

15 - Tenant Helm Charts

The archived MinIO Operator project published an Operator Chart and Tenant Chart. This page documents its final v7.1.1 Tenant Chart.

The following page documents the values.yaml chart for a MinIO Tenant. For documentation on the chart for a MinIO Operator, see Operator Helm Charts

Warning

The upstream MinIO Operator repository was archived on March 20, 2026. This is a retained reference snapshot for its final chart at v7.1.1, not evidence of ongoing upstream maintenance or support. Its defaults were checked against that tag; internal documentation links are routed to this site, and the stale upstream existingSecret comment is corrected to the chart’s actual tenant.configSecret.name input. The quay.io/minio/minio values below are upstream chart defaults, not Silo branding or a recommended Silo image. To run Silo, override tenant.image.repository with pgsty/minio and pin a tested published release tag or digest.

MinIO Tenant Chart

tenant

name

The Tenant name

Change this to match your preferred MinIO Tenant name.

image

Specify the Operator container image to use for the deployment. image.tag For example, the following sets the image to the quay.io/minio/operator repo and the v7.1.1 tag. The container pulls the image if not already present:

image:
   repository: quay.io/minio/minio
   tag: RELEASE.2025-04-08T15-41-24Z
   pullPolicy: IfNotPresent

The chart also supports specifying an image based on digest value:

image:
   repository: quay.io/minio/minio@sha256
   digest: 28c80b379c75242c6fe793dfbf212f43c602140a0de5ebe3d9c2a3a7b9f9f983
   pullPolicy: IfNotPresent

imagePullSecret

An array of Kubernetes secrets to use for pulling images from a private image.repository. Only one array element is supported at this time.

initContainers

Specify initContainers to perform setup or configuration tasks before the main Tenant pods starts.

Example of init container which waits for idenity provider to be reachable before starting MinIO Tenant:

initContainers:
 - name: wait-for-idp
   image: busybox
   command:
     - sh
     - -c
     - |
       URL="https://idp-url"
       echo "Checking IdP reachability (${URL})"
       until $(wget -q -O "/dev/null" ${URL}) ; do
         echo "IdP (${URL}) not reachable. Waiting to be reachable..."
         sleep 5
       done
       echo "IdP (${URL}) reachable. Starting MinIO..."

scheduler

The Kubernetes Scheduler to use for dispatching Tenant pods.

Specify an empty dictionary {} to dispatch pods with the default scheduler.

configSecret

Root key for dynamically creating a secret for use with configuring root MinIO User Specify the name and then a list of environment variables. To reuse an existing Secret containing config.env, set tenant.configSecret.name to that Secret and set tenant.configSecret.existingSecret to true.

Warning

Important

Do not use this in production environments. This field is intended for use with rapid development or testing only.

For example:

name: myminio-env-configuration
accessKey: minio
secretKey: minio123

poolsMetadata

Metadata that will be added to the statefulset and pods of all pools

annotations

Specify annotations to associate to Tenant pods.

labels

Specify labels to associate to Tenant pods.

pools

Top level key for configuring MinIO Pool(s) in this Tenant.

See Operator CRD: Pools for more information on all subfields.

servers

The number of MinIO Tenant Pods / Servers in this pool. For standalone mode, supply 1. For distributed mode, supply 4 or more. Note that the operator does not support upgrading from standalone to distributed mode.

name

Custom name for the pool

volumesPerServer

The number of volumes attached per MinIO Tenant Pod / Server.

size

The capacity per volume requested per MinIO Tenant Pod.

storageAnnotations

Specify storageAnnotations to associate to PVCs.

storageLabels

Specify storageLabels to associate to PVCs.

annotations

Specify annotations to associate to Tenant pods.

labels

Specify labels to associate to Tenant pods.

tolerations

An array of Toleration labels to associate to Tenant pods.

These settings determine the distribution of pods across worker nodes.

nodeSelector

Any Node Selectors to apply to Tenant pods.

The Kubernetes scheduler uses these selectors to determine which worker nodes onto which it can deploy Tenant pods.

If no worker nodes match the specified selectors, the Tenant deployment will fail.

affinity

The affinity or anti-affinity settings to apply to Tenant pods.

These settings determine the distribution of pods across worker nodes and can help prevent or allow colocating pods onto the same worker nodes.

resources

The Requests or Limits for resources to associate to Tenant pods.

These settings can control the minimum and maximum resources requested for each pod. If no worker nodes can meet the specified requests, the Operator may fail to deploy.

securityContext

The Kubernetes SecurityContext to use for deploying Tenant resources.

You may need to modify these values to meet your cluster’s security and access settings.

We recommend disabling recursive permission changes by setting fsGroupChangePolicy to OnRootMismatch as those operations can be expensive for certain workloads (e.g. large volumes with many small files).

containerSecurityContext

The Kubernetes SecurityContext to use for deploying Tenant containers. You may need to modify these values to meet your cluster’s security and access settings.

topologySpreadConstraints

An array of Topology Spread Constraints to associate to Operator Console pods.

These settings determine the distribution of pods across worker nodes.

mountPath

The mount path where Persistent Volumes are mounted inside Tenant container(s).

subPath

The Sub path inside Mount path where MinIO stores data.

Caution

Warning

Treat the mountPath and subPath values as immutable once you deploy the Tenant. If you change these values post-deployment, then you may have different paths for new and pre-existing data. This can vastly increase operational complexity and may result in unpredictable data states.

metrics

Configures a Prometheus-compatible scraping endpoint at the specified port.

certificate

Configures external certificate settings for the Tenant.

externalCaCertSecret

Specify an array of Kubernetes TLS secrets, where each entry corresponds to a secret the TLS private key and public certificate pair.

This is used by MinIO to verify TLS connections from clients using those CAs If you omit this and have clients using TLS certificates minted by an external CA, those connections may fail with warnings around certificate verification. See Operator CRD: TenantSpec.

externalCertSecret

Specify an array of Kubernetes secrets, where each entry corresponds to a secret contains the TLS private key and public certificate pair.

Omit this to use only the MinIO Operator autogenerated certificates.

If you omit this field and set requestAutoCert to false, the Tenant starts without TLS.

See Operator CRD: TenantSpec.

Warning

Important

The MinIO Operator may output TLS connectivity errors if it cannot trust the Certificate Authority (CA) which minted the custom certificates.

You can pass the CA to the Operator to allow it to trust that cert. See Self-Signed, Internal, and Private Certificates for more information. This step may also be necessary for globally trusted CAs where you must provide intermediate certificates to the Operator to help build the full chain of trust.

requestAutoCert

Enable automatic Kubernetes based certificate generation and signing

certConfig

This field is used only when requestAutoCert: true. Use this field to set CommonName for the auto-generated certificate. MinIO defaults to using the internal Kubernetes DNS name for the pod The default DNS name format is typically *.minio.default.svc.cluster.local.

See Operator CRD: CertificateConfig

features

MinIO features to enable or disable in the MinIO Tenant See Operator CRD: Features.

buckets

Array of objects describing one or more buckets to create during tenant provisioning. Example:

- name: my-minio-bucket
  objectLock: false        # optional
  region: us-east-1        # optional

users

Array of Kubernetes secrets from which the Operator generates MinIO users during tenant provisioning.

Each secret should specify the CONSOLE_ACCESS_KEY and CONSOLE_SECRET_KEY as the access key and secret key for that user.

podManagementPolicy

The PodManagement policy for MinIO Tenant Pods. Can be “OrderedReady” or “Parallel”

readiness

Readiness Probe for monitoring Tenant container readiness. Tenant pods will be removed from service endpoints if the probe fails.

startup

Startup Probe for monitoring container startup. Tenant pods will be restarted if the probe fails. Refer

lifecycle

The Lifecycle hooks for container.

exposeServices

Directs the Operator to deploy the MinIO S3 API and Console services as LoadBalancer objects.

If the Kubernetes cluster has a configured LoadBalancer, it can attempt to route traffic to those services automatically.

  • Specify minio: true to expose the MinIO S3 API.
  • Specify console: true to expose the Console.

Both fields default to false.

serviceAccountName

The Kubernetes Service Account associated with the Tenant.

prometheusOperator

Directs the Operator to add the Tenant’s metric scrape configuration to an existing Kubernetes Prometheus deployment managed by the Prometheus Operator.

logging

Configure pod logging configuration for the MinIO Tenant.

  • Specify json for JSON-formatted logs.
  • Specify anonymous for anonymized logs.
  • Specify quiet to supress logging.

An example of JSON-formatted logs is as follows:

$ k logs myminio-pool-0-0 -n default
{"level":"INFO","errKind":"","time":"2022-04-07T21:49:33.740058549Z","message":"All MinIO sub-systems initialized successfully"}

serviceMetadata

serviceMetadata allows passing additional labels and annotations to MinIO and Console specific services created by the operator.

env

Add environment variables to be set in MinIO container (https://github.com/minio/minio/tree/master/docs/config)

priorityClassName

PriorityClassName indicates the Pod priority and hence importance of a Pod relative to other Pods. This is applied to MinIO pods only. Refer Kubernetes documentation for details https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass/

additionalVolumes

An array of Volumes which the Operator can mount to Tenant pods.

The volumes must exist and be accessible to the Tenant pods.

additionalVolumeMounts

An array of volume mount points associated to each Tenant container.

Specify each item in the array as follows:

volumeMounts:
- name: volumename
  mountPath: /path/to/mount

The name field must correspond to an entry in the additionalVolumes array.

ingress

Configures Ingress for the Tenant S3 API and Console.

Set the keys to conform to the Ingress controller and configuration of your choice.

# Root key for MinIO Tenant Chart
tenant:
  ###
  # The Tenant name
  #
  # Change this to match your preferred MinIO Tenant name.
  name: myminio
  ###
  # Specify the Operator container image to use for the deployment.
  # ``image.tag`` 
  # For example, the following sets the image to the ``quay.io/minio/operator`` repo and the v7.1.1 tag.
  # The container pulls the image if not already present:
  #
  # .. code-block:: yaml
  # 
  #    image:
  #       repository: quay.io/minio/minio
  #       tag: RELEASE.2025-04-08T15-41-24Z
  #       pullPolicy: IfNotPresent
  #
  # The chart also supports specifying an image based on digest value:
  # 
  # .. code-block:: yaml
  # 
  #    image:
  #       repository: quay.io/minio/minio@sha256
  #       digest: 28c80b379c75242c6fe793dfbf212f43c602140a0de5ebe3d9c2a3a7b9f9f983
  #       pullPolicy: IfNotPresent
  #
  #
  image:
    repository: quay.io/minio/minio
    tag: RELEASE.2025-04-08T15-41-24Z
    pullPolicy: IfNotPresent
  ###
  #
  # An array of Kubernetes secrets to use for pulling images from a private ``image.repository``.
  # Only one array element is supported at this time.
  imagePullSecret: { }
  ###
  #
  # Specify `initContainers <https://kubernetes.io/docs/concepts/workloads/pods/init-containers/>`__ to perform setup or configuration tasks before the main Tenant pods starts.
  #
  # Example of init container which waits for idenity provider to be reachable before starting MinIO Tenant:
  # 
  # .. code-block:: yaml
  #
  #    initContainers:
  #     - name: wait-for-idp
  #       image: busybox
  #       command:
  #         - sh
  #         - -c
  #         - |
  #           URL="https://idp-url"
  #           echo "Checking IdP reachability (${URL})"
  #           until $(wget -q -O "/dev/null" ${URL}) ; do
  #             echo "IdP (${URL}) not reachable. Waiting to be reachable..."
  #             sleep 5
  #           done
  #           echo "IdP (${URL}) reachable. Starting MinIO..."
  #
  initContainers: [ ]
  ###
  # The Kubernetes `Scheduler <https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/>`__ to use for dispatching Tenant pods.
  #
  # Specify an empty dictionary ``{}`` to dispatch pods with the default scheduler.
  scheduler: { }
  ###
  # Root key for dynamically creating a secret for use with configuring root MinIO User
  # Specify the ``name`` and then a list of environment variables.
  #
  # .. important::
  #
  #    Do not use this in production environments.
  #    This field is intended for use with rapid development or testing only.
  #
  # For example:
  #
  # .. code-block:: yaml
  #
  #    name: myminio-env-configuration
  #    accessKey: minio
  #    secretKey: minio123
  #
  configSecret:
    name: myminio-env-configuration
    accessKey: minio
    secretKey: minio123
    #existingSecret: true

  ###
  # Metadata that will be added to the statefulset and pods of all pools
  poolsMetadata:
    ###
    # Specify `annotations <https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/>`__ to associate to Tenant pods.
    annotations: { }
    ###
    # Specify `labels <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/>`__ to associate to Tenant pods.
    labels: { }

  ###
  # If this variable is set to true, then enable the usage of an existing Kubernetes secret to set environment variables for the Tenant.
  # Set the existing Kubernetes secret name under .tenant.configSecret.name, for example existing-minio-env-configuration.
  # The secret must contain a key ``config.env``.
  # The values should be a series of export statements to set environment variables for the Tenant.
  # For example:
  #
  # .. code-block:: shell
  #
  #    stringData:
  #       config.env: |-
  #         export MINIO_ROOT_USER=ROOTUSERNAME
  #         export MINIO_ROOT_PASSWORD=ROOTUSERPASSWORD
  #
  #   existingSecret: false
  ###
  # Top level key for configuring MinIO Pool(s) in this Tenant.
  #
  # See `Operator CRD: Pools <https://silo.pgsty.com/reference/operator-crd/#pool>`__ for more information on all subfields.
  pools:
    ###
    # The number of MinIO Tenant Pods / Servers in this pool.
    # For standalone mode, supply 1. For distributed mode, supply 4 or more.
    # Note that the operator does not support upgrading from standalone to distributed mode.
    - servers: 4
      ###
      # Custom name for the pool
      name: pool-0
      ###
      # The number of volumes attached per MinIO Tenant Pod / Server.
      volumesPerServer: 4
      ###
      # The capacity per volume requested per MinIO Tenant Pod.
      size: 10Gi
      ###
      # The `storageClass <https://kubernetes.io/docs/concepts/storage/storage-classes/>`__ to associate with volumes generated for this pool.
      #
      # If using Amazon Elastic Block Store (EBS) CSI driver
      # Please make sure to set xfs for "csi.storage.k8s.io/fstype" parameter under StorageClass.parameters.
      # Docs: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/master/docs/parameters.md
      # storageClassName: standard
      ###
      # Specify `storageAnnotations <https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/>`__ to associate to PVCs.
      storageAnnotations: { }
      ###
      # Specify `storageLabels <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/>`__ to associate to PVCs.
      storageLabels: { }
      ###
      # Specify `annotations <https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/>`__ to associate to Tenant pods.
      annotations: { }
      ###
      # Specify `labels <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/>`__ to associate to Tenant pods.
      labels: { }
      ###
      #
      # An array of `Toleration labels <https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/>`__ to associate to Tenant pods.
      #
      # These settings determine the distribution of pods across worker nodes.
      tolerations: [ ]
      ###
      # Any `Node Selectors <https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/>`__ to apply to Tenant pods.
      #
      # The Kubernetes scheduler uses these selectors to determine which worker nodes onto which it can deploy Tenant pods.
      #
      # If no worker nodes match the specified selectors, the Tenant deployment will fail.
      nodeSelector: { }
      ###
      #
      # The `affinity <https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/>`__ or anti-affinity settings to apply to Tenant pods.
      #
      # These settings determine the distribution of pods across worker nodes and can help prevent or allow colocating pods onto the same worker nodes.
      affinity: { }
      ###
      # 
      # The `Requests or Limits <https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/>`__ for resources to associate to Tenant pods.
      #
      # These settings can control the minimum and maximum resources requested for each pod.
      # If no worker nodes can meet the specified requests, the Operator may fail to deploy.
      resources: { }
      ###
      # The Kubernetes `SecurityContext <https://kubernetes.io/docs/tasks/configure-pod-container/security-context/>`__ to use for deploying Tenant resources.
      #
      # You may need to modify these values to meet your cluster's security and access settings.
      #
      # We recommend disabling recursive permission changes by setting ``fsGroupChangePolicy`` to ``OnRootMismatch`` as those operations can be expensive for certain workloads (e.g. large volumes with many small files).
      securityContext:
        runAsUser: 1000
        runAsGroup: 1000
        fsGroup: 1000
        fsGroupChangePolicy: "OnRootMismatch"
        runAsNonRoot: true
      ###
      # The Kubernetes `SecurityContext <https://kubernetes.io/docs/tasks/configure-pod-container/security-context/>`__ to use for deploying Tenant containers.
      # You may need to modify these values to meet your cluster's security and access settings.
      containerSecurityContext:
        runAsUser: 1000
        runAsGroup: 1000
        runAsNonRoot: true
        allowPrivilegeEscalation: false
        capabilities:
          drop:
            - ALL
        seccompProfile:
          type: RuntimeDefault
      ###
      #
      # An array of `Topology Spread Constraints <https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/>`__ to associate to Operator Console pods.
      #
      # These settings determine the distribution of pods across worker nodes.
      topologySpreadConstraints: [ ]
      ###
      #
      # The name of a custom `Container Runtime <https://kubernetes.io/docs/concepts/containers/runtime-class/>`__ to use for the Operator Console pods.
      # runtimeClassName: ""
  ###
  # The mount path where Persistent Volumes are mounted inside Tenant container(s).
  mountPath: /export
  ###
  # The Sub path inside Mount path where MinIO stores data.
  #
  # .. warning::
  #
  #    Treat the ``mountPath`` and ``subPath`` values as immutable once you deploy the Tenant.
  #    If you change these values post-deployment, then you may have different paths for new and pre-existing data.
  #    This can vastly increase operational complexity and may result in unpredictable data states.
  subPath: /data
  ###
  # Configures a Prometheus-compatible scraping endpoint at the specified port.
  metrics:
    enabled: false
    port: 9000
    protocol: http
  ###
  # Configures external certificate settings for the Tenant.
  certificate:
    ###
    # Specify an array of Kubernetes TLS secrets, where each entry corresponds to a secret the TLS private key and public certificate pair.
    #
    # This is used by MinIO to verify TLS connections from clients using those CAs
    # If you omit this and have clients using TLS certificates minted by an external CA, those connections may fail with warnings around certificate verification.
    # See `Operator CRD: TenantSpec <https://silo.pgsty.com/reference/operator-crd/#tenantspec>`__.
    externalCaCertSecret: [ ]
    ###
    # Specify an array of Kubernetes secrets, where each entry corresponds to a secret contains the TLS private key and public certificate pair.
    #
    # Omit this to use only the MinIO Operator autogenerated certificates.
    # 
    # If you omit this field *and* set ``requestAutoCert`` to false, the Tenant starts without TLS.
    #
    # See `Operator CRD: TenantSpec <https://silo.pgsty.com/reference/operator-crd/#tenantspec>`__.
    #
    # .. important::
    #
    #    The MinIO Operator may output TLS connectivity errors if it cannot trust the Certificate Authority (CA) which minted the custom certificates.
    #
    #    You can pass the CA to the Operator to allow it to trust that cert.
    #    See `Self-Signed, Internal, and Private Certificates <https://silo.pgsty.com/operations/network-encryption/#self-signed-internal-private-certificates-and-public-cas-with-intermediate-certificates>`__ for more information.
    #    This step may also be necessary for globally trusted CAs where you must provide intermediate certificates to the Operator to help build the full chain of trust.
    externalCertSecret: [ ]
    ###
    # Enable automatic Kubernetes based `certificate generation and signing <https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster>`__
    requestAutoCert: true
    ###
    # The minimum number of days to expiry before an alert for an expiring certificate is fired.
    # In the below example, if a given certificate will expire in 7 days then expiration events will only be triggered 1 day before expiry
    # certExpiryAlertThreshold: 1
    ###
    # This field is used only when ``requestAutoCert: true``.
    # Use this field to set CommonName for the auto-generated certificate. 
    # MinIO defaults to using the internal Kubernetes DNS name for the pod
    # The default DNS name format is typically ``*.minio.default.svc.cluster.local``.
    #
    # See `Operator CRD: CertificateConfig <https://silo.pgsty.com/reference/operator-crd/#certificateconfig>`__
    certConfig: { }
  ###
  # MinIO features to enable or disable in the MinIO Tenant
  # See `Operator CRD: Features <https://silo.pgsty.com/reference/operator-crd/#features>`__.
  features:
    bucketDNS: false
    domains: { }
    enableSFTP: false
  ###
  # Array of objects describing one or more buckets to create during tenant provisioning.
  # Example:
  # 
  # .. code-block:: yaml
  #
  #    - name: my-minio-bucket
  #      objectLock: false        # optional
  #      region: us-east-1        # optional
  buckets: [ ]
  ###
  # Array of Kubernetes secrets from which the Operator generates MinIO users during tenant provisioning.
  #
  # Each secret should specify the ``CONSOLE_ACCESS_KEY`` and ``CONSOLE_SECRET_KEY`` as the access key and secret key for that user.
  users: [ ]
  ###
  # The `PodManagement <https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#pod-management-policy>`__ policy for MinIO Tenant Pods. 
  # Can be "OrderedReady" or "Parallel"
  podManagementPolicy: Parallel
  # The `Liveness Probe <https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes>`__ for monitoring Tenant pod liveness. 
  # Tenant pods will be restarted if the probe fails.
  liveness: { }
  ###
  # `Readiness Probe <https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/>`__ for monitoring Tenant container readiness.
  # Tenant pods will be removed from service endpoints if the probe fails.
  readiness: { }
  ###
  # `Startup Probe <https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/>`__ for monitoring container startup. 
  # Tenant pods will be restarted if the probe fails.
  # Refer 
  startup: { }
  ###
  # The `Lifecycle hooks <https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/>`__ for container.
  lifecycle: { }
  ###
  # Directs the Operator to deploy the MinIO S3 API and Console services as LoadBalancer objects.
  #
  # If the Kubernetes cluster has a configured LoadBalancer, it can attempt to route traffic to those services automatically.
  #
  # - Specify ``minio: true`` to expose the MinIO S3 API.
  # - Specify ``console: true`` to expose the Console.
  #
  # Both fields default to ``false``.
  exposeServices: { }
  ###
  # The `Kubernetes Service Account <https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/>`__ associated with the Tenant.
  serviceAccountName: ""
  ###
  # Directs the Operator to add the Tenant's metric scrape configuration to an existing Kubernetes Prometheus deployment managed by the Prometheus Operator.
  prometheusOperator: false
  ###
  # Configure pod logging configuration for the MinIO Tenant.
  #
  # - Specify ``json`` for JSON-formatted logs.
  # - Specify ``anonymous`` for anonymized logs.
  # - Specify ``quiet`` to supress logging.
  #
  # An example of JSON-formatted logs is as follows:
  #
  # .. code-block:: shell
  #
  #    $ k logs myminio-pool-0-0 -n default
  #    {"level":"INFO","errKind":"","time":"2022-04-07T21:49:33.740058549Z","message":"All MinIO sub-systems initialized successfully"}
  logging: { }
  ###
  # serviceMetadata allows passing additional labels and annotations to MinIO and Console specific
  # services created by the operator.
  serviceMetadata: { }
  ###
  # Add environment variables to be set in MinIO container (https://github.com/minio/minio/tree/master/docs/config)
  env: [ ]
  ###
  # PriorityClassName indicates the Pod priority and hence importance of a Pod relative to other Pods.
  # This is applied to MinIO pods only.
  # Refer Kubernetes documentation for details https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/#priorityclass/
  priorityClassName: ""
  ###
  # An array of `Volumes <https://kubernetes.io/docs/concepts/storage/volumes/>`__ which the Operator can mount to Tenant pods.
  #
  # The volumes must exist *and* be accessible to the Tenant pods.
  additionalVolumes: [ ]
  ###
  # An array of volume mount points associated to each Tenant container.
  # 
  # Specify each item in the array as follows:
  #
  # .. code-block:: yaml
  #
  #    volumeMounts:
  #    - name: volumename
  #      mountPath: /path/to/mount
  #
  # The ``name`` field must correspond to an entry in the ``additionalVolumes`` array.
  additionalVolumeMounts: [ ]
  # Define configuration for KES (stateless and distributed key-management system)
  # Refer https://github.com/minio/kes
  #kes:
  #  ## Image field:
  #  # Image from tag (original behavior), for example:
  #  # image:
  #  #   repository: quay.io/minio/kes
  #  #   tag: 2025-03-12T09-35-18Z
  #  # Image from digest (added after original behavior), for example:
  #  # image:
  #  #   repository: quay.io/minio/kes@sha256
  #  #   digest: fb15af611149892f357a8a99d1bcd8bf5dae713bd64c15e6eb27fbdb88fc208b
  #  image:
  #    repository: quay.io/minio/kes
  #    tag: 2025-03-12T09-35-18Z
  #    pullPolicy: IfNotPresent
  #  env: [ ]
  #  replicas: 2
  #  configuration: |-
  #    address: :7373
  #    tls:
  #      key: /tmp/kes/server.key   # Path to the TLS private key
  #      cert: /tmp/kes/server.crt # Path to the TLS certificate
  #      proxy:
  #        identities: []
  #        header:
  #          cert: X-Tls-Client-Cert
  #    admin:
  #      identity: ${MINIO_KES_IDENTITY}
  #    cache:
  #      expiry:
  #        any: 5m0s
  #        unused: 20s
  #    log:
  #      error: on
  #      audit: off
  #    keystore:
  #      # KES configured with fs (File System mode) doesn't work in Kubernetes environments and is not recommended
  #      # use a real KMS
  #      # fs:
  #      #   path: "./keys" # Path to directory. Keys will be stored as files. Not Recommended for Production.
  #      vault:
  #        endpoint: "http://vault.default.svc.cluster.local:8200" # The Vault endpoint
  #        namespace: "" # An optional Vault namespace. See: https://www.vaultproject.io/docs/enterprise/namespaces/index.html
  #        prefix: "my-minio"    # An optional K/V prefix. The server will store keys under this prefix.
  #        approle:    # AppRole credentials. See: https://www.vaultproject.io/docs/auth/approle.html
  #          id: "<YOUR APPROLE ID HERE>"      # Your AppRole Role ID
  #          secret: "<YOUR APPROLE SECRET ID HERE>"  # Your AppRole Secret ID
  #          retry: 15s  # Duration until the server tries to re-authenticate after connection loss.
  #        tls:        # The Vault client TLS configuration for mTLS authentication and certificate verification
  #          key: ""     # Path to the TLS client private key for mTLS authentication to Vault
  #          cert: ""    # Path to the TLS client certificate for mTLS authentication to Vault
  #          ca: ""      # Path to one or multiple PEM root CA certificates
  #        status:     # Vault status configuration. The server will periodically reach out to Vault to check its status.
  #          ping: 10s   # Duration until the server checks Vault's status again.
  #      # aws:
  #      #   # The AWS SecretsManager key store. The server will store
  #      #   # secret keys at the AWS SecretsManager encrypted with
  #      #   # AWS-KMS. See: https://aws.amazon.com/secrets-manager
  #      #   secretsmanager:
  #      #     endpoint: ""   # The AWS SecretsManager endpoint      - e.g.: secretsmanager.us-east-2.amazonaws.com
  #      #     region: ""     # The AWS region of the SecretsManager - e.g.: us-east-2
  #      #     kmskey: ""     # The AWS-KMS key ID used to en/decrypt secrets at the SecretsManager. By default (if not set) the default AWS-KMS key will be used.
  #      #     credentials:   # The AWS credentials for accessing secrets at the AWS SecretsManager.
  #      #       accesskey: ""  # Your AWS Access Key
  #      #       secretkey: ""  # Your AWS Secret Key
  #      #       token: ""      # Your AWS session token (usually optional)
  #  imagePullPolicy: "IfNotPresent"
  #  externalCertSecret: null
  #  clientCertSecret: null
  #  # Key name to be created on the KMS, default is "my-minio-key"
  #  keyName: ""
  #  resources: { }
  #  nodeSelector: { }
  #  affinity:
  #    nodeAffinity: { }
  #    podAffinity: { }
  #    podAntiAffinity: { }
  #  tolerations: [ ]
  #  annotations: { }
  #  labels: { }
  #  serviceAccountName: ""
  #  securityContext:
  #    runAsUser: 1000
  #    runAsGroup: 1000
  #    runAsNonRoot: true
  #    fsGroup: 1000
  #  containerSecurityContext:
  #    runAsUser: 1000
  #    runAsGroup: 1000
  #    runAsNonRoot: true
  #    allowPrivilegeEscalation: false
  #    capabilities:
  #      drop:
  #        - ALL
  #    seccompProfile:
  #      type: RuntimeDefault

###
# Configures `Ingress <https://kubernetes.io/docs/concepts/services-networking/ingress/>`__ for the Tenant S3 API and Console.
#
# Set the keys to conform to the Ingress controller and configuration of your choice.
ingress:
  api:
    enabled: false
    ingressClassName: ""
    labels: { }
    annotations: { }
    tls: [ ]
    host: minio.local
    path: /
    pathType: Prefix
  console:
    enabled: false
    ingressClassName: ""
    labels: { }
    annotations: { }
    tls: [ ]
    host: minio-console.local
    path: /
    pathType: Prefix
# Use an extraResources template section to include additional Kubernetes resources
# with the Helm deployment.
#extraResources:
#  - |
#    apiVersion: v1
#    kind: Secret
#    type: Opaque
#    metadata:
#      name: {{ dig "tenant" "configSecret" "name" "" (.Values | merge (dict)) }}
#    stringData:
#      config.env: |-
#        export MINIO_ROOT_USER='minio'
#        export MINIO_ROOT_PASSWORD='minio123'

16 - mc ilm ls

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm ls replaced by mc ilm rule ls.

Syntax

The mc ilm ls command summrizes all configured object lifecycle management rules on a MinIO bucket in a tabular format.

The output of the command might resemble the following:

┌───────────────────────────────────────────────────────────────────────────────┐
│ Transition for latest version (Transition)├────────┬─────────┬────────┬─────────────────────┬──────────────┬──────────────┤
│ ID     │ STATUS  │ PREFIX │ TAGS                │ DAYS TO TIER │ TIER         │
├────────┼─────────┼────────┼─────────────────────┼──────────────┼──────────────┤
│ rule-1 │ Enabled │ doc/   │ key1=val1&key2=val2 │            0 │ WARM-MINIO-1 │
└────────┴─────────┴────────┴─────────────────────┴──────────────┴──────────────┘
┌────────────────────────────────────────────────────────────────┐
│ Transition for older versions (NoncurrentVersionTransition)├────────┬─────────┬────────┬──────┬──────────────┬──────────────┤
│ ID     │ STATUS  │ PREFIX │ TAGS │ DAYS TO TIER │ TIER         │
├────────┼─────────┼────────┼──────┼──────────────┼──────────────┤
│ rule-2 │ Enabled │ logs/  │ -    │           10 │ WARM-MINIO-1 │
└────────┴─────────┴────────┴──────┴──────────────┴──────────────┘
┌────────────────────────────────────────────────────────────────────────────────────────┐
│ Expiration for latest version (Expiration)├────────┬─────────┬────────┬─────────────────────┬────────────────┬─────────────────────┤
│ ID     │ STATUS  │ PREFIX │ TAGS                │ DAYS TO EXPIRE │ EXPIRE DELETEMARKER │
├────────┼─────────┼────────┼─────────────────────┼────────────────┼─────────────────────┤
│ rule-1 │ Enabled │ doc/   │ key1=val1&key2=val2 │             30false└────────┴─────────┴────────┴─────────────────────┴────────────────┴─────────────────────┘
┌──────────────────────────────────────────────────────────────────────────────────┐
│ Expiration for older versions (NoncurrentVersionExpiration)├────────┬─────────┬────────┬─────────────────────┬────────────────┬───────────────┤
│ ID     │ STATUS  │ PREFIX │ TAGS                │ DAYS TO EXPIRE │ KEEP VERSIONS │
├────────┼─────────┼────────┼─────────────────────┼────────────────┼───────────────┤
│ rule-1 │ Enabled │ doc/   │ key1=val1&key2=val2 │             150│ rule-2 │ Enabled │ logs/  │ -                   │              13└────────┴─────────┴────────┴─────────────────────┴────────────────┴───────────────┘

The following command lists all lifecycle management rules for the mydata bucket on the myminio MinIO deployment:

mc ilm ls myminio/mydata

The mc ilm ls command has the following syntax:

mc [GLOBALFLAGS] ilm ls                        \
                 [--expiry | --transition]     \
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required

The alias and full path to the bucket on the MinIO deployment for which to list the object lifecycle management rules. For example:

mc ilm ls myminio/mydata
--expiry

mc-cmd

Optional

mc ilm ls returns only fields related to lifecycle rule expiration.

Mutually exclusive with --transition.

--transition

mc-cmd

Optional

mc ilm ls returns only fields related to lifecycle rule transition.

Mutually exclusive with --expiry.

Global Flags

This command supports any of the global flags.

Examples

List Bucket Lifecycle Management Rules

Use mc ilm ls to list a bucket’s lifecycle management rules:

mc ilm ls ALIAS/PATH
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket on the S3-compatible host.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

17 - mc ilm rm

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc ilm rm replaced by mc ilm rule rm.

Syntax

The mc ilm rm command removes an object lifecycle management rule from a MinIO Bucket.

The mc ilm remove command has equivalent functionality to mc ilm rm.

The following command removes a single lifecycle management rule from the mydata bucket on the myminio MinIO deployment:

mc ilm rm --id "bgrt1ghju" myminio/mydata

The command has the following syntax:

mc [GLOBALFLAGS] ilm rm                          \
                 --id "string" | (--all --force) \
                 ALIAS                           \
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

mc-cmd

Required The alias and full path to the bucket on the MinIO deployment to which to remove the object lifecycle management rule. For example:

mc ilm rm myminio/mydata
all

mc-cmd

Required Removes all rules in the bucket. Mutually exclusive with mc ilm rm id.

Mutually exclusive with mc ilm rm id

Requires including force.

force

mc-cmd

Required if specifying all.

id

mc-cmd

Required The unique ID of the rule. Use mc ilm rule ls to list bucket rules and retrieve the id for the rule you want to remove.

Mutually exclusive with mc ilm rm all

Global Flags

This command supports any of the global flags.

Examples

Remove a Bucket Lifecycle Management Rule

Use mc ilm rm to remove a bucket lifecycle management rule:

mc ilm rm --id "RULE" ALIAS/PATH
  • Replace RULE with the unique name of the lifecycle management rule.
  • Replace ALIAS with the alias of the S3-compatible host.
  • Replace PATH with the path to the bucket on the S3-compatible host.

Behavior

S3 Compatibility

The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.

MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.

18 - mc quota

Note

Changed: RELEASE.2024-07-31T15-58-33Z

mc quota and its subcommands are deprecated.

Description

The mc quota commands configure, display, or remove a quota limit on a bucket.

When a bucket with a quota configured reaches the specified limit, as determined by the MinIO object scanner, MinIO rejects further PUT requests for the bucket.

Each time the MinIO object scanner scans a bucket for pending object lifecycle transitions, it also checks if the bucket has exceeded a configured quota.

Note

Quota enforcement is not immediate

Bucket quotas are not intended to enforce a strict hard limit on a bucket’s size. If a bucket exceeds its quota between scanner passes, MinIO continues to accept PUT requests for that bucket until after the next scanner pass identifies the quota violation.

Subcommands

mc quota includes the following subcommands:

Subcommand

Description

clear

The mc quota clear command removes a configured storage quota for a bucket.

info

The mc quota info command displays the currently configured quota for a bucket.

set

The mc quota set assigns a hard quota limit to a bucket beyond which MinIO does not allow writes.

19 - mc admin bucket quota

Note

Changed: RELEASE.2022-12-13T00-23-28Z

mc admin bucket quota replaced by:

Description

The mc admin bucket quota command manages per-bucket storage quotas.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Units of Measurement

The mc admin bucket quota --hard flag accepts the following case-insensitive suffixes to represent the unit of the specified size value:

Suffix Unit Size
k KB (Kilobyte, 1000 Bytes)
m MB (Megabyte, 1000 Kilobytes)
g GB (Gigabyte, 1000 Megabytes)
t TB (Terrabyte, 1000 Gigabytes)
ki KiB (Kibibyte, 1024 Bites)
mi MiB (Mebibyte, 1024 Kibibytes)
gi GiB (Gibibyte, 1024 Mebibytes)
ti TiB (Tebibyte, 1024 Gibibytes)

Omitting the suffix defaults to bytes.

Examples

Configure a Hard Quota on a Bucket

Use mc admin bucket quota with the --hard flag to specify a hard quota on a bucket. Hard quotas prevent the bucket size from growing past the specified limit.

mc admin bucket quota TARGET/BUCKET --hard LIMIT
  • Replace TARGET with the alias of a configured MinIO deployment. Replace BUCKET with the name of the bucket on which to set the hard quota.
  • Replace LIMIT with the maximum size to which the bucket can grow. For example, to set a hard limit of 10 Terrabytes, specify 10t. See Units of Measurement for supported units.

Retrieve Bucket Quota Configuration

Use mc admin bucket quota to retrieve the current quota configuration for a bucket:

mc admin bucket quota TARGET/BUCKET

Replace TARGET with the alias of a configured MinIO deployment. Replace BUCKET with the name of the bucket on which to retrieve the quota.

Clear Configured Bucket Quota

Use mc admin bucket quota with the --clear flag to clear all quotas from a bucket.

mc admin bucket quota TARGET/BUCKET --clear
  • Replace TARGET with the alias of a configured MinIO deployment. Replace BUCKET with the name of the bucket on which to clear the quota.

Syntax

mc admin bucket quota has the following syntax:

mc admin bucket quota TARGET [ARGUMENTS]

mc admin bucket quota supports the following arguments:

TARGET

mc-cmd

The full path to the bucket for which the command creates the quota. Specify the alias of the MinIO deployment as a prefix to the path. For example:

mc admin bucket quota play/mybucket

Omit all other arguments to return the current quota settings for the specified bucket.

--hard

mc-cmd

Sets a maximum limit to the bucket storage size. The MinIO server rejects any incoming PUT request whose contents would exceed the bucket’s configured quota.

For example, a hard limit of 10GB would prevent adding any additional objects if the bucket reaches 10GB of size.

See Units of Measurement for supported unit sizes.

--clear

mc-cmd

Clears all quotas configured for the bucket.

20 - mc admin bucket remote

Note

Changed: RELEASE.2022-12-24T15-21-38Z

Note

Changed: RELEASE.2023-02-16T19-20-11Z

  • mc admin bucket remote bandwidth replaced by mc replicate status

    Replication related statistics are moving to the mc replicate status command.

Description

The mc admin bucket remote command manages the ARN resources for use with bucket replication.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Examples

Add a New Replication Target

Use mc admin bucket remote add to create a new replication target ARN for use with mc replicate add:

mc admin bucket remote add SOURCE/BUCKET DESTINATION/BUCKET
  • Replace SOURCE with the alias of the MinIO deployment to use as the replication target. Replace BUCKET with the full path of the bucket into which MinIO replicates objects from the DESTINATION.
  • Replace DESTINATION with the alias of the MinIO deployment to use as the replication source. Replace BUCKET with the full path of the bucket from which MinIO replicates objects into the SOURCE.

Remove an Existing Replication Target

Use mc admin bucket remote rm to remove a replication target from a bucket:

mc admin bucket remote rm SOURCE/BUCKET --arn ARN
  • Replace SOURCE with the alias of the MinIO deployment being used as the replication source. Replace BUCKET with the full path of the bucket from which MinIO replicates objects.
  • Replace ARN with the ARN of the remote target.

Removing the target halts all in-progress bucket replication to the target.

Retrieve Configured Replication Targets

Use mc replicate ls to list a bucket’s configured replication targets:

mc replicate ls ALIAS/PATH
  • Replace ALIAS with the alias of the MinIO deployment being used as the replication source. Replace PATH with the full path of the bucket from which MinIO replicates objects.

Syntax

mc admin bucket remote add

mc-cmd

Note

Changed: RELEASE.2022-12-24T15-21-38Z

Adds a remote target to a bucket on a MinIO deployment. The command has the following syntax:

mc admin bucket remote add SOURCE DESTINATION --service "replication" [FLAGS]

The command accepts the following arguments:

SOURCE

mc-cmd

Required

The full path to the bucket to which the command adds the remote target. Specify the alias of a configured MinIO deployment as the prefix to the bucket path. For example:

mc admin bucket remote add play/mybucket

DESTINATION

mc-cmd

Required

The target MinIO deployment and bucket.

Specify the full URL to the destination MinIO deployment and bucket using the following format:

http(s)://ACCESSKEY:SECRETKEY@DESTHOSTNAME/DESTBUCKET
  • Replace ACCESSKEY with the access key for a user on the

    destination MinIO deployment.

  • Replace SECRETKEY with the secret key for a user on the

    destination MinIO deployment.

  • Replace DESTHOSTNAME with the hostname and port of the MinIO

    deployment (i.e. minio-server.example.net:9000).

  • Replace DESTBUCKET with the bucket on the

    destination.

--service

mc-cmd

Required

Specify "replication".

--region

mc-cmd

The region of the DESTINATION.

Mutually exclusive with add

--path

mc-cmd

The bucket path lookup supported by the destination server. Specify one of the following:

  • on
  • off
  • auto (Default)

Mutually exclusive with add

--sync

mc-cmd

Enables synchronous replication, where MinIO attempts to replicate the object prior to returning the PUT object response. Synchronous replication may increase the time spent waiting for PUT operations to return successfully.

By default, mc admin bucket remote add operates in asynchronous mode, where MinIO attempts replicating objects after returning the PUT object response.

mc admin bucket remote ls

mc-cmd

Note

Changed: RELEASE.2022-12-24T15-21-38Z

Lists all remote targets associated to a bucket on the MinIO deployment. Use mc admin bucket remote ls --help for usage syntax.

mc admin bucket remote rm, remove

mc-cmd

Note

Changed: RELEASE.2022-12-24T15-21-38Z

Removes a remote target for a bucket on the MinIO deployment. The command has the following syntax:

mc admin bucket remote rm SOURCE --arn ARN

The command accepts the following arguments:

SOURCE

mc-cmd

Required

The full path to the bucket from which the command removes the remote target. Specify the alias of a configured MinIO deployment as the prefix to the bucket path. For example:

mc admin bucket remote rm play/mybucket

ARN

mc-cmd

Required

The ARN of the remote target for which the command removes from the target bucket. Use mc admin bucket remote ls to list all remote targets and their associated ARNs for a specific bucket.

21 - mc admin console

Warning

Important

This command has been replaced by mc admin logs in mc RELEASE.2022-12-02T23-48-47Z.

The command was previously replaced by mc support logs show in mc RELEASE.2022-06-26T18-51-48Z.

Description

The mc admin console command returns server log entries for each MinIO server in the deployment.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Syntax

mc admin console has the following syntax:

mc admin console [FLAGS] TARGET NODENAME

mc admin console supports the following:

TARGET

mc-cmd

The alias of a configured MinIO deployment from which the command retrieves server logs.

NODENAME

mc-cmd

The specific MinIO server node from which the command retrieves server logs.

--limit, l

mc-cmd

The number of most recent log entries to show. Defaults to 10.

--type, t

mc-cmd

The type of errog logs to return. Specify one or more of the following options as a comma-seperated , list:

  • minio
  • application
  • all (Default)

22 - mc admin idp ldap

Note

Changed: RELEASE.2023-05-26T23-31-54Z

mc admin idp ldap and its subcommands replaced by mc idp ldap.

Description

The mc admin idp ldap commands allow you to add, modify, review, list, remove, enable, and disable server configurations to 3rd party Active Directory or LDAP Identity and Access Management (IAM) integrations.

Define configuration settings as an alternative to using environment variables when setting up an AD/LDAP connection.

Note

Note

Configuration settings do not override settings configured as environment variables.

The mc admin idp ldap command has the following subcommands:

Subcommand Description
mc admin idp ldap add Create an AD/LDAP IDP server configuration.
mc admin idp ldap update Modify an existing AD/LDAP IDP server configuration.
mc admin idp ldap ls Lists AD/LDAP server configurations.
mc admin idp ldap rm Remove an AD/LDAP IDP server configuration from a deployment.
mc admin idp ldap info Displays details for a specific AD/LDAP server configuration.
mc admin idp ldap enable Enables an AD/LDAP server configuration.
mc admin idp ldap disable Disables an AD/LDAP server configuration.
mc admin idp ldap policy entities List policy association entities

Configuration Parameters

The mc admin idp ldap subcommands support configuration parameters. The parameters define the server’s interaction with the Active Directory or LDAP IAM provider.

For a more detailed explanation of the configuration parameters, refer to the config setting documentation.

Syntax

add

mc-cmd

Create a new configuration for an AD/LDAP provider. MinIO supports no more than one (1) AD/LDAP provider per deployment.

The following example sets the AD/LDAP configuration settings for the myminio deployment.

 mc admin idp ldap add                                               \
      myminio                                                        \
      server_addr=myldapserver:636                                   \
      lookup_bind_dn=cn=admin,dc=min,dc=io                           \
      lookup_bind_password=somesecret                                \
      user_dn_search_base_dn=dc=min,dc=io                            \
      user_dn_search_filter="(uid=%s)"                               \
      group_search_base_dn=ou=swengg,dc=min,dc=io                    \
      group_search_filter="(&(objectclass=groupofnames)(member=%d))"

The command has the following syntax:

mc [GLOBALFLAGS] admin idp ldap add          \
                           ALIAS             \
                           [CFG_PARAM1]      \
                           [CFG_PARAM2]...
  • Replace ALIAS with the alias of a MinIO deployment to create for AD/LDAP integration.
  • Replace the [CFG_PARAM#] with each of the configuration setting key-value pairs in the format of PARAMETER="value".

update

mc-cmd

Modify an existing set of configurations for an AD/LDAP provider.

The following example changes two of the AD/LDAP configuration settings for the myminio deployment.

mc admin idp ldap update                                \
                  myminio                               \
                  lookup_bind_dn=cn=admin,dc=min,dc=io  \
                  lookup_bind_password=somesecret

The command has the following syntax:

mc [GLOBALFLAGS] admin idp ldap update           \
                                ALIAS            \
                                [CFG_PARAM1]     \
                                [CFG_PARAM2]...
  • Replace ALIAS with the alias of a MinIO deployment to update for AD/LDAP integration.
  • Replace the [CFG_PARAM#] with each of the configuration setting key-value pairs to update in the format of PARAMETER="value".

ls, list

mc-cmd

Lists the existing set of configurations for an AD/LDAP provider.

The following example lists the AD/LDAP configuration settings for the myminio deployment.

mc admin idp ldap ls myminio

The command has the following syntax:

mc [GLOBALFLAGS] admin idp ldap ls ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to list the AD/LDAP integration.

rm, remove

mc-cmd

Remove the existing configuration for an AD/LDAP provider.

The following example removes the AD/LDAP provider settings for the myminio deployment.

mc admin idp ldap rm myminio

The command has the following syntax:

mc [GLOBALFLAGS] admin idp ldap rm     \
                                ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to remove the AD/LDAP integration.

info

mc-cmd

Outputs the current configuration for an AD/LDAP provider on a specified MinIO deployment.

The following example outputs the AD/LDAP configuration settings on the myminio deployment.

mc admin idp ldap info myminio

The command has the following syntax:

mc [GLOBALFLAGS] admin idp ldap info     \
                                ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to retrieve info on the AD/LDAP integration.

enable

mc-cmd

Enables the currently configured AD/LDAP provider.

The following example enables the AD/LDAP configuration on the myminio deployment.

mc admin idp ldap enable       \
                  myminio

The command has the following syntax:

mc [GLOBALFLAGS] admin idp ldap enable     \
                                ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to enable the AD/LDAP integration.

disable

mc-cmd

Disables the currently configured AD/LDAP provider.

The following example disables the AD/LDAP configurations on the myminio deployment.

mc admin idp ldap disable      \
                  myminio

The command has the following syntax:

mc [GLOBALFLAGS] admin idp ldap disable       \
                                ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to disable the AD/LDAP integration.

Global Flags

This command supports any of the global flags.

23 - mc admin idp ldap policy

Note

Changed: RELEASE.2023-05-26T23-31-54Z

mc admin idp ldap policy and its subcommands replaced by mc idp ldap policy.

Description

The mc admin idp ldap policy command allows you to view the mapping relationships between policies and the associated groups or users.

The mc admin idp ldap policy command has the following subcommands:

Subcommand Description
mc admin idp ldap policy attach Attach a policy to an entity
mc admin idp ldap policy detach Detach a policy from an entity
mc admin idp ldap policy entities List policy entity mappings

Syntax

attach

mc-cmd

Attach one or more polices to entity.

The following example attaches two policies, policy1 and policy2, to the projectb group on the myminio deployment.

 mc admin idp ldap policy attach myminio/                                               \
                                 policy1                                                \
                                 policy2                                                \
                                 --group='cn=projectb,ou=groups,ou=swengg,dc=min,dc=io'

The following example attaches the policy, userpolicy, to the user bobfisher on the myminio deployment.

 mc admin idp ldap policy attach myminio/                                               \
                                 mypolicy                                               \
                                 policy2                                                \
                                 --user='uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io'

The command has the following syntax:

mc [GLOBALFLAGS] admin idp ldap policy attach     \
                                POLICYNAME        \
                                [POLICY2] ...     \
                                ALIAS             \
                                [--user=`USER`]   \
                                [--group=`GROUP`]
  • Replace ALIAS with the alias of a MinIO deployment to configure for AD/LDAP integration.
  • Replace POLICYNAME with the policy to attach to the entity. You may list multiple policies to attach to the entity.
  • Use must use one of either the --user or --group flag. You may only use the flag once in the command. You cannot use both flags in the same command.

detach

mc-cmd

Detach one or more policies from an entity.

The following example detaches two policies, policy1 and policy2, from the projectb group on the myminio deployment.

 mc admin idp ldap policy detach myminio/                                               \
                                 policy1                                                \
                                 policy2                                                \
                                 --group='cn=projectb,ou=groups,ou=swengg,dc=min,dc=io'

The following example detaches the policy, userpolicy, from the user bobfisher on the myminio deployment.

 mc admin idp ldap policy detach myminio/                                               \
                                 mypolicy                                               \
                                 policy2                                                \
                                 --user='uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io'

The command has the following syntax:

mc [GLOBALFLAGS] admin idp ldap policy detach     \
                                POLICYNAME        \
                                [POLICY2] ...     \
                                ALIAS             \
                                [--user=`USER`]   \
                                [--group=`GROUP`]
  • Replace ALIAS with the alias of a MinIO deployment to configure for AD/LDAP integration.
  • Replace POLICYNAME with the policy to detach from the entity. You may list multiple policies to detach from the entity.
  • Use must use one of either the --user or --group flag. You may only use the flag once in the command. You cannot use both flags in the same command.

entities

mc-cmd

Display a list of mappings for a user, group, and/or policy.

The following example lists all mappings for a specific policy, a set of groups, and a selection of users on the myminio deployment.

Specifically, it lists - Users mapped to the finteam-policy policy. - Policies assigned to the uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io user - Policies assigned to the cn=projectb,ou=groups,ou=swengg,dc=min,dc=io group

 mc admin idp ldap policy entities myminio/                                            \
                              --policy finteam-policy                                  \
                              --user 'uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=io'  \
                              --group 'cn=projectb,ou=groups,ou=swengg,dc=min,dc=io'

The command has the following syntax:

mc [GLOBALFLAGS] admin idp ldap policy entities                \
                                ALIAS                          \
                                [--user `value`, -u `value`]   \
                                [--group `value`, -g `value`]  \
                                [--policy value]
  • Replace ALIAS with the alias of a MinIO deployment to configure for AD/LDAP integration.
  • You may use each of the --user, --group, and/or --policy flags as many times as desired in the command.
  • For each flag, the output lists the entities mapped to the specified policy, user, or group.
  • Omit all flags to return a list of mappings for all policies.

Global Flags

This command supports any of the global flags.

24 - mc admin idp openid

Note

Changed: RELEASE.2023-05-26T23-31-54Z

mc admin idp openid and its subcommands replaced by mc idp openid.

Description

The mc admin idp openid commands allow you to add, modify, review, list, remove, enable, and disable server configurations to 3rd party OpenID Identity and Access Management (IAM) integrations.

Define configuration settings as an alternative to using environment variables when setting up an OpenID connection.

The mc admin idp openid command has the following subcommands:

Subcommand Description
mc admin idp openid add Create an OpenID IDP server configuration.
mc admin idp openid update Modify an existing OpenID IDP server configuration.
mc admin idp openid rm Remove an OpenID IDP server configuration from a deployment.
mc admin idp openid ls Outputs a list of the existing OpenID server configurations for a deployment.
mc admin idp openid info Displays details for a specific OpenID server configuration.
mc admin idp openid enable Enables an OpenID server configuration.
mc admin idp openid disable Disables an OpenID server configuration.

Configuration Parameters

The mc admin idp openid subcommands support configuration parameters. The parameters define the server’s interaction with the IAM provider.

For a more detailed explanation of the configuration parameters, refer to the config setting documentation.

Syntax

add

mc-cmd

Create a new set of configurations for an OpenID provider.

You can run the command multiple times to set up multiple OpenID providers.

When adding multiple OpenID providers, only one can be a JWT Claim-based provider. All others must be role-based providers.

The following example creates the configuration settings for the myminio deployment as defined in a new test-config setup for Dex integration.

 mc admin idp openid add myminio test-config                                  \
    client_id=minio-client-app                                                \
    client_secret=minio-client-app-secret                                     \
    config_url="http://localhost:5556/dex/.well-known/openid-configuration"   \
    scopes="openid,groups"                                                    \
    redirect_uri="http://127.0.0.1:10000/oauth_callback"                      \
    role_policy="consoleAdmin"

The command has the following syntax:

mc [GLOBALFLAGS] admin idp openid add        \
                           ALIAS             \
                           [CFG_NAME]        \
                           [CFG_PARAM1]      \
                           [CFG_PARAM2]...
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the command creates default configuration values.
  • Replace the [CFG_PARAM#] with each of the configuration setting key-value pairs in the format of PARAMETER="value".

update

mc-cmd

Modify an existing set of configurations for an OpenID provider.

The following example changes two of the configuration settings for the myminio deployment as defined in the test-config setup for Dex integration.

mc admin idp openid update                      \
                    myminio                     \
                    test_config                 \
                    scopes="openid,groups"      \
                    role_policy="consoleAdmin"

The command has the following syntax:

mc [GLOBALFLAGS] admin idp openid update           \
                                  ALIAS            \
                                  [CFG_NAME]       \
                                  [CFG_PARAM1]     \
                                  [CFG_PARAM2]...
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the command updates the default configuration.
  • Replace the [CFG_PARAM#] with each of the configuration setting key-value pairs to update in the format of PARAMETER="value".

rm, remove

mc-cmd

Remove an existing set of configurations for an OpenID provider.

The following example removes the test-config settings for the myminio deployment.

mc admin idp openid rm myminio test_config

The command has the following syntax:

mc [GLOBALFLAGS] admin idp openid rm     \
                                  ALIAS      \
                                  [CFG_NAME]
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the command removes the default configurations.

ls, list

mc-cmd

Outputs a list of existing configuration sets for OpenID providers.

The following example outputs a list of all OpenID configuration sets defined for the myminio deployment.

mc admin idp openid ls myminio

The command has the following syntax:

mc [GLOBALFLAGS] admin idp openid ls ALIAS
  • Replace ALIAS with the alias of a MinIO deployment to list OpenID integrations for.

info

mc-cmd

Outputs the set of values defined for an existing set of server configurations for an OpenID provider.

The following example outputs the configuration settings defined for the test_config set of OpenID settings on the myminio deployment.

mc admin idp openid info myminio test_config

The command has the following syntax:

mc [GLOBALFLAGS] admin idp openid info     \
                                  ALIAS      \
                                  [CFG_NAME]
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the information displays for the default server configuration.

enable

mc-cmd

Begin using an existing set of configurations for an OpenID provider.

The following example enables the server configurations defined as test_config on the myminio deployment.

mc admin idp openid enable       \
                    myminio      \
                    test_config

The command has the following syntax:

mc [GLOBALFLAGS] admin idp openid enable     \
                                  ALIAS      \
                                  [CFG_NAME]
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the command enables the default configuration values.

disable

mc-cmd

Stop using a set of configurations for an OpenID provider.

The following example disables the server configurations defined as test_config on the myminio deployment.

mc admin idp openid disable      \
                    myminio      \
                    test_config

The command has the following syntax:

mc [GLOBALFLAGS] admin idp openid disable       \
                                  ALIAS         \
                                  [CFG_NAME]
  • Replace ALIAS with the alias of a MinIO deployment to configure for OpenID integration.
  • Replace CFG_NAME with a unique string for this configuration. If not specified, the command disables the default configuration values.

Global Flags

This command supports any of the global flags.

25 - mc admin profile

Note

Note

This command has been replaced by mc support profile as of mc RELEASE.2023-04-06T16-51-10Z.

Description

The mc admin profile command generates profiling data for debugging purposes.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Profile Data Format

mc admin profile produces a ZIP archive profile.zip that contains one or more .pprof files. Use the pprof go utility to read the profile data.

Examples

Profile Data for Single Resource

Use mc admin profile start with the type flag to start profiling the resource:

mc admin profile start --type "TYPE" ALIAS
  • Replace ALIAS with the alias of the MinIO host.
  • Replace TYPE with the resource to profile.

Use mc admin profile stop to stop profiling data from the specified resource and output the results:

mc admin profile stop

The command outputs the profiled data as profile.zip.

Profile Data for Multiple Resources

Use mc admin profile start with the type flag to start profiling the resources:

mc admin profile start --type "TYPE,[TYPE...]" ALIAS
  • Replace ALIAS with the alias of the MinIO host.
  • Replace TYPE with the resources to profile. Specify multiple resources as a comma-separated list.

Use mc admin profile stop to stop profiling data from the specified resources and output the results:

mc admin profile stop

The command outputs the profiled data as profile.zip.

Syntax

mc admin profile has the following syntax:

mc admin profile SUBCOMMAND

mc admin profile supports the following subcommands:

mc admin profile start

mc-cmd

Starts collecting profiling data on the target MinIO deployment. The command has the following syntax:

mc admin profile start [FLAGS] TARGET

mc admin profile start supports the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment from which the command collects profiling data.

type

mc-cmd

The type(s) of profiling data to collect from the TARGET MinIO deployment.

Specify one or more of the following supported types as a comma-separated list:

  • cpu
  • mem
  • block
  • mutex
  • trace
  • threads
  • goroutines

Defaults to cpu,mem,block if omitted.

mc admin profile stop

mc-cmd

Stops the profiling process and returns the collected data as profile.zip. The zip file contains one or more .pprof files which are readable with programs like the go pprof utility.

The command has the following syntax:

mc admin profile stop TARGET

The command supports the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment from which the command returns available profiling data.

26 - mc admin speedtest

Note

Changed: RELEASE.2022-07-24T02-25-13Z

mc admin speedtest replaced by mc support perf.

Description

The mc admin speedtest command tests throughputs per host with PUT and GET operations.

speedtest is available starting with mc RELEASE.2021-09-02T09-21-27Z and supports distributed MinIO deployments running RELEASE.2021-07-30T00-02-00Z or later.

speedtest does not support standalone or MinIO Gateway deployments.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Syntax

mc admin speedtest has the following syntax:

mc admin speedtest [FLAGS] TARGET

mc admin speedtest supports the following arguments:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment to run the speedtest against.

--duration

mc-cmd

The duration the entire speedtests are run. Defaults to 10s.

--size

mc-cmd

The size of the objects used for uploads/downloads. Defaults to 64MiB.

--concurrent

mc-cmd

The number of concurrent requests per server. Defaults to 32.

27 - mc admin tier

Note

Changed: RELEASE.2022-12-24T15-21-38Z

mc admin tier replaced by mc ilm tier.

Description

The mc admin tier command configures a remote supported S3-compatible service for supporting MinIO Lifecycle Management: Object Transition (“Tiering”).

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Supported S3 Services

mc admin tier supports only the following S3-compatible services as a remote target for object tiering:

  • Amazon S3
  • Google Cloud Storage
  • Azure Blob Storage

Required Permissions

MinIO requires the following permissions scoped to the bucket or buckets for which you are creating lifecycle management rules.

MinIO also requires the following administrative permissions on the cluster in which you are creating remote tiers for object transition lifecycle management rules:

For example, the following policy provides permission for configuring object transition lifecycle management rules on any bucket in the cluster:.

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "admin:SetTier",
               "admin:ListTier"
            ],
            "Effect": "Allow",
            "Sid": "EnableRemoteTierManagement"
      },
      {
            "Action": [
               "s3:PutLifecycleConfiguration",
               "s3:GetLifecycleConfiguration"
            ],
            "Resource": [
                        "arn:aws:s3:::*"
            ],
            "Effect": "Allow",
            "Sid": "EnableLifecycleManagementRules"
      }
   ]
}

Transition Permissions

Object transition lifecycle management rules require additional permissions on the remote storage tier. Specifically, MinIO requires the remote tier credentials provide read, write, list, and delete permissions.

For example, if the remote storage tier implements AWS IAM policy-based access control, the following policy provides the necessary permission for transitioning objects into and out of the remote tier:

{
   "Version": "2012-10-17",
   "Statement": [
      {
            "Action": [
               "s3:ListBucket"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:s3:::MyDestinationBucket"
            ],
            "Sid": ""
      },
      {
            "Action": [
               "s3:GetObject",
               "s3:PutObject",
               "s3:DeleteObject"
            ],
            "Effect": "Allow",
            "Resource": [
               "arn:aws:s3:::MyDestinationBucket/*"
            ],
            "Sid": ""
      }
   ]
}

Modify the Resource for the bucket into which MinIO tiers objects.

Defer to the documentation for the supported tiering targets for more complete information on configuring users and permissions to support MinIO tiering:

Syntax

mc admin tier add

mc-cmd

Creates a new remote storage tier for transitioning objects using MinIO lifecycle management rules.

Warning

Important

MinIO does not support removing remote storage tiers. Ensure the storage backend supports the intended workload prior to adding it as a remote tier target.

The command has the following syntax:

mc admin tier add TIER_TYPE TARGET TIER_NAME [FLAGS]

The command accepts the following arguments:

TIER_TYPE

mc-cmd

Required

The Cloud Service Provider storage backend (“Tier”) to which MinIO transitions objects. Specify one of the following supported values:

s3

Use AWS S3 or a remote MinIO deployment as the storage backend for the new Tier.

Requires specifying the following additional options:

azure

Use Azure Blob Storage as the storage backend for the new Tier.

Requires specifying the following additional options:

gcs

Use GCP Cloud Storage as the storage backend for the new Tier.

Requires specifying the following additional option:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment on which the command creates the new remote tier.

TIER_NAME

mc-cmd

Required

The name to associate with the new remote tier. The name must be unique across all configured tiers on the MinIO cluster.

You must specify the tier in all-caps, e.g. WARM_TIER.

--endpoint

mc-cmd

Required

The URL endpoint for the cloud service provider. The URL endpoint must resolve to the provider specified to TIER_TYPE.

--access-key

mc-cmd

Required

The access key for a user on the remote S3 tier. The user must have permission to perform read/write/list/delete operations on the remote bucket or bucket prefix.

Required if TIER_TYPE is s3. This option has no effect for any other value of TIER_TYPE.

--secret-key

mc-cmd

Required

The secret key for a user on the remote S3 tier.

Required if TIER_TYPE is s3. This option has no effect for any other value of TIER_TYPE.

--account-name

mc-cmd

Required

The account name for a user on the remote Azure tier. The user must have permission to perform read/write/list/delete operations on the remote bucket or bucket prefix.

Required if TIER_TYPE is azure. This option has no effect for any other value of TIER_TYPE.

MinIO does not support changing the account name associated to an Azure remote tier. Azure storage backends are tied to the account, such that changing the account would change the storage backend and prevent access to any objects transitioned to the original account/backend.

--account-key

mc-cmd

Required

The account key for the --account-name associated to the remote Azure tier.

Required if TIER_TYPE is azure. This option has no effect for any other value of TIER_TYPE.

--credentials-file

mc-cmd

Required

The credential file for a user on the remote GCS tier. The user must have permission to perform read/write/list/delete operations on the remote bucket or bucket prefix.

Required if TIER_TYPE is gcs. This option has no effect for any other value of TIER_TYPE.

--bucket

mc-cmd

Required

The bucket on the remote tier to which MinIO transitions objects.

--prefix

mc-cmd

Optional

The prefix path for the specified --bucket to which MinIO transitions objects.

Omit this field to transition objects into the bucket root.

--storage-class

mc-cmd

Optional

The AWS storage class to use for objects transitioned by MinIO. MinIO supports only the following storage classes:

  • STANDARD
  • REDUCED_REDUNDANCY

Defaults to S3_STANDARD if omitted.

This option only applies if TIER_TYPE is s3. This option has no effect for any other value of TIER_TYPE.

--region

mc-cmd

Optional

The S3 backend region for the specified TIER_TYPE, such as us-west-1.

This option only applies if TIER_TYPE is s3. This option has no effect for any other value of TIER_TYPE.

mc admin tier edit

mc-cmd

Modify or remove a remote storage tier from a MinIO cluster. Remote storage tiers support transitioning objects using MinIO lifecycle management rules.

The command has the following syntax:

mc admin tier edit TARGET TIER_NAME [FLAGS]

The command accepts the following arguments:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment.

TIER_NAME

mc-cmd

Required

The name of the remote tier the command modifies. The value corresponds to the mc admin tier add TIER_NAME specified when creating the remote tier.

--access-key

mc-cmd

Optional

The access key for a user on the remote S3 tier. The user must have permission to perform read/write/list/delete operations on the remote bucket or bucket prefix.

This option only applies to remote storage tiers with TIER_TYPE is s3. This option has no effect for any other TIER_TYPE.

--secret-key

mc-cmd

Optional

The secret key for a user on the remote S3 tier.

This option only applies to remote storage tiers with TIER_TYPE is s3. This option has no effect for any other TIER_TYPE.

--account-key

mc-cmd

Required

The account key for a user on the remote Azure tier. Use this option to rotate the credentials for the --account-name associated to the remote tier.

This option only applies to remote storage tiers with TIER_TYPE is azure. This option has no effect for any other TIER_TYPE.

--credentials-file

mc-cmd

Required

The credential file for a user on the remote GCS tier. The user must have permission to perform read/write/list/delete operations on the remote bucket or bucket prefix.

This option only applies to remote storage tiers with TIER_TYPE is gcs. This option has no effect for any other TIER_TYPE.

mc admin tier ls

mc-cmd

List all remote storage tiers on a MinIO cluster. Remote storage tiers support transitioning objects using MinIO lifecycle management rules.

The command has the following syntax:

mc admin tier ls TARGET [FLAGS]

The command accepts the following arguments:

TARGET

mc-cmd

Required

The alias of a configured MinIO deployment.

28 - mc admin top

Note

Changed: RELEASE.2022-08-11T00-30-48Z

mc admin top replaced by mc support top.

Description

The mc admin top command returns statistics for distributed MinIO deployments, similar to the output of the top command.

Note

Use mc admin on MinIO Deployments Only

MinIO does not support using mc admin commands with other S3-compatible services, regardless of their claimed compatibility with MinIO deployments.

Syntax

mc admin top locks

mc-cmd

Returns the 10 oldest locks on the MinIO deployment.

The command has the following syntax:

mc admin top locks TARGET

The command supports the following arguments:

TARGET

mc-cmd

The alias of a configured MinIO deployment from which the command retrieves statistics.

The alias must correspond to a distributed (multi-node) MinIO deployment. The command returns an error for single-node single-drive deployments.

29 - Kubernetes Reference

This page acts as an index for MinIO-specific Kubernetes references.

30 - Baremetal Reference

This page acts as an index for MinIO Baremetal references.

31 - S3 API Compatibility

This page documents S3 APIs supported by MinIO Object Storage. For reference documentation on any given API, see the corresponding documentation for Amazon S3.

Warning

Important

MinIO strongly recommends using an S3-Compatible SDK for performing object storage operations.

Object APIs

Object Locking

Unsupported API Object Endpoints

GetObjectAcl
PutObjectAcl

Multipart Uploads

Differences from S3 APIs for Multipart Uploads

  • ListMultipartUploads requires the exact object name as a prefix.
  • The AbortIncompleteMultipartUpload lifecycle action is not supported with PutBucketLifecycle.

Bucket APIs

Bucket Replication

Bucket Lifecycle

Bucket Notifications

Bucket Policies

Unsupported API Bucket Operations

GetBucketInventoryConfiguration
PutBucketInventoryConfiguration
DeleteBucketInventoryConfiguration
PutBucketCors
DeleteBucketCors
GetBucketMetricsConfiguration
PutBucketMetricsConfiguration
DeleteBucketMetricsConfiguration
PutBucketWebsite
GetBucketLogging
PutBucketLogging
PutBucketAccelerateConfiguration
DeleteBucketAccelerateConfiguration
PutBucketRequestPayment
DeleteBucketRequestPayment
PutBucketAcl
HeadBucketAcl
GetPublicAccessBlock
PutPublicAccessBlock
DeletePublicAccessBlock
GetBucketOwnershipControls
PutBucketOwnershipControls
DeleteBucketOwnershipControls
GetBucketIntelligentTieringConfiguration
PutBucketIntelligentTieringConfiguration
ListBucketIntelligentTieringConfigurations
DeleteBucketIntelligentTieringConfiguration
GetBucketAnalyticsConfiguration
PutBucketAnalyticsConfiguration
ListBucketAnalyticsConfigurations
DeleteBucketAnalyticsConfiguration
CreateSession

MinIO alternatives for unsupported Bucket resources

  • For calls to BucketACL or ObjectACL operations, use Policies.
  • Calls to BucketCORS operations are not needed because CORS is enabled by default on all buckets for all HTTP verbs.
  • For calls to BucketWebsite operations, use caddy or nginx.
  • For calls to BucketAnalytics, BucketMetrics, or BucketLogging operations, use Bucket Notifications.