This is the multi-page printable view of this section. .
Reference
- 1: mc ilm add
- 2: mc quota clear
- 3: MinIO Custom Resource Definition
-
4: Silo Client (mcli / mc)
- 4.1: mc alias list
- 4.2: mc anonymous set
- 4.3: mc batch cancel
- 4.4: mc encrypt clear
- 4.5: mc event add
- 4.6: mc idp ldap accesskey disable
- 4.7: mc idp ldap add
- 4.8: mc idp ldap policy attach
- 4.9: mc ilm restore
- 4.10: mc ilm rule add
- 4.11: mc ilm tier add
- 4.12: mc legalhold clear
- 4.13: mc license info
- 4.14: mc replicate add
- 4.15: mc retention set
- 4.16: mc share download
- 4.17: mc support callhome
- 4.18: mc support top api
- 4.19: mc tag set
- 4.20: mc version enable
- 4.21: Silo Client Settings
-
4.22: mc alias
- 4.23: mc alias remove
- 4.24: mc anonymous get
- 4.25: mc batch describe
- 4.26: mc encrypt info
- 4.27: mc event ls
- 4.28: mc idp ldap accesskey edit
- 4.29: mc idp ldap disable
- 4.30: mc idp ldap policy detach
-
4.31: mc ilm rule
- 4.32: mc ilm rule edit
- 4.33: mc ilm tier check
- 4.34: mc legalhold info
- 4.35: mc license register
- 4.36: mc replicate backlog
- 4.37: mc retention info
- 4.38: mc share upload
- 4.39: mc support diag
- 4.40: mc support top locks
- 4.41: mc tag list
- 4.42: mc version info
- 4.43: mc alias set
-
4.44: mc anonymous
- 4.45: mc anonymous list
- 4.46: mc batch generate
- 4.47: mc encrypt set
- 4.48: mc event rm
- 4.49: mc idp ldap accesskey enable
- 4.50: mc idp ldap enable
- 4.51: mc idp ldap policy entities
- 4.52: mc ilm rule export
-
4.53: mc ilm tier
- 4.54: mc ilm tier info
- 4.55: mc legalhold set
- 4.56: mc license update
- 4.57: mc replicate ls
- 4.58: mc retention clear
- 4.59: mc share ls
- 4.60: mc support inspect
- 4.61: mc support top disk
- 4.62: mc tag remove
- 4.63: mc version suspend
- 4.64: mc alias import
- 4.65: mc anonymous links
-
4.66: mc batch
- 4.67: mc batch list
- 4.68: mc idp ldap accesskey info
- 4.69: mc idp ldap info
- 4.70: mc ilm rule import
- 4.71: mc ilm tier ls
- 4.72: mc replicate update
- 4.73: mc support perf
- 4.74: mc support top net
- 4.75: mc alias export
- 4.76: mc anonymous get-json
- 4.77: mc batch start
- 4.78: mc cat
- 4.79: mc idp ldap accesskey ls
- 4.80: mc idp ldap ls
- 4.81: mc ilm rule ls
- 4.82: mc ilm tier rm
- 4.83: mc replicate resync
- 4.84: mc support profile
- 4.85: mc support top rpc
- 4.86: mc anonymous set-json
- 4.87: mc batch status
- 4.88: mc cp
- 4.89: mc idp ldap accesskey rm
- 4.90: mc idp ldap rm
- 4.91: mc ilm rule rm
- 4.92: mc ilm tier update
- 4.93: mc replicate rm
- 4.94: mc support proxy
- 4.95: mc diff
- 4.96: mc idp ldap update
- 4.97: mc replicate status
-
4.98: mc support top
- 4.99: mc du
- 4.100: mc replicate export
- 4.101: mc support upload
-
4.102: mc encrypt
- 4.103: mc replicate import
-
4.104: mc event
- 4.105: mc find
- 4.106: mc get
- 4.107: mc head
-
4.108: mc idp ldap
-
4.109: mc idp ldap accesskey
- 4.110: mc idp ldap accesskey create-with-login
-
4.111: mc idp ldap policy
- 4.112: mc idp openid
-
4.113: mc ilm
-
4.114: mc legalhold
-
4.115: mc license
- 4.116: mc ls
- 4.117: mc mb
- 4.118: mc mirror
- 4.119: mc mv
- 4.120: mc od
- 4.121: mc ping
- 4.122: mc pipe
- 4.123: mc put
- 4.124: mc rb
- 4.125: mc ready
-
4.126: mc replicate
-
4.127: mc retention
- 4.128: mc rm
-
4.129: mc share
- 4.130: mc sql
- 4.131: mc stat
-
4.132: mc support
-
4.133: mc tag
- 4.134: mc tree
- 4.135: mc undo
- 4.136: mc update
-
4.137: mc version
- 4.138: mc watch
- 4.139: mc idp ldap accesskey create
- 5: mc ilm edit
- 6: mc quota info
- 7: MinIO Operator Environment Variables
-
8: Silo Client Administration
-
8.1: mc admin accesskey
- 8.2: mc admin accesskey create
- 8.3: mc admin cluster bucket import
- 8.4: mc admin cluster iam import
- 8.5: mc admin policy attach
- 8.6: mc admin prometheus generate
- 8.7: mc admin scanner status
- 8.8: mc admin user add
- 8.9: mc admin user svcacct add
- 8.10: mc admin accesskey disable
-
8.11: mc admin cluster bucket
- 8.12: mc admin cluster bucket export
- 8.13: mc admin cluster iam export
- 8.14: mc admin policy create
- 8.15: mc admin prometheus metrics
- 8.16: mc admin scanner trace
- 8.17: mc admin user disable
- 8.18: mc admin user svcacct disable
-
8.19: mc admin cluster iam
- 8.20: mc admin policy detach
- 8.21: mc admin user accesskey edit
- 8.22: mc admin user enable
- 8.23: mc admin user svcacct edit
- 8.24: mc admin accesskey enable
- 8.25: mc admin config
- 8.26: mc admin policy entities
- 8.27: mc admin user info
- 8.28: mc admin user svcacct enable
- 8.29: mc admin accesskey info
- 8.30: mc admin decommission
- 8.31: mc admin policy info
- 8.32: mc admin user ls
- 8.33: mc admin user svcacct info
- 8.34: mc admin accesskey ls
- 8.35: mc admin group
- 8.36: mc admin policy ls
- 8.37: mc admin user rm
- 8.38: mc admin user svcacct ls
- 8.39: mc admin accesskey rm
- 8.40: mc admin heal
- 8.41: mc admin policy rm
- 8.42: mc admin user sts info
- 8.43: mc admin user svcacct rm
- 8.44: mc admin info
-
8.45: mc admin user svcacct
- 8.46: mc admin kms key
- 8.47: mc admin logs
-
8.48: mc admin policy
-
8.49: mc admin prometheus
- 8.50: mc admin rebalance
- 8.51: mc admin replicate
-
8.52: mc admin scanner
- 8.53: mc admin service
- 8.54: mc admin trace
- 8.55: mc admin update
-
8.56: mc admin user
-
8.1: mc admin accesskey
- 9: mc ilm export
- 10: mc quota set
- 11: Operator Helm Charts
-
12: Silo Server (minio)
-
12.1: Settings Overview
- 12.1.1: Core Settings
- 12.1.2: Root Access Settings
- 12.1.3: Erasure Code Settings
- 12.1.4: Silo Console Settings
- 12.1.5: Metrics and Logging Settings
-
12.1.6: Bucket Notifications Settings
- 12.1.6.1: AMQP Notification Settings
- 12.1.6.2: Elasticsearch Notification Settings
- 12.1.6.3: Kafka Notification Settings
- 12.1.6.4: MQTT Notification Settings
- 12.1.6.5: MySQL Notification Settings
- 12.1.6.6: NATS Notification Settings
- 12.1.6.7: NSQ Notification Settings
- 12.1.6.8: PostgreSQL Notification Settings
- 12.1.6.9: Redis Notification Settings
- 12.1.6.10: Webhook Service Notification Settings
-
12.1.7: Identity and Access Management Settings
- 12.1.7.1: Active Directory / LDAP Settings
- 12.1.7.2: OpenID Identity Management Settings
- 12.1.7.3: Silo Identity Management Plugin Settings
- 12.1.7.4: Silo Access Management Plugin Settings
- 12.1.8: ILM Settings
- 12.1.9: Key Encryption Service Settings
- 12.1.10: Object Lambda function settings
- 12.1.11: Deprecated Settings
-
12.1: Settings Overview
-
13: Deprecated Commands
- 14: mc ilm import
- 15: Tenant Helm Charts
- 16: mc ilm ls
- 17: mc ilm rm
-
18: mc quota
- 19: mc admin bucket quota
- 20: mc admin bucket remote
- 21: mc admin console
- 22: mc admin idp ldap
- 23: mc admin idp ldap policy
- 24: mc admin idp openid
- 25: mc admin profile
- 26: mc admin speedtest
- 27: mc admin tier
- 28: mc admin top
-
29: Kubernetes Reference
-
30: Baremetal Reference
- 31: S3 API Compatibility
1 - mc ilm add
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:
The configured rules have the following effect:
- Delete objects more than 90 days old
- Delete objects 30 days after they become non-current
- Delete
DeleteMarkertombstones if that object has no other versions remaining. - Transition objects more than 30 days old to the
COLDTIERremote tier. - Transition objects 7 days after they become non-current to the
COLDTIERremote tier.
The command has the following syntax:
- 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:
--prefix
mc-cmd
Optional
Restrict the management rule to a specific object prefix.
For example:
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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the bucket on the S3-compatible host. - Replace
DATEwith the number of days after which to expire the object. For example, specify30to 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.
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-1storage tier. - Non-current objects in the prefix older than 45 days move to the
MINIOTIER-2storage tier. - Both
MINIOTIER-1andMINIOTIER-2have already been created withmc 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.
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
Changed: RELEASE.2022-12-13T00-23-28Z
mc quota clear replaced mc admin bucket quota --clear.
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.
- Replace
TARGETwith thealiasof a configured MinIO deployment. ReplaceBUCKETwith the name of the bucket on which to clear the quota.
Syntax
mc quota clear has the following syntax:
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:
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 |
|---|---|
|
|
|
|
|
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 |
|---|---|
|
Optional The |
|
Optional Specify one or more |
|
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 registers whether we know if the tenant has autocert enabled |
|
Provides the output of the
|
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 |
|---|---|
|
Optional Output one or more |
|
Optional Output one or more |
|
Optional Output one or more |
|
Optional Output one or more |
|
Optional Output one or more |
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 |
|---|---|
|
Optional Client |
|
Optional Minio |
|
Optional Certificate Authorities |
ExposeServices
ExposeServices (exposeServices) defines the exposure of the MinIO object storage and Console services.
| Field | Description |
|---|---|
|
Optional Directs the Operator to expose the MinIO service. Defaults to
|
|
Optional Directs the Operator to expose the MinIO Console service. Defaults to
|
Features
Features (features) - Object describing which MinIO features to enable/disable in the MinIO Tenant.
| Field | Description |
|---|---|
|
Optional Specify |
|
Optional Specify a list of domains used to access MinIO and Console. |
|
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 |
|---|---|
|
Optional Specify the number of replica KES pods to deploy in the tenant.
Defaults to |
|
Optional |
|
Optional The pull policy for the MinIO Docker image. Specify one of the
following:
Refer to the Kubernetes documentation for details https://kubernetes.io/docs/concepts/containers/images#updating-images |
|
Optional The Kubernetes
Service Account to use for running MinIO KES pods created as part of
the Tenant. |
|
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. |
|
Optional Enables TLS with SNI support on each MinIO KES pod in the tenant. If
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 Specify an object containing the following fields:
See the MinIO Operator CRD reference for examples and more complete documentation on configuring TLS for MinIO Tenants. |
|
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:
|
|
Optional |
|
Optional |
|
Optional If provided, use these annotations for KES Object Meta annotations |
|
Optional If provided, use these labels for KES Object Meta labels |
|
Optional Object specification for specifying CPU and memory resource
allocations or limits in the MinIO tenant. |
|
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. |
|
Optional Specify one or more Kubernetes tolerations to apply to MinIO KES pods. |
|
Optional Specify node affinity, pod affinity, and pod anti-affinity for the
KES pods. |
|
Optional Specify one or more Kubernetes Topology Spread Constraints to apply to pods deployed in the MinIO pool. |
|
Optional If provided, use this as the name of the key that KES creates on the KMS backend |
|
Specify the Security
Context of MinIO KES pods. The Operator supports only the following
pod security fields:
|
|
Specify the Security Context of MinIO KES pods. |
|
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 |
|---|---|
|
Required The name of the Kubernetes secret containing the TLS certificate or
Certificate Authority file. |
|
Required The type of Kubernetes secret. Specify
|
Logging
Logging describes Logging for MinIO tenants.
| Field | Description |
|---|---|
|
|
|
|
|
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 |
|---|---|
|
Required Specify the name of the pool. The Operator automatically generates the pool name if this field is omitted. |
|
Required The number of MinIO server pods to deploy in the pool. The minimum
value is The MinIO Operator requires a minimum of |
|
Required The number of Persistent Volume Claims to generate for each MinIO
server pod in the pool. The MinIO Operator requires a minimum of |
|
Required Specify the configuration options for the MinIO Operator to use when
generating Persistent Volume Claims for the MinIO tenant. |
|
Optional Object specification for specifying CPU and memory resource
allocations or limits in the MinIO tenant. |
|
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. |
|
Optional Specify node affinity, pod affinity, and pod anti-affinity for pods
in the MinIO pool. |
|
Optional Specify one or more Kubernetes tolerations to apply to pods deployed in the MinIO pool. |
|
Optional Specify one or more Kubernetes Topology Spread Constraints to apply to pods deployed in the MinIO pool. |
|
Optional Specify the Security
Context of pods in the pool. The Operator supports only the
following pod security fields:
|
|
Specify the Security
Context of containers in the pool. The Operator supports only the
following container security fields:
|
|
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) |
|
Optional If provided, use these labels for the Pool Objects Meta annotations (Statefulset and Pod template) |
|
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 |
|---|---|
|
|
|
|
|
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 |
|---|---|
|
Optional If provided, append these labels to the MinIO statefulset / pods |
|
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 |
|---|---|
|
Optional If provided, append these labels to the MinIO service |
|
Optional If provided, append these annotations to the MinIO service |
|
Optional If provided, append these labels to the Console service |
|
Optional If provided, append these annotations to the Console service |
|
Optional If provided, append these labels to the KES service |
|
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 |
|---|---|
|
Optional List of containers to run inside the Pod |
|
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. |
|
Optional List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes |
|
Optional sidecar’s Resource, initcontainer will use that if set. |
Tenant
Tenant is a Kubernetes object describing a MinIO Tenant.
- TenantList
| Field | Description |
|---|---|
|
|
|
|
|
Refer to Kubernetes API documentation
for fields of |
|
|
|
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 |
|---|---|
|
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. |
|
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 |
|---|---|
|
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 |
|---|---|
|
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 See the MinIO
Operator CRD reference for the |
|
Optional |
|
Optional Specify the secret key to use for pulling images from a private
Docker repository. |
|
Optional Pod Management Policy for pod created by StatefulSet |
|
Optional If provided, the MinIO Operator adds the specified environment variables when deploying the Tenant resource. |
|
Optional Enables TLS with SNI support on each MinIO pod in the tenant. If
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 Each element in the
See the MinIO Operator CRD reference for examples and more complete documentation on configuring TLS for MinIO Tenants. |
|
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
See the MinIO Operator CRD reference for examples and more complete documentation on configuring TLS for MinIO Tenants. |
|
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:
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 See the MinIO Operator CRD reference for examples and more complete documentation on configuring TLS for MinIO Tenants. |
|
Optional Provide support for mounting additional client certificate into MinIO
Tenant pods Multiple client certificates will be mounted using the
following folder structure:
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:
|
|
Optional Mount path for MinIO volume (PV). Defaults to
|
|
Optional Subpath inside mount path. This is the directory where MinIO stores
data. Default to |
|
Optional Enables using Kubernetes-based
TLS certificate generation and signing for pods and services in the
MinIO Tenant.
If See the MinIO Operator CRD reference for examples and more complete documentation on configuring TLS for MinIO Tenants. |
|
CertExpiryAlertThreshold is the minimum number of days to expiry before an alert for an expiring certificate is fired. |
|
Liveness Probe for container liveness. Container will be restarted if the probe fails. |
|
Readiness Probe for container readiness. Container will be removed from service endpoints if the probe fails. |
|
Startup Probe allows to configure a max grace period for a pod to start before getting traffic routed to it. |
|
Lifecycle hooks for container. |
|
S3 related features can be disabled or
enabled such as |
|
Optional Enables setting the |
|
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. |
|
Optional Directs the MinIO Operator to use prometheus operator. Tenant scrape configuration will be added to prometheus managed by the prometheus-operator. |
|
Optional The Kubernetes
Service Account to use for running MinIO pods created as part of the
Tenant. |
|
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. |
|
Optional The pull policy for the MinIO Docker image. Specify one of the
following:
Refer Kubernetes documentation for details https://kubernetes.io/docs/concepts/containers/images#updating-images |
|
Optional A list of containers to run as sidecars along every MinIO Pod deployed in the tenant. |
|
Optional Directs the Operator to expose the MinIO and/or Console
services. |
|
Optional Specify custom labels and annotations to append to the MinIO service and/or Console service. |
|
Optional Specify custom labels and annotations to append to all pool statefulsets and pods. |
|
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
Each referenced Kubernetes secret must include the following
fields:
The Operator creates each user with the |
|
Optional Create buckets when creating a new tenant. Skip if bucket with given name already exists |
|
Optional Enable JSON, Anonymous logging for MinIO tenants. |
|
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+ |
|
Optional Add custom initContainers to StatefulSet |
|
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. |
|
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 the usage capacity of this tenant in bytes. |
|
Capacity the raw capacity of this tenant in bytes. |
|
Usage is how much data is managed by MinIO in bytes. |
|
Usage is the raw usage on disks in bytes. |
|
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 of the tier |
|
type of the tier |
|
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:
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:
mc update is intentionally disabled in the Pigsty fork. Upgrade through the Silo download page, the Pigsty package repository, or GitHub Releases.
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
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.
- Replace
ALIASwith a name to associate to the S3 service.mccommands typically requireALIASas an argument for identifying which S3 service to execute against. - Replace
HOSTNAMEwith the URL endpoint or IP address of the S3 service. - Replace
ACCESS_KEYandSECRET_KEYwith 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:
3) Test the Connection
Use the mc admin info command to test the connection to the newly added Silo deployment:
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
pingortraceroute). -
The specified
ACCESSKEYandSECRETKEYcorrespond 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
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 listmc alias removemc alias setmc alias importmc alias export |
The |
mc anonymous getmc anonymous get-jsonmc anonymous linksmc anonymous listmc anonymous setmc anonymous set-json |
The |
mc batch describemc batch generatemc batch listmc batch startmc batch status |
The |
The |
|
The |
|
The |
|
The |
|
mc encrypt clearmc encrypt infomc encrypt set |
The |
mc event addmc event lsmc event rm |
The |
The |
|
The |
|
The |
|
mc idp ldap accesskeymc idp ldap accesskey create-with-loginmc idp ldap addmc idp ldap disablemc idp ldap enablemc idp ldap infomc idp ldap lsmc idp ldap policymc idp ldap rmmc idp ldap update |
The |
mc idp openid addmc idp openid disablemc idp openid enablemc idp openid infomc idp openid lsmc idp openid rmmc idp openid update |
The |
mc idp ldap policy attachmc idp ldap policy detachmc idp ldap policy entities |
The |
mc ilm restoremc ilm rule addmc ilm rule editmc ilm rule exportmc ilm rule importmc ilm rule lsmc ilm rule rmmc ilm tier addmc ilm tier checkmc ilm tier infomc ilm tier lsmc ilm tier rmmc ilm tier update |
The |
mc legalhold clearmc legalhold infomc legalhold set |
The |
mc license infomc license registermc license update |
The |
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The To remove only the contents of a bucket, use |
|
The |
|
mc replicate addmc replicate backlogmc replicate exportmc replicate importmc replicate lsmc replicate resyncmc replicate rmmc replicate statusmc replicate update |
The |
mc retention clearmc retention infomc retention set |
The |
The |
|
mc share downloadmc share lsmc share upload |
Use the |
The |
|
The |
|
mc support callhomemc support diagmc support inspectmc support perfmc support profilemc support proxymc support top apimc support top diskmc support top locksmc support upload |
The MinIO Client |
mc tag listmc tag removemc tag set |
The |
The |
|
The |
|
The |
|
mc version enablemc version infomc version suspend |
The |
The |
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:
HOME\.mc\config.jsonUSERPROFILE\.mc\config.jsonHOMEDRIVE+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:
Windows systems:
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
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:
Alternatively, set the environment variable MC_DEBUG.
--disable-pager --dp
option
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:
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
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:
For example:
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:
The mc alias list command has the following syntax:
- 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.
List a Specific Alias
The following mc alias list command lists the details of a specific alias in the local mc configuration.
- Replace
ALIASwith 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:
Applications can perform the following operations without authentication:
PUTobjects tomyminio/uploadsandmyminio/public.GETobjects frommyminio/downloadsandmyminio/public.
The command has the following syntax:
- 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 theALIAS.download- Enable download-only access to theALIAS.upload- Enable upload-only access to theALIAS.public- Enable download and upload access to theALIAS.
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:
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:
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:
- Replace
POLICYwith a supportedpermission. - Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith 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
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.
The command has the following syntax:
- 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:
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:
The command has the following syntax:
- 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:
Global Flags
This command supports any of the global flags.
Examples
Remove the Automatic Server-Side Encryption Settings for a Bucket
- Replace
ALIASwith 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:
The specified ARN corresponds to a configured bucket notification target on the myminio deployment.
The command has the following syntax:
- 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:
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:
putgetdelete
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:
Behavior
Supported Bucket Events
The following table lists the supported mc event add values and their corresponding S3 events:
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
mykeyon theminiodeployment:
The command has the following syntax:
-
Replace
ALIASwith the alias of a MinIO deployment configured for AD/LDAP integration. -
Replace
KEYwith 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:
KEY
mc-cmd
Required
The configured access key to disable.
Example
Disable the access key mykey from the minio 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.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.
The command has the following syntax:
-
Replace
ALIASwith 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 ofPARAMETER="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:
server_addr
mc-cmd
Required
Specify the hostname for the Active Directory / LDAP server. For example:
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.
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
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.
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:
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:
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:
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:
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
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:
For SRV record names with beginning with _ldaps, specify ldaps. The constructed DNS SRV record name resembles the following:
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.
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
userpolicyto the userbobfisheron themyminiodeployment:
The command has the following syntax:
-
Replace
ALIASwith the alias of a MinIO deployment to configure for AD/LDAP integration. -
Replace
POLICYNAMEwith the policy to attach to the entity. You may list multiple policies to attach to the entity. -
Use must use one of either the
--useror--groupflag. 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:
Example
The following example attaches two policies, policy1 and policy2, to the projectb group on the myminio 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.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.
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:
The command has the following syntax:
- 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.
--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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
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 |
KEY- the full path to the object asalias/bucket/path/object.VALUE- the 32-byte RAW Base64-encoded data key to use for encrypting object(s).
For example:
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:
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:
Restore a Specific Archived Object Version
The following command restore a specific object version archived to a remote tier:
Restore All Archived Objects at a Bucket Prefix
The following command restores all objects archived under a specified prefix on the remote tier:
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
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:
The configured rules have the following effect:
- Delete objects more than 90 days old
- Delete objects 30 days after they become non-current
- Delete
DeleteMarkertombstones if that object has no other versions remaining. - Transition objects more than 30 days old to the
COLDTIERremote tier. - Transition objects 7 days after they become non-current to the
COLDTIERremote tier.
The command has the following syntax:
- 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:
--prefix
mc-cmd
Optional
Restrict the management rule to a specific object prefix.
For example:
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
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.
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
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
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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the bucket on the S3-compatible host. - Replace
DAYSwith the number of days after which to expire each object. For example, specify30to 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.
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-1storage tier. - Non-current objects in the prefix older than 45 days move to the
MINIOTIER-2storage tier. - Both
MINIOTIER-1andMINIOTIER-2have already been created withmc 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.
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.
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.
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the bucket on the S3-compatible host.
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
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:
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.
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:
^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:
|
Use a remote MinIO deployment as the storage backend for the new Tier. Requires also specifying the following parameters: |
|
Use AWS S3 as the storage backend for the new Tier. Requires also specifying the following parameters: |
|
Use Azure Blob Storage as the storage backend for the new Tier. Requires also specifying the following parameters: |
|
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:
STANDARDRecommendedREDUCED
For more information, see Erasure Coding storage class.
STANDARDSTANDARD-IAONEZONE-IA
For more information, see Using Amazon S3 storage classes.
STANDARDNEARLINECOLDLINE
For more information, see GCS storage class.
HotCool
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.
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
mybucketbucket and themyprefixprefix 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.
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
myazurebucketbucket and themyazureprefixprefix 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.
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
mygcsbucketbucket and themygcsprefixprefix 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.
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
mys3bucketbucket and themys3prefixprefix on the GCS storage. - The tier utilizes S3
STANDARDstorage class located in theus-west-2S3 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:
The command has the following syntax:
- 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:
--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#ssformat. 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
Retrieve the Legal Hold Status Objects
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:
- Replace
ALIASwith the alias of the S3-compatible host. - Replace
PATHwith the path to the bucket or object on the S3-compatible host. If specifying the path to a bucket or bucket prefix, include the--recursiveoption.
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:
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
If a deployment uses an expired MinIO Commercial License, the command outputs an error message.
Syntax
The command has the following syntax:
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
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
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:
The replication rule synchronizes versioned delete operations, delete markers, and existing objects to the remote MinIO deployment.
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:
- 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:
--remote-bucket
mc-cmd
Required
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:
An alias based target might look like the following:
--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:
Bfor bytesKfor kilobytesGfor gigabytesTfor terabytesKifor kibibytesGifor gibibytesTifor tebibytes
For example, to limit bandwidth rates to no more than 1 GiB/s, use the following:
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:
Bfor bytesKfor kilobytesGfor gigabytesTfor terabytesKifor kibibytesGifor gibibytesTifor tebibytes
For example, to limit download rates to no more than 1 GiB/s, use the following:
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:
Bfor bytesKfor kilobytesGfor gigabytesTfor terabytesKifor kibibytesGifor gibibytesTifor tebibytes
For example, to limit upload rates to no more than 1 GiB/s, use the following:
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 bucketoff- use a resource locator style (such as a domain or IP address) lookup to find the remote bucketauto- 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:
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:
- Replace
myminio/mybucketwith theALIASand full bucket path for which to create the replication configuration. - Replace the
--remote-bucketvalue with the URL or path of the remote target. If using a file path format location, use the--path onoption. - The
--replicateflag 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:
- Replace
myminio/mybucketwith theALIASand full bucket path for which to create the replication configuration. - Replace the
--remote-bucketvalue with the location of the remote target. If using a file path format location, use the--path onoption. - The
--replicateflag 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:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
PATHwith 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.
- 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.
- 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 theResourcearray 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 theResourcearray 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 tomc replicate add --replicate. - To enable replication of existing objects for an existing replication rule, add
"existing-objects"to the list of existing replication features usingmc 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:
The command has the following syntax:
- 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:
governancecompliance
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,30dfor 30 days after object creation. -
For years, specify a string formatted as
Ny. For example,1yfor 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:
- If the
ALIASspecifies a bucket or bucket prefix, include--recursiveto apply the object lock settings to the bucket contents. mc retention setby default applies to only the latest object version. Use--version-idor--versionsto 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#ssformat. 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.
- Replace
MODEwith the retention mode to enable. MinIO supports the AWS S3 retention modesgovernanceandcompliance. - Replace
DURATIONwith the duration which the object lock should remain in effect. For example, to set a retention period of 30 days, specify30d. - Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith 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-lockfor 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:
- Replace
VERSIONwith the version of the object. - Replace
MODEwith the retention mode to enable. MinIO supports the AWS S3 retention modesgovernanceandcompliance. - Replace
DURATIONwith the duration which the object lock should remain in effect. For example, to set a retention period of 30 days, specify30d. - Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith the path to the object.
Use mc retention set with --versions to apply the retention settings to a specific object version:
- Replace
MODEwith the retention mode to enable. MinIO supports the AWS S3 retention modesgovernanceandcompliance. - Replace
DURATIONwith the duration which the object lock should remain in effect. For example, to set a retention period of 30 days, specify30d. - Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith 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-lockfor 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:
Interaction with Legal Holds
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
GETto 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:
The command has the following syntax:
- 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:
You can specify multiple objects on the same or different MinIO deployments. For example:
If specifying the path to a bucket or bucket prefix, you must also specify the --recursive argument. For example:
--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:
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:
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.
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.
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.
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.
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
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.
Disable callhome reporting
Disable sending diagnostic information to SUBNET for a deployment registered to SUBNET with an alias of minio1.
Display Current callhome settings
Display whether a deployment with the alias minio1 sends information to SUBNET.
Global Flags
This command supports any of the global flags.
4.18 - mc support top api
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.
The command has the following syntax:
- 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:
Display Current, In-progress s3.PutObject Calls
The following command displays all in-progress s3.PutObject calls for the myminio deployment:
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:
The command has the following syntax:
- 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:
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:
--exclude-folders
mc-cmd
Optional
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.
--recursive, r
mc-cmd
Optional
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#ssformat. 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:
- Replace
ALIASwith the alias of the MinIO deployment. - Replace
PATHwith the path to the bucket or object on the MinIO deployment. - Replace
TAGSwith 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:
The command has the following syntax:
- 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:
--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:
Global Flags
This command supports any of the global flags.
Example
Enable Bucket Versioning
Use mc version enable to enable versioning for a bucket:
- Replace
ALIASwith thealiasof a configured MinIO deployment. - Replace
PATHwith 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.
This setting does not have a configuration setting option.
Use mc alias set to configure an alias.
Examples
Static Credentials
Security Token Service (STS) Credentials
STS Service
Added: mc
RELEASE.2023-11-06T04-19-23Z
Use this setting to add an STS endpoint to use for mc commands.
Changed: mc
RELEASE.2023-12-02T02-03-28Z
Supports adding multiple environment variables by alias.
Web Token Identity
Added: mc
RELEASE.2023-11-06T04-19-23Z
Use this setting to add a web token identity to use for mc commands.
Changed: mc
RELEASE.2023-12-02T02-03-28Z
Supports adding multiple environment variables by alias.
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
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:
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:
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.
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.
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 |
|---|---|
The |
|
The |
|
The |
|
The |
|
The |
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:
The mc alias remove command has the following syntax:
- 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.
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:
The command has the following syntax:
- 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:
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:
- Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith 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
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.
The command has the following syntax:
- 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:
- Replace
myminiowith thealiasof the MinIO deployment that should run the job. - Replace
KwSysDpxcBU9FNhGkn2dCfwith the ID of the job to define.
The output of the above command is similar to the following:
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.
The command has the following syntax:
- 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:
Global Flags
This command supports any of the global flags.
Examples
Retrieve the Automatic Server-Side Encryption Settings for a Bucket
- Replace
ALIASwith 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:
The command has the following syntax:
- 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 S3 service alias and bucket to which the command lists event notification. For example:
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.
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
mykeyon theminiodeployment:
The command has the following syntax:
-
Replace
ALIASwith the alias of a MinIO deployment configured for AD/LDAP integration. -
Replace
KEYwith 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:
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.
Modify the expiration duration for an accesskey
Modify the expiration duration for the access key mykey on the minio 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.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.
The command has the following syntax:
-
Replace
ALIASwith 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:
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.
The command has the following syntax:
-
Replace
ALIASwith the alias of a MinIO deployment to configure for AD/LDAP integration. -
Replace
POLICYNAMEwith the policy to detach from the entity. You may list multiple policies to detach from the entity. -
Use must use one of either the
--useror--groupflag. 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:
Example
The following example detaches two policies, policy1 and policy2, from the projectb group on the myminio 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.31 - mc ilm rule
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 |
|---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
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:.
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:
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
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:
The command modifies the specified rules as follows:
- Delete objects more than 90 days old.
- Delete
DeleteMarkertombstones if that object has no other versions remaining. - Transition objects more than 30 days old to the
COLDTIERremote tier.
The command has the following syntax:
- 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:
--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:
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
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.
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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the bucket on the S3-compatible host. - Replace
RULEIDwith the unique ID of the object lifecycle management rule. Usemc ilm rule lsto find theRULEID. - Specify any additional flags to add or modify the lifecycle management rule. For example, specify
--transition-daysto 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.
- Replace
RULEIDwith the unique ID of the object lifecycle management rule. Usemc ilm rule lsto find theRULEID. - Replace
myminiowith the ALIAS of the deployment where the rule exists. - Replace
mybucketwith 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.
The command has the following syntax:
- 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.
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:
The command has the following syntax:
- 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:
--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#ssformat. 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
Retrieve the Legal Hold Status Objects
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:
- Replace
ALIASwith the alias of the S3-compatible host. - Replace
PATHwith the path to the bucket or object on the S3-compatible host. If specifying the path to a bucket or bucket prefix, include the--recursiveoption.
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
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
minioalias with MinIO SUBNET:
The command has the following syntax:
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:
- Log in to MinIO SUBNET
- Go to the Deployments tab
- Select the API Key button near the top of the page on the right side of the account statistics information box
- 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.
- Log in to MinIO SUBNET
- Go to the Deployments tab
- Select the License button near the top of the page on the right side of the account statistics information box
- 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:
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:
If not already downloaded, you can download the license file from SUBNET.
- Log in to MinIO SUBNET
- Go to the Deployments tab
- Select the License button near the top of the page on the right side of the account statistics information box
- 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:
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.
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.
-
Run the command to return a registration link with token
-
Open the copied registration link in a web browser and sign in to SUBNET
-
Select the ? button to the right of the License number for the deployment
-
In the popup, select the download link and save the key to a path you have access to
-
In the command line, run the following command
Replace
<path-to-file>with the path to the file you downloaded from SUBNET.
Syntax
The command has the following syntax:
Global Flags
This command supports any of the global flags.
Behavior
Automatic License Updates
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
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.
If any new or deleted objects have not yet replicated, the command outputs something similar to the following:
In the output, PUT corresponds to a new object. Deleted objects or versions would show DEL.
The command has the following syntax:
- 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:
- Replace
myminio/mybucketwith theALIASand full bucket path for which to create the replication configuration. - Replace
path/to/prefixwith 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:
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:
- Replace
myminio/mybucketwith theALIASand full bucket path for which to show unreplicated objects. - Replace the
path/to/prefixwith 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:
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:
The command has the following syntax:
- 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:
-
If the
ALIASspecifies a bucket or bucket prefix, include--recursiveto return the object lock settings for all objects in the bucket or bucket prefix. -
If the
ALIASbucket has versioning enabled,mc retention infoby default applies to only the latest object version. Use--version-idor--versionsto 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#ssformat. 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)
Use mc retention info with --recursive to retrieve the retention settings for all objects in a 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-lockfor 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:
-
Replace
ALIASwith thealiasof a configured S3-compatible host. -
Replace
PATHwith 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-lockfor 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:
The command has the following syntax:
- 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:
You can specify multiple objects on the same or different MinIO deployments. For example:
If specifying the path to a bucket or bucket prefix, you must also specify the --recursive argument. For example:
--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:
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:
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:
- Replace
ALIASwith the alias of the MinIO deployment. - Replace
PATHwith the path to the bucket or bucket prefix on the MinIO deployment. - Replace
DURATIONwith the duration after which the URL expires. For example, to set a 30 day expiry, specify30d.
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:
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
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.
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
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.
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:
- Run the command to download the
.gzipfile - Login to https://subnet.min.io and select the Deployments section
- Select the deployment for the report
- Select the Upload button
- Drag and drop the file or browse to the
.gzipfile 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.
Syntax
The command has the following syntax:
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
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.
--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
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:
The following command displays the current in-progress S3 API calls on the alias myminio.
The command has the following syntax:
- 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
Display Stale Locks on the myminio Deployment
The following command displays all in-progress s3.PutObject calls for the myminio deployment:
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:
The command has the following syntax:
- 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:
--recursive, r
mc-cmd
Optional
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#ssformat. 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:
- Replace
ALIASwith the alias of the MinIO deployment. - Replace
PATHwith 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:
The command has the following syntax:
- 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:
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:
- Replace
ALIASwith thealiasof a configured MinIO deployment. - Replace
PATHwith 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:
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:
- 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.
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:
myminioTest-1Aa
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
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.
If the myminio alias already exists, the mc alias set command overwrites that alias with the specified arguments.
- Replace
ALIASwith the name to associate with the MinIO service. - Replace
HOSTNAMEwith 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
ACCESSKEYandSECRETKEYwith 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 |
|---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
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:
The command has the following syntax:
- 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:
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:
- Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith 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
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.
The command has the following syntax:
- 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:
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:
-
Replace
aliaswith thealiasto use to generate the yaml file. -
Replace
replicatewith the type of job to generate a yaml file for.:mc:
mc batchsupports thereplicateandkeyrotatejob 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 objects between two MinIO deployments. Provides similar functionality to bucket replication as a batch job rather than continual scanning function.
-
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.
-
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:
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:
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:
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:
The command has the following syntax:
- 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 inKMSKEY. 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 toMINIO_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:
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.
- Replace
ENCRYPTIONwithsse-kmsorsse-s3depending on the preferred encryption mode. - Replace
KMSKEYwith the name of the encryption key on the configured root KMS. This argument has no effect withsse-s3. - Replace
TARGETwith 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:
The command has the following syntax:
- 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 S3 service alias and bucket from which the command removes the event notification. For example:
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:
Use the following command to remove the event:
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:
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
mykeyfrom theminiodeployment:
The command has the following syntax:
-
Replace
ALIASwith the alias of a MinIO deployment configured for AD/LDAP integration. -
Replace
KEYwith 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:
KEY
mc-cmd
Required
The configured access key to enable.
Example
Enable the access key mykey from the minio 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.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.
The command has the following syntax:
-
Replace
ALIASwith 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:
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-policypolicy. - Policies assigned to the
uid=bobfisher,ou=people,ou=hwengg,dc=min,dc=iouser. - Policies assigned to the
cn=projectb,ou=groups,ou=swengg,dc=min,dc=iogroup.
The command has the following syntax:
-
Replace
ALIASwith the alias of a MinIO deployment to configure for AD/LDAP integration. -
You may use each of the
--user,--group, and/or--policyflags 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:
--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:
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
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:
The command has the following syntax:
- 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:
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:
-
Replace
ALIASwith the alias of the MinIO deployment and the bucket for which to export object lifecycle management rules:myminio/mydata -
Replace
file.jsonwith 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
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 |
|---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
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:
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:
Modify the Resource for the bucket into which MinIO tiers objects.
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:.
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.
The command has the following syntax:
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.
Display the Statistics for all Existing Tiers on a Deployment
The following example displays the statistics of all existing tiers on the myminio deployment.
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:
The command has the following syntax:
- 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:
--recursive, r
mc-cmd
Optional
Applies the legal hold to all existing objects in the ALIAS bucket or bucket prefix.
--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#ssformat. 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:
- Replace
ALIASwith the alias of the S3-compatible host. - Replace
PATHwith the path to the bucket or object on the S3-compatible host. If specifying the path to a bucket or bucket prefix, include the--recursiveoption.
Behavior
Legal Holds Require Explicit Removal
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 Complement Other Retention Modes
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
Syntax
The command has the following syntax:
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:
- Log in to MinIO SUBNET
- Go to the Deployments tab
- Select the API Key button near the top of the page on the right side of the account statistics information box
- 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
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:
The command has the following syntax:
- 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:
--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:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
PATHwith 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:
The command has the following syntax:
- 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:
-
If the
ALIASspecifies a bucket or bucket prefix, include--recursiveto clear the object lock settings to the bucket contents. -
If the
ALIASbucket has versioning enabled,mc retention clearby default applies to only the latest object version. Use--version-idor--versionsto 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#ssformat. 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)
Use mc retention clear with --recursive to clear the retention settings from all objects in a 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-lockfor 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:
The command has the following syntax:
- 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:
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:
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
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.
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.
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.
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.
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.
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.
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
This can be an expensive operation. Proceed with caution.
Syntax
The command has the following syntax:
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
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.
The command has the following syntax:
- 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:
The command has the following syntax:
- 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:
--recursive, r
mc-cmd
Optional
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#ssformat. 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:
- Replace
ALIASwith the alias of the MinIO deployment. - Replace
PATHwith 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:
The command has the following syntax:
- 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:
Global Flags
This command supports any of the global flags.
Example
Disable Bucket Versioning
Use mc version suspend to disable versioning for a bucket:
- Replace
ALIASwith thealiasof a configured MinIO deployment. - Replace
PATHwith 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:
Use mc alias list newalias to confirm the import succeeded.
The mc alias import command has the following syntax:
- 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:
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:
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:
The command has the following syntax:
- 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:
--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:
- Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith 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
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 |
|---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
4.67 - mc batch list
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.
The command has the following syntax:
- 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:
-
Replace
myminiowith thealiasof the MinIO deployment that should run the job. -
Replace
replicatewith the job type to output.Currently,
mc batchonly supports thereplicatejob type.
The output of the above command is similar to the following:
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
mykeyfrom theminiodeployment:
The command has the following syntax:
-
Replace
ALIASwith the alias of a MinIO deployment configured for AD/LDAP integration. -
Replace
KEYwith 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:
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.
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.
The command has the following syntax:
-
Replace
ALIASwith 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:
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
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:
The command has the following syntax:
- 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:
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:
-
Replace
ALIASwith the alias of the MinIO deployment and the bucket into which to import object lifecycle management rules:myminio/mydata -
Replace
file.jsonwith 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
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.
The command has the following syntax:
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
Changed: RELEASE.2022-12-24T15-21-38Z
mc replicate update replaces the mc admin bucket remote update command.
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.
The following command modifies an existing replication rule for the mydata bucket on the myminio MinIO deployment:
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:
- 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:
--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:
Bfor bytesKfor kilobytesGfor gigabytesTfor terabytesKifor kibibytesGifor gibibytesTifor tebibytes
For example, to limit bandwidth rates to no more than 1 GiB/s, use the following:
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:
Bfor bytesKfor kilobytesGfor gigabytesTfor terabytesKifor kibibytesGifor gibibytesTifor tebibytes
For example, to limit download rates to no more than 1 GiB/s, use the following:
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:
Bfor bytesKfor kilobytesGfor gigabytesTfor terabytesKifor kibibytesGifor gibibytesTifor tebibytes
For example, to limit upload rates to no more than 1 GiB/s, use the following:
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 bucketoff- use a resource locator style (such as a domain or IP address) lookup to find the remote bucketauto- 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:
An alias based target might look like the following:
--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:
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.
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
PATHwith the path to the bucket or bucket prefix on which the rule exists. - Replace
IDwith the unique identifier for the rule to modify. Usemc replicate lsto retrieve the list of replication rules on the bucket and their corresponding identifiers.
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.
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
PATHwith the path to the bucket or bucket prefix on which the rule exists. - Replace
IDwith 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.
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
PATHwith the path to the bucket or bucket prefix on which the rule exists. - Replace
IDwith the unique identifier for the rule to modify. Usemc replicate lsto retrieve the list of replication rules on the bucket and their corresponding identifiers. - Specify either
"disable"or"enable"to the--stateflag to disable or enable the replication rule.
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.
- 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.
- 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 theResourcearray 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 theResourcearray 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
Changed: RELEASE.2022-07-24T02-25-13Z
mc support perf replaces the mc admin speedtest command.
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
-
Measure the speed of drives in a MinIO deployment.
mc support perf drivetemporarily 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. -
Measure the speed of reading and writing objects in a cluster.
-
Measure the network throughput of all nodes.
mc support perf nettemporarily 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. -
Measure the network throughput to a client.
-
Measure the speed of site replication operations.
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).
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.
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.
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.
Test Network Throughput
Run a network throughput test on a cluster with alias minio1.
Test Site Replication Speed
Run a test on the speed of site replication operations from the minio1 site to other configured peers.
Syntax
mc support perf drive
mc-cmd
Measure the read/write speed of the drives in a cluster.
mc support perf object
mc-cmd
Measure the S3 performance of reading and writing objects in a cluster.
mc support perf net
mc-cmd
Measure the network throughput of all nodes in a cluster.
mc support perf client
mc-cmd
Measure the network throughput from the local device running the MinIO Client to the server.
mc support perf site-replication
mc-cmd
Measure the speed of site replication operations from the specified ALIAS to other configured peers.
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
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.
The output returns information such as the server URL, network interface, receive rate, transmit rate, and system messages.
The command has the following syntax:
- 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
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:
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:
- 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:
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:
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.
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:
The command has the following syntax:
- 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:
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:
- Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith 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
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.
The output of the above command is something similar to:
The command has the following syntax:
- 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:
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:
- Replace
myminiowith thealiasof the MinIO deployment that should run the job. - Replace
./replication.yamlwith 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:
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:
The mc cat command has the following syntax:
- 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:
You can specify multiple objects on the same or different MinIO deployment. For example:
For an object on a local filesystem, specify the full path to that object. For example:
--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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
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 |
KEY- the full path to the object asalias/bucket/path/object.VALUE- the 32-byte RAW Base64-encoded data key to use for encrypting object(s).
For example:
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:
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#ssformat. 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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith 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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the object on the S3-compatible host. - Replace
DURATIONwith the point-in-time in the past at which the command returns the object. For example, specify30dto return the version of the object 30 days prior to the current date.
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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the object on the S3-compatible host. - Replace
VERSIONwith the specific version of the object to return.
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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith 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
minioalias:
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:
-
Replace
ALIASwith the alias of a MinIO deployment configured for AD/LDAP integration. -
Replace
DNwith 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:
--all
mc-cmd
Optional
Added: mc
RELEASE.2024-07-31T15-58-33Z
List all access keys for all LDAP users.
--self
mc-cmd
Optional
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.
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.
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.
List a User’s Access Keys
The following command returns the AD/LDAP access keys for the user bobfisher on the minio deployment.
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.
List Access Keys for Authenticated User
The following command returns the AD/LDAP access keys for the currently authenticated user on the minio deployment.
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.
The command has the following syntax:
-
Replace
ALIASwith 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:
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
Changed: RELEASE.2022-12-24T15-21-38Z
mc ilm rule ls replaces mc ilm ls.
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:
The output of the command might resemble the following:
The mc ilm rule ls command has the following syntax:
- 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:
--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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith 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.
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith 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:
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
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:.
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.
The command has the following syntax:
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:
The command has the following syntax:
- 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.
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:
- Replace
primary/datawith theALIASand full bucket path for which to create the replication configuration. - Replace the
--remote-bucketvalue with the ARN of the remote target. Usemc replicate lsto 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
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.
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.
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.
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).
Syntax
The mc support profile command has the following syntax:
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:
cpucpuiomemblockmutextracethreadsgoroutines
If not specified, the command collects data for CPU, memory, block, mutex, threads, and goroutines.
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
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.
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
The command has the following syntax:
- 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:
The command has the following syntax:
- 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:
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:
- Replace
POLICYwith a supportedPOLICY. - Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith the destination bucket.
Remove Anonymous Policy for Bucket
Use mc anonymous set to clear the anonymous policy for a bucket:
- Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith 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
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.
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.
The command has the following syntax:
- 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:
- Replace
myminiowith thealiasof the MinIO deployment that should run the job.
The output of the above command is similar to the following:
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
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:
The mc cp command has the following syntax:
- 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:
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:
For copying an object from a local filesystem, specify the full path to that object. For example:
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:
For copying an object from a local filesystem, specify the full path to that object. For example:
--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
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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
Specify an existing data key on the external KMS. See the |
For example:
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-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:
You can specify the parameter multiple times to denote different object(s) to encrypt:
Specify the path to a prefix to apply encryption to all matching objects at that path:
--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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
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 |
KEY- the full path to the object asalias/bucket/path/object.VALUE- the 32-byte RAW Base64-encoded data key to use for encrypting object(s).
For example:
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:
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.
--legal-hold
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:
Bfor bytesKfor kilobytesMfor megabytesGfor gigabytesTfor terabytesKifor kibibytesMifor mibibytesGifor gibibytesTifor tebibytes
For example, to limit download rates to no more than 1 GiB/s, use the following:
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:
Bfor bytesKfor kilobytesMfor megabytesGfor gigabytesTfor terabytesKifor kibibytesMifor mibibytesGifor gibibytesTifor tebibytes
For example, to limit upload rates to no more than 1 GiB/s, use the following:
If not specified, MinIO uses an unlimited upload rate.
--md5
mc-cmd
Optional
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:
GOVERNANCECOMPLIANCE
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#ssformat. 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:
- Replace
SRCALIASwith thealiasof a source S3-compatible host. - Replace
SRCPATHwith the path to the object on the S3-compatible host. - Replace
TGTALIASwith thealiasof a target S3-compatible host. - Replace
TGTPATHwith the path to the object on a target S3-compatible host. Omit the object name to use theSRCPATHobject name.
Recursively Copy Objects to S3
Use mc cp --recursive to recursively copy objects to an S3-compatible host:
- Replace
SRCALIASwith thealiasof a source S3-compatible host. - Replace
SRCPATHwith the path to the bucket or bucket prefix on the source S3-compatible host. - Replace
TGTALIASwith thealiasof a target S3-compatible host. - Replace
TGTPATHwith the path to the object on the target S3-compatible host.mc cpuses theSRCPATHobject 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.
- Replace
DURATIONwith the point-in-time in the past at which the command copies the object. For example, specify30dto copy the version of the object 30 days prior to the current date. - Replace
SRCALIASwith thealiasof a source S3-compatible host. - Replace
SRCPATHwith the path to the object on the source S3-compatible host. - Replace
TGTALIASwith thealiasof a target S3-compatible host. - Replace
TGTPATHwith the path to the object on the target S3-compatible host. Omit the object name to use theSRCPATHobject name.
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.
- Replace
VERSIONwith the version of the object to copy. - Replace
SRCALIASwith thealiasof a source S3-compatible host. - Replace
SRCPATHwith the path to the object on the source S3-compatible host. - Replace
TGTALIASwith thealiasof a target S3-compatible host. - Replace
TGTPATHwith the path to the object on the target S3-compatible host. Omit the object name to use theSRCPATHobject name.
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.
- Replace
CONTENT-TYPEwith the desired content type (also called a media type). - Replace
SRCALIASwith thealiasof a source S3-compatible host. - Replace
SRCPATHwith the path to the object on the source S3-compatible host. - Replace
TGTALIASwith thealiasof a target S3-compatible host. - Replace
TGTPATHwith the path to the object on the target S3-compatible host. Omit the object name to use theSRCPATHobject name.
The following example sets a content-type of application/json:
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
mykeyfrom theminiodeployment:
The command has the following syntax:
-
Replace
ALIASwith the alias of a MinIO deployment configured for AD/LDAP integration. -
Replace
KEYwith 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:
KEY
mc-cmd
Required
The configured access key to delete.
Example
Delete the access key mykey from the minio 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.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.
The command has the following syntax:
-
Replace
ALIASwith 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:
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
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:
The command has the following syntax:
- 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:
--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:
- Replace
RULEwith the unique identifier of the lifecycle management rule. Usemc ilm rule lsto find the ID to use. - Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith 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
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.
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:.
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:
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:
- Amazon S3 Permissions
- Google Cloud Storage Access Control
- Authorizing access to data in Azure storage
Syntax
The following example updates the credentials for an existing remote tier called S3TIER on the myminio deployment.
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:
- 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
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
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
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.
- Replace
S3TIERwith the name for your Amazon Simple Storage Solution tier. - Replace
ACCESS_KEYwith the updated access key for your S3 storage. - Replace
SECRET_KEYwith 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.
- Replace
AZTIERwith the name for your Azure tier. - Replace
ACCOUNT-KEYwith 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.
- Replace
GCSTIERwith the name for your Google Cloud Storage tier. - Replace
/path/to/credentials.jsonwith 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
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.
The following command removes the replication rule with specified id from the mydata bucket on the myminio MinIO deployment:
The command has the following syntax:
- 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:
--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:
- Replace
IDwith the unique ID of the replication rule to remove. Usemc replicate lsto list all replication rules for the bucket. - Replace
ALIASwith thealiasof the MinIO deployment. - Replace
PATHwith the path to the bucket or bucket prefix.
Remove All Replication Rules from a Bucket
Use mc replicate rm to list bucket replication rules:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
PATHwith 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.
Remove the Proxy URL Configured for a Deployment
The following command removes the URL configured as the proxy for the alias minio1.
Disable callhome Logs
The following command shows the URL configured as the proxy for the alias 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 show
mc-cmd
Display the current proxy URL configured for communicating with MinIO SUBNET.
mc support proxy remove
mc-cmd
Remove the proxy URL configured for communicating with MinIO SUBNET.
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:
The mc diff command has the following syntax:
- 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:
For an object from a local filesystem, specify the full path to that object. For example:
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:
For an object from a local filesystem, specify the full path to that object. For example:
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.
Behavior
Output Legend
mc diff uses the following legend when formatting the diff output:
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.
The command has the following syntax:
-
Replace
ALIASwith 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 ofPARAMETER="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:
server_addr
mc-cmd
Required
Specify the hostname for the Active Directory / LDAP server. For example:
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.
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
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.
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:
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:
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:
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:
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
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:
For SRV record names with beginning with _ldaps, specify ldaps. The constructed DNS SRV record name resembles the following:
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.
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:
The command has the following syntax:
- 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:
--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:
Bfor bytesKfor kilobytesGfor gigabytesTfor terabytesKifor kibibytesGifor gibibytesTifor tebibytes
For example, to limit download rates to no more than 1 GiB/s, use the following:
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:
Bfor bytesKfor kilobytesGfor gigabytesTfor terabytesKifor kibibytesGifor gibibytesTifor tebibytes
For example, to limit upload rates to no more than 1 GiB/s, use the following:
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:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
PATHwith the path to the bucket or bucket prefix.
Behavior
Removed and Re-added ARNs
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
Changed: RELEASE.2022-08-11T00-30-48Z
mc support top replaces the mc admin top command.
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
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:
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:
The output resembles the following:
The mc du command has the following syntax:
- 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:
You can specify multiple buckets and folders on the same or different MinIO deployment. For example:
For a folder on a local filesystem, specify the full path to that folder. For example:
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#ssformat. 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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith 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:
- Replace
DURATIONwith the desired point-in-time in the past. For example, specify30dto show the disk usage 30 days prior to the current date. - Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the bucket or folder on the S3-compatible host.
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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith 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:
The command has the following syntax:
- 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:
Global Flags
This command supports any of the global flags.
Examples
Export Existing Replication Rules
Use mc replicate export to export bucket replication rules:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
PATHwith 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.
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:
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.
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.
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 |
|---|---|
The |
|
The |
|
The |
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:
The command has the following syntax:
- 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:
Global Flags
This command supports any of the global flags.
Examples
Import Existing Replication Rules
Use mc replicate import to import bucket replication rules:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
PATHwith 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 |
|---|---|
The |
|
The |
|
The |
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:
The command has the following syntax:
- 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:
For objects on a filesystem, specify the full path to search. For example:
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
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
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
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
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
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to a bucket on the S3-compatible host. Omit the path to search from the root of the S3 host. - Replace
NAMEwith the object.
Find Objects with File Extension in Bucket
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to a bucket on the S3-compatible host. - Replace
EXTENSIONwith 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.
- Replace
FILEPATHwith the full file path to the directory to search. - Replace
EXTENSIONwith the file extension of the object. - Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to a bucket on the S3-compatible host.
To continuously watch the specified directory and copy new objects, include the --watch argument:
Find Objects with a Matching Tag
Note
Tag matching is only available for use on MinIO deployments.
- Replace
keywith the name of a tag key to match. - Replace
v*with the RE2 Regular Expression to evaluate against. - Replace
ALIASwith thealiasof the MinIO deployment. - Replace
BUCKETwith 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
Metadata matching is only available for use on MinIO deployments.
- Replace
content-type=text/csvwith the a key-value pair of the metadata field and value to match. - Replace
ALIASwith thealiasof the MinIO deployment. - Replace
BUCKETwith 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
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/.
The command has the following syntax:
- 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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
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 |
KEY- the full path to the object asalias/bucket/path/object.VALUE- the 32-byte RAW Base64-encoded data key to use for encrypting object(s).
For example:
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:
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.
Retrieve an encrypted object from MinIO
The following command retrieves an encrypted file and places it at a local folder path.
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:
The command has the following syntax:
- 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:
You can specify multiple objects on the same or different MinIO deployments. For example:
For an object on a local filesystem, specify the full path to that object. For example:
--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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
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 |
KEY- the full path to the object asalias/bucket/path/object.VALUE- the 32-byte RAW Base64-encoded data key to use for encrypting object(s).
For example:
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:
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#ssformat. 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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith 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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the object on the S3-compatible host. - Replace
DURATIONwith the point-in-time in the past at which the command returns the object. For example, specify30dto return the version of the object 30 days prior to the current date.
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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the object on the S3-compatible host. - Replace
VERSIONwith the version of the object. For example, specify30dto return the version of the object 30 days prior to the current date.
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
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
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 |
|---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
|
The |
The |
|
The |
4.109 - mc idp ldap accesskey
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 |
|---|---|
The |
|
|
|
|
|
The |
|
The |
|
The |
|
The |
4.110 - mc idp ldap accesskey create-with-login
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.
The command has the following syntax:
-
Replace
URLwith 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:
--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.
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.
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.
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.
4.111 - mc idp ldap policy
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 |
|---|---|
The |
|
The |
|
The |
4.112 - mc idp openid
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
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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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 ofPARAMETER="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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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 ofPARAMETER="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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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.
The command has the following syntax:
- Replace
ALIASwith 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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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
- create tiers
- create tiering rules
- manage expiration rules for objects on a bucket
Subcommands
mc ilm includes the following subcommands:
Subcommand |
Description |
|---|---|
The |
|
The |
|
The |
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 |
|---|---|
The |
|
The |
|
The |
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 |
|---|---|
The |
|
The |
|
Use the |
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:
The output resembles the following:
STANDARDmarks objects stored on the MinIO deploymentWARMmarks objects stored on the remote tier with matching namevideos/indicates the prefix for the object
The command has the following syntax:
- 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:
For listing objects on a local filesystem, specify the full path to that object. For example:
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#ssformat. 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:
-
Replace
PATHwith the path to the bucket on the S3-compatible host.If specifying the path to the S3 root (
ALIASonly), include the--recursiveoption.
List Object Versions
Use mc ls --versions to list all versions of an object:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the bucket or object on the S3-compatible host.
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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the bucket or object on the S3-compatible host. - Replace
DURATIONwith the point-in-time in the past at which the command returns the object. For example, specify30dto return the version of the object 30 days prior to the current date.
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.
The command has the following syntax:
- 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:
For creating a directory on a local filesystem, specify the full path to that directory. For example:
--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.
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:
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.
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
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
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.
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:
- 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:
ALIASis thealiasof a configured S3-compatible host, andPATHis the path to the bucket or object. If specifying a bucket,mc mirrorsynchronizes all objects in the bucket.
For files on a filesystem, specify the full filesystem path to the file or directory :
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:
ALIASis thealiasof a configured S3-compatible host, andPATHis the path to the bucket.
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
On site B, to mirror from B to A
--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
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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
Specify an existing data key on the external KMS. See the |
For example:
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-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:
You can specify the parameter multiple times to denote different object(s) to encrypt:
Specify the path to a prefix to apply encryption to all matching objects at that path:
--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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
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 |
KEY- the full path to the object asalias/bucket/path/object.VALUE- the 32-byte RAW Base64-encoded data key to use for encrypting object(s).
For example:
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:
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
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:
Bfor bytesKfor kilobytesMfor megabytesGfor gigabytesTfor terabytesKifor kibibytesMifor mibibytesGifor gibibytesTifor tebibytes
For example, to limit download rates to no more than 1 GiB/s, use the following:
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:
Bfor bytesKfor kilobytesMfor megabytesGfor gigabytesTfor terabytesKifor kibibytesMifor mibibytesGifor gibibytesTifor tebibytes
For example, to limit upload rates to no more than 1 GiB/s, use the following:
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.
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
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.
--watchcontinuously synchronizes files from Source to Target until explicitly terminated- The Target may have files that do not exist on Source
--watchoverwrites objects on the Target if a match exists on Source, like the--overwriteflag
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:
- Replace
FILEPATHwith the full file path to the directory to mirror. - Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith 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:
- Replace
FILEPATHwith the full file path to the directory to mirror. - Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith 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.
- Replace
SRCALIASwithaliasof a configured S3-compatible host. - Replace
SRCPATHwith the bucket to mirror. - Replace
TGTALIASwith thealiasof a configured S3-compatible host. - Replace
TGTPATHwith 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.
- Replace
SRCALIASwith thealiasof a configured S3 host. - Replace
SRCPATHwith the bucket to mirror. - Replace
TGTALIASwith thealiasof a configured S3 host. - Replace
TGTPATHwith 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.jpgphotos/2021/february/myotherphoto.jpgphotos/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:
The command has the following syntax:
- 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:
For moving an object from a local filesystem, specify the full path to that object. For example:
Specify multiple
SOURCEpaths to move multiple objects to the specifiedTARGET.mc rmtreats the last specified alias or filesystem path as theTARGET. For example:If you specify a directory or bucket to
SOURCE, you must also specify--recursiveto recursively move the contents of that directory. If you omit the--recursiveargument,mvonly 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:
For moving an object from a local filesystem, specify the full path to that object. For example:
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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
Specify an existing data key on the external KMS. See the |
For example:
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-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:
You can specify the parameter multiple times to denote different object(s) to encrypt:
Specify the path to a prefix to apply encryption to all matching objects at that path:
--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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
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 |
KEY- the full path to the object asalias/bucket/path/object.VALUE- the 32-byte RAW Base64-encoded data key to use for encrypting object(s).
For example:
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:
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:
Bfor bytesKfor kilobytesMfor megabytesGfor gigabytesTfor terabytesKifor kibibytesMifor mibibytesGifor gibibytesTifor tebibytes
For example, to limit download rates to no more than 1 GiB/s, use the following:
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:
Bfor bytesKfor kilobytesMfor megabytesGfor gigabytesTfor terabytesKifor kibibytesMifor mibibytesGifor gibibytesTifor tebibytes
For example, to limit upload rates to no more than 1 GiB/s, use the following:
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
-
Replace
FILEPATHwith the full file path to the file to move.If specifying the path to a directory, include the
--recursiveflag.mc mvremoves the files from the source after successfully moving it to the destination. -
Replace
ALIASwith thealiasof a configured S3-compatible host. -
Replace
PATHwith 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).
- Replace
FILEPATHwith the full file path to the file to move.mc mvremoves the file from the source after successfully moving it to the destination. - Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith the destination bucket. - Replace
ATTRIBUTESwith one or more comma-separated key-value pairsKEY=VALUE. Each pair represents one attribute key and value.
Move Bucket Between S3-Compatible Services
- Replace
SRCALIASwith thealiasof a configured S3-compatible host. - Replace
SRCPATHwith the path to the bucket.mc mvremoves the bucket and its contents from the source after successfully moving it to the destination. - Replace
TGTALIASwith thealiasof a configured S3-compatible host. - Replace
TGTPATHwith 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.
-
Replace
CLASSwith the storage class to associate to the files. -
Replace
FILEPATHwith the full file path to the file to move.mc mvremoves the file from the source after successfully moving it to the destination. -
Replace
ALIASwith thealiasof a configured S3-compatible host. -
Replace
PATHwith the destination bucket. -
Replace
ATTRIBUTESwith one or more comma-separated key-value pairsKEY=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:
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.jpgphotos/2021/february/myotherphoto.jpgphotos/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.
If passing the --json global flag, the output of the command resembles the following:
The command has the following syntax:
- 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.
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.
- Replace
myminio/mybucket/file.zipwith the path of the object or file stream to upload. - Replace
sizewith 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.
- Replace
myminio/mybucket/file.zipwith the path of the object or file stream to upload. - Replace
sizewith the desired size of the object parts. - Replace
partswith 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.
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.
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.
The command pings the deployment at the alias play for five cycles. The output resembles the following:
The command has the following syntax:
- 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
--exit
mc-cmd
Optional
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
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.
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.
End Liveness Checks for Error Counts Greater Than 20
The following command sends continuous liveness checks until 20 errors have been encountered:
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.
The command has the following syntax:
- 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.
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
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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
Specify an existing data key on the external KMS. See the |
For example:
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-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:
You can specify the parameter multiple times to denote different object(s) to encrypt:
Specify the path to a prefix to apply encryption to all matching objects at that path:
--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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
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 |
KEY- the full path to the object asalias/bucket/path/object.VALUE- the 32-byte RAW Base64-encoded data key to use for encrypting object(s).
For example:
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:
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.
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.
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:
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.
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.
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.
4.123 - mc put
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.
The command has the following syntax:
- 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
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
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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
Specify an existing data key on the external KMS. See the |
For example:
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-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:
You can specify the parameter multiple times to denote different object(s) to encrypt:
Specify the path to a prefix to apply encryption to all matching objects at that path:
--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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
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 |
KEY- the full path to the object asalias/bucket/path/object.VALUE- the 32-byte RAW Base64-encoded data key to use for encrypting object(s).
For example:
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:
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.
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.
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.
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:
The command has the following syntax:
- 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:
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:
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:
You can specify multiple ALIAS targets consisting of either MinIO or local filesystem directories. The command attempts to remove all specified targets. For example:
--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.
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
- Replace
ALIASwith thealiasof a configured S3-compatible host. - Replace
PATHwith 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.
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:
Once the request succeeds in connecting to the myminio deployment, the output resembles the following:
The command has the following syntax:
- 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.
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.
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
For multi-site replication, see mc admin replicate.
Subcommands
mc replicate includes the following subcommands:
Subcommand |
Description |
|---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
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 |
|---|---|
The |
|
The |
|
The |
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.
The following command removes multiple objects from the mydata bucket on the myminio MinIO deployment:
The command has the following syntax:
- 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:
You can specify multiple objects on the same or different MinIO deployments. For example:
If specifying the path to a bucket or bucket prefix, you must also specify the --recursive and --force arguments. For example:
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:
--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.
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#ssformat. 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
- Replace
ALIASwith thealiasof a configured S3-compatible service. - Replace
PATHwith 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.
- Replace
ALIASwith thealiasof a configured S3-compatible service. - Replace
PATHwith 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.
- Replace
ALIASwith thealiasof a configured S3-compatible service. - Replace
PATHwith 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.
Important
Removing specific versions of an object is a destructive action. You cannot restore the deleted object versions.
- Replace
ALIASwith thealiasof a configured S3-compatible service. - Replace
PATHwith the path to the object. For example,/mybucket/myobject. - Replace
DURATIONwith 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.jpgphotos/2021/february/myotherphoto.jpgphotos/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.
- To remove a specific object version from a bucket, use
mc rm --version-id - To remove all versions of an object from a bucket, use
mc rm --versions - To remove all non-current versions of an object from a bucket, use
mc rm --non-current
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 |
|---|---|
The |
|
The |
|
The |
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:
The command has the following syntax:
- 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:
--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:
GZIPBZIP2NONE(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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
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 |
KEY- the full path to the object asalias/bucket/path/object.VALUE- the 32-byte RAW Base64-encoded data key to use for encrypting object(s).
For example:
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:
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:
- Replace
ALIASwith the alias of the MinIO deployment. - Replace
PATHwith 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:
- Replace
ALIASwith the alias of the MinIO deployment. - Replace
PATHwith 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 |
|
Description |
|---|---|---|
|
The character that seperates each record (row) in the input Corresponds to |
|
|
The character that seperates each field in a record. Defaults to Corresponds to |
|
|
The character used for escaping when the Corresponds to |
|
|
The character used for escaping a quotation mark Corresponds to |
|
|
Yes |
The content of the first line in the Specify one of the following supported values:
For For Corresponds to |
|
Yes |
The character used to indicate a record should be ignored. The character must appear at the beginning of the record. Corresponds to |
|
Yes |
Specify Defaults to Corresponds to |
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:
The command has the following syntax:
- 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:
You can specify multiple objects on the same or different MinIO deployments:
If specifying the path to a bucket or bucket prefix, you must include the mc stat --recursive flag:
For retrieving information on a file from a local filesystem, specify the full path to that 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
|
The full path to the object as You can specify only the top-level path to use a single encryption key for all operations in that path. |
|
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 |
KEY- the full path to the object asalias/bucket/path/object.VALUE- the 32-byte RAW Base64-encoded data key to use for encrypting object(s).
For example:
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:
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#ssformat. 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:
The output resembles the following:
You can specify more than one object by adding multiple paths:
To display detail for all objects in a bucket, use --recursive. The following example displays details for all objects in bucket mybucket:
The output resembles the following:
Display Bucket Details
The following example displays information about the bucket mybucket on the myminio MinIO deployment:
The output resembles the following:
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:
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.
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 |
|---|---|
The |
|
The |
|
The |
|
Use the |
|
|
|
Use the |
|
The |
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 |
|---|---|
The |
|
The |
|
The |
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:
The command has the following syntax:
- 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:
You can specify multiple targets to the mc tree command. For example:
For retrieving the tree heirarchy of a local filesystem directory, specify the full path to that directory. For example:
--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#ssformat. 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
- Replace
ALIASwith the alias of the MinIO deployment. - Replace
PATHwith 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:
The command has the following syntax:
- 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:
This example reverts the most recent DELETE for the prefix archive, recursively restoring it and any child objects:
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:
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:
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:
The command has the following syntax:
- Brackets
[]indicate optional parameters. RELEASE-URLis 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:
Global Flags
--json
mc-cmd
Optional
Formats the disabled-update error as one JSON Lines object. This flag does not enable updating.
For example:
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 |
|---|---|
The |
|
The |
|
The |
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:
The command has the following syntax:
- 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:
--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:
Examples
Watch for Events in 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.139 - mc idp ldap accesskey create
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
minioalias:
The command has the following syntax:
-
Replace
ALIASwith 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:
--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
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.
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.
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.
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.
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.
5 - mc ilm edit
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:
The command modifies the specified rules as follows:
- Delete objects more than 90 days old.
- Delete
DeleteMarkertombstones if that object has no other versions remaining. - Transition objects more than 30 days old to the
COLDTIERremote tier.
The command has the following syntax:
- 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:
--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:
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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith the path to the bucket on the S3-compatible host. - Replace
RULEIDwith the unique ID of the object lifecycle management rule. Usemc ilm rule lsto find theRULEID. - Specify any additional flags to add or modify the lifecycle management rule. For example, specify
--transition-daysto 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.
- Replace
RULEIDwith the unique ID of the object lifecycle management rule. Usemc ilm rule lsto find theRULEID. - Replace
myminiowith the ALIAS of the deployment where the rule exists. - Replace
mybucketwith 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
Changed: RELEASE.2022-12-13T00-23-28Z
mc quota info replaced mc admin bucket quota.
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:
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 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:
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:
Replace:
minio-operatorwith the namespace for your Operator, if not using the default value.deployment/minio-operatorwith 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.
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
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:
Command Quick reference
The following table lists mc admin commands:
Command |
Description |
|---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
Use the |
|
The |
|
The |
|
The |
|
The 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. |
|
The |
|
The |
|
The |
|
The |
|
The |
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.
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.
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:
Global Options
mc admin supports the same global options as mc. See Global Options.
8.1 - mc admin accesskey
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 |
|---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
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.
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:
The command returns the access key and secret key for the new account.
The command has the following syntax:
- 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-242024-10-24T10:002024-10-24T10:00:002024-10-24T10:00:00Z2024-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:
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.
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.
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.
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.
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.
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
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.
The command has the following syntax:
- 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
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.
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.
The command has the following syntax:
- 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.
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.
The command has the following syntax:
- 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.
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.
Attach the audit-policy and acct-policy policies to group legal on the deployment at alias myminio.
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
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:
The command has the following syntax:
- 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:
apireplication
The following example generates a configuration for API metrics from the bucket mybucket:
TYPE
mc-cmd
Optional
The type of metrics to scrape.
Valid values for metrics version 3 are:
apiauditclusterdebugilmloggernotificationreplicationscannersystemIf not specified, a
v3command returns all metrics.Valid values for metrics version 2 are:
bucketclusternoderesourceIf not specified, a
v2command 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:
- Replace
ALIASwith thealiasof the MinIO deployment.
The output resembles the following:
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:
- Replace
ALIASwith thealiasof the MinIO deployment.
The output resembles the following:
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:
- Replace
ALIASwith thealiasof the MinIO deployment.
The output resembles the following:
Generate a v3 config for bucket API metrics
The following example generates a scrape configuration for v3 API metrics for bucket mybucket:
- Replace
ALIASwith thealiasof the MinIO deployment.
The output resembles the following:
Generate a default metrics v2 config
By default, mc admin prometheus generate generates a scrape configuration for v2 cluster metrics:
- Replace
ALIASwith thealiasof the MinIO deployment.
The output resembles the following:
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:
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.
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.
The command returns results similar to the following:
The command has the following syntax:
- 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:
The command has the following syntax:
- 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:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
ACCESSKEYwith the access key for the user. - Replace
SECRETKEYwith 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:
- Use
mc admin policy attachto associate one or more policies to the user. - Use
mc admin group addto associate the user to the group. Users inherit any policies assigned to the group.
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
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.
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:
The command returns the access key and secret key for the new account.
The command has the following syntax:
- 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.
- For MinIO-managed users, specify the access key for the user.
- For Active Directory/LDAP users, specify the Distinguished Name of the user.
- For OpenID Connect users, use the MinIO Console to generate access keys.
--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
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
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
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-242023-06-24T10:002023-06-24T10:00:002023-06-24T10:00:00Z2023-06-24T10:00:00-07:00
--name
mc-cmd
Optional
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:
The command has the following syntax:
- 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
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 |
|---|---|
The |
|
The |
8.12 - mc admin cluster bucket export
Description
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.
The command has the following syntax:
- 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
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.
The command has the following syntax:
- 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.
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.
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:
The following command creates a new policy called listmybuckets on the alias myminio using the policy found at the file /tmp/listmybuckets.json.
The command has the following syntax:
- 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.
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
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:
The command has the following syntax:
- 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:
apireplication
The following example prints API metrics for the bucket mybucket:
TYPE
mc-cmd
Optional
The type of metrics to print.
Valid values for metrics version 3 are:
apiauditclusterdebugilmloggernotificationreplicationscannersystemIf not specified, a
v3command returns all metrics.Valid values for metrics version 2 are:
bucketclusternoderesourceIf not specified, a
v2command 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:
- Replace
ALIASwith thealiasof the MinIO deployment.
To print a specific type of metrics, include the TYPE. The following prints all scanner metrics for a deployment:
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:
- Replace
ALIASwith thealiasof 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:
- Replace
ALIASwith thealiasof 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:
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.
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.
The command has the following syntax:
- 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:
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:
Show scanner API operations for the scanObject function
Monitor scanner activity for the scanObject function on the myminio deployment:
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:
Show scanner operation responses greater than 1MB in size
Use mc admin scanner trace to monitor large response sizes:
Show scanner operations that last longer than five milliseconds
Use mc admin scanner trace to monitor long operations:
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:
The command has the following syntax:
- 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.
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
USERNAMEwith 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
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:
The command has the following syntax:
- 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
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 |
|---|---|
The |
|
The |
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.
The command has the following syntax:
- 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.
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.
Detach the audit-policy and acct-policy policies from group legal on the deployment at alias myminio.
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:
The command has the following syntax:
- 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-242023-06-24T10:002023-06-24T10:00:002023-06-24T10:00:00Z2023-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:
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.
Change the expiration for an access key
The following command changes the expiration value for the access key myuseraccesskey on the myminio deployment.
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:
The command has the following syntax:
- 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.
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
USERNAMEwith 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
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:
The command has the following syntax:
- 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
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
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-242023-06-24T10:002023-06-24T10:00:002023-06-24T10:00:00Z2023-06-24T10:00:00-07:00
--name
mc-cmd
Optional
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:
The command has the following syntax:
- 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.
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.
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.
The command has the following syntax:
- 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.
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.
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.
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.
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.
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.
Output
The output of the commands resembles the following:
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:
The command has the following syntax:
- 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.
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:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
USERNAMEwith the username of the user to display information for.
For the MinIO internal IDentity Provider (IDP), the output resembles the following:
For a third-party identity service such as LDAP, the output resembles the following:
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:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
USERNAMEwith 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:
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
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:
The command has the following syntax:
- 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 (
onoroff) - Policy or policies
- Comment
- Expiration
The following command returns information on the specified access key:
The command has the following syntax:
- 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:
- Replace
myminiowith thealiasof the MinIO deployment. - Replace
myaccesskeywith the access key for which to display information. List multiple keys by separating each with a space.
The output resembles the following:
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.
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.
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:
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.
The command has the following syntax:
- 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.
Show information on a given policy and write the policy JSON content to /tmp/policy.json.
Output
The command returns output that resembles the following:
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:
The command has the following syntax:
- 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:
The output resembles the following:
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
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 (
onoroff) - Policy or policies
- Comment
- Expiration
Use --policy to view the attached policies.
The following command returns information on the specified access key:
The command has the following syntax:
- 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:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
ACCESSKEYwith the service account access key.
The output resembles the following:
Display Service Account Policy Details
Use mc admin user svcacct info to display the policies attached to service account:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
ACCESSKEYwith the service account access key.
The output resembles the following:
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:
The output resembles the following:
The command has the following syntax:
- 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.
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.
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.
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.
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.
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.
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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
GROUPNAMEwith the name of the group to create. - Replace
MEMBERwith at least oneuseron 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:
View Group Details
Use mc admin group info to view detailed group information on an S3-compatible host:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
GROUPNAMEwith the name of the group.
Remove a Group
Use mc admin group rm to remove a group from an S3-compatible host:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
GROUPNAMEwith the name of the group.
Disable a Group
Use mc admin group disable to disable a group on an S3-compatible host:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
GROUPNAMEwith the name of the group.
Enable a Group
Use mc admin group enable to enable a group on an S3-compatible host:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
GROUPNAMEwith 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.
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:
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:
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:
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:
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:
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:
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.
The command has the following syntax:
- 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.
Output
The command returns output that resembles the following:
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:
Removes a user on the target MinIO deployment.
The command has the following syntax:
- 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:
- Replace
ALIASwith thealiasof the MinIO deployment. - Replace
USERNAMEwith 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
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:
The output resembles the following:
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:
- 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.
Warning
Applications can no longer authenticate using the access key after its removal.
The following command removes the specified access key:
The command has the following syntax:
- 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
POSTorGEToperation. - 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.
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 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:
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.
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:
The command has the following syntax:
- 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.
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:
The command has the following syntax:
- 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
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:
The command has the following syntax:
- 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.
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:
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.
Syntax
mc admin info has the following syntax:
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
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 |
|---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
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).
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:
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:
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:
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
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.
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.
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.
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.
Syntax
The command has the following syntax:
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
Changed: mc
RELEASE.2023-03-20T17-17-53Z
The following commands are deprecated:
mc admin policy addusemc admin policy createinsteadmc admin policy setusemc admin policy attachinsteadmc admin policy unsetusemc admin policy detachinsteadmc admin policy updateuseattachordetachinstead
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 |
|---|---|
Attaches one or more IAM policies to either a MinIO-managed user or a group. |
|
Creates a new policy on the target MinIO deployment. |
|
Remove one or more IAM policies from either a MinIO-managed user or a group. |
|
List the entities associated with a policy, user, or group on a target MinIO deployment. |
|
Returns the specified policy in JSON format if it exists on the target MinIO deployment. |
|
Lists all policies on the target MinIO deployment. |
|
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 |
|---|---|
The |
|
The |
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:
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.
The command has the following syntax:
- 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 stop
mc-cmd
Ends an in-progress rebalance job on the specified 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
Changed: RELEASE.2023-01-11T03-14-16Z
mc admin replicate editrenamed tomc admin replicate updatemc admin replicate removerenamed tomc admin replicate rm
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
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.
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.
The following command creates a new site replication configuration with ILM expiration rule synchronization between peer sites minio1, minio2, and minio3.
The command has the following syntax:
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
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.
Changed: RELEASE.2023-01-11T03-14-16Z
mc admin replicate edit renamed to mc admin replicate update.
The command has the following syntax:
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:
Bfor bytesKfor kilobytesMfor megabytesGfor gigabytesTfor terabytesKifor kibibytesMifor mibibytesGifor gibibytesTifor tebibytes
For example, the following command limits the replication on the myminio deployment to no more than 2 Gigabytes per second.
--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
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
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
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
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.
Remove the sites with alias names minio5 and minio6 from an existing site replication configuration that includes minio2
The command has the following syntax:
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.
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.
Display the replication status of buckets across sites for a site replication configuration that includes the site minio1.
Display the site replication status of a bucket called images across sites for a site replication configuration that contains the site minio1.
Display the site replication status for the setting for a user, janedoe, across sites for a site replication configuration that contains the site minio1.
The output of the above examples resembles the following:
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.
The output resembles the following:
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
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
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
The following command shows the status of a resynchronization currently in progress.
The following command stops a resynchronization that is in progress.
- Replace
ALIAS1with the alias for the site that has the data to restore. - Replace
ALIAS2with 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 |
|---|---|
The |
|
The |
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.
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.
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.
Syntax
mc admin service has the following syntax:
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:
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:
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.
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:
See Calls that Return 503 Errors
Use mc admin trace to monitor API operations that return a service unavailable 503 error:
See Console Trace for a Path
Use mc admin trace to monitor activity for a specific path:
- Replace
ALIASwith thealiasof 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:
See Console Trace for a Request Operation Durations Greater than 5ms
Use mc admin trace to monitor long operations:
Syntax
mc admin trace has the following syntax:
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.
Valid call types include:
batch-keyrotationbatch-replicationbootstrapdecommissionftphealingilminternalosrebalancereplication-resyncs3scannerstorage
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.
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.
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:
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 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
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:
- For AD/LDAP, use
mc idp ldap - For OpenID Connect (OIDC) compatible providers, use
mc idp openid
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 |
|---|---|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The |
|
The As of MinIO Client RELEASE.2024-10-08T09-37-26Z, these commands have been replaced by |
9 - mc ilm export
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:
The command has the following syntax:
- 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:
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:
-
Replace
ALIASwith the alias of the MinIO deployment and the bucket for which to export object lifecycle management rules:myminio/mydata -
Replace
file.jsonwith 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
Changed: RELEASE.2022-12-13T00-23-28Z
mc quota set replaced mc admin bucket quota --hard.
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.
- Replace
TARGETwith thealiasof a configured MinIO deployment. ReplaceBUCKETwith the name of the bucket on which to set the hard quota. - Replace
LIMITwith 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, specify10t.
Syntax
mc quota set has the following syntax:
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:
--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
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:
See Operator environment variables for a list of all supported values.
image
Specify the Operator container image to use for the deployment.
image.tagFor example, the following sets the image to thequay.io/minio/operatorrepo and the v7.1.1 tag. The container pulls the image if not already present:The chart also supports specifying an image based on digest value:
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.tagFor example, the following sets the image to thequay.io/minio/operator-sidecarrepo and the v7.1.1 tag. The container pulls the image if not already present:The chart also supports specifying an image based on digest value:
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
initContainerfailures 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:
The
namefield must correspond to an entry in thevolumesarray.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.
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:
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:
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.nethttps://minio2.example.nethttps://minio3.example.nethttps://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.
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.
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:
A command like the following would listen for API calls on port 9000 on both configured IP addresses.
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, typically8021 -
(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 TLSUse with
tls-public-cert. -
(Optional)
tls-public-cert, which takes the path to the certificate for accessing the MinIO deployment by TLSUse 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:
--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 |
|---|---|---|
|
Port to use for connecting to SFTP. |
Any valid port number, typically |
|
Path to the user’s private key file. |
Absolute path or relative path from current location to the key file to use. |
|
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. |
|
Comma-separated list of the public key algorithms to support. |
|
|
Comma-separated list in priority order of the key-exchange algorithms to support. |
|
|
Comma-separated list of cipher algorithms to support |
|
|
Comma-separated list in preference order of MAC algorithms to support.
Based on RFC 4253 section 6.4 with the exception of |
|
|
Disable password authentication. |
|
For example:
--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:
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.
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
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.
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.
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:
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:
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/.
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:
|
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. |
|
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. |
|
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. |
|
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. |
|
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.
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".
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".
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.
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
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
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.
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.
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.
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.
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
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.
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
Added: Server
RELEASE.2024-03-03T17-50-39Z
MinIO automatically generates unique root credentials if all of the following conditions are true:
-
KES Release 2024-03-01T18-06-46Z or later running
-
Have not defined:
MINIO_ROOT_USERvariableMINIO_ROOT_PASSWORDvariable
-
Have:
- set up KES with a supported KMS target
- disabled root access with the MinIO environment variable
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.
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
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 . 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
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
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.
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
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
NoteAdded: 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
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
browser csp_policy
mc-conf
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.
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.
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.
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.
browser hsts_include_subdomains
mc-conf
Set to on to also apply the configured HSTS policy to all MinIO Console subdomains. Defaults to off.
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.
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
hsts_include_subdomains
hsts_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
browser referrer_policy
mc-conf
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:
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.
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 generateto generate the necessary JWT bearer tokens. -
publicMinIO 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:
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:
Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:
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:
Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:
Consult the documentation for the desired service for more details.
Batch Size
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
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
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:
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.
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:
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:
Modify the value according to the endpoint requirements.
A custom authentication format could resemble the following:
Modify the value according to the endpoint requirements.
A command for a custom authentication format could resemble the following:
Consult the documentation for the desired service for more details.
Batch Size
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
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
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
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.
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:
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.
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.
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.
The SASL password MinIO uses for authentication against the Kafka brokers.
SASL Mechanism
Optional
MINIO_AUDIT_KAFKA_SASL_MECHANISM
envvar
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
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.
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.
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.
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:
For example, MINIO_NOTIFY_AMQP_ENABLE_PRIMARY indicates the environment variable is associated to an AMQP service endpoint with ID of PRIMARY.
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.
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.
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.
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
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.
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.
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.
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.
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:
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.
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"
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).
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)SHA256SHA512
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
onto disable TLS verification (Default). - Specify
offto 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.
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
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:
nonesnappygziplz4zstd
Compression Level
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.
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:
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:
brokertopicusernameOptional if MQTT server/broker does not enforce authentication/authorizationpasswordOptional if MQTT server/broker does not enforce authentication/authorization
Specify additional optional arguments as a whitespace (" ")-delimited list.
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:1883tls://mqtt.example.net:1883ws://mqtt.example.net:1883
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.
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.
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:
With these settings, MINIO_NOTIFY_MYSQL_ENABLE_PRIMARY indicates the environment variable is associated to a MySQL service endpoint with ID of PRIMARY.
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.
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"
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
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.
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:
With these settings, MINIO_NOTIFY_NATS_ENABLE_PRIMARY indicates the environment variable is associated to an NATS service endpoint with ID of PRIMARY.
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.
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.
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.
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.
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
onto disable TLS verification (Default). - Specify
offto 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.
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:
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.
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
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
onto disable TLS verification (Default). - Specify
offto 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.
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:
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.
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.
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.
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:
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.
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.
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.
Changed: RELEASE.2023-06-23T20-26-00Z
MinIO redacts this value when returned as part of mc admin config get.
User
Optional
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.
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:
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.
Endpoint
Required
MINIO_NOTIFY_WEBHOOK_ENDPOINT
envvar
notify_webhook endpoint
mc-conf
Specify the URL for the webhook service.
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:
Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:
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:
Modify the value according to the endpoint requirements. A custom authentication format could resemble the following:
Consult the documentation for the desired service for more details.
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.
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.
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
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:
enabledserver_addrlookup_bind_dnlookup_bind_dn_passworduser_dn_search_base_dnuser_dn_search_filter
Settings
Server Address
Required
MINIO_IDENTITY_LDAP_SERVER_ADDR
envvar
Specify the hostname for the Active Directory / LDAP server. For example:
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:
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.
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:
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:
User DN Attributes
Optional
MINIO_IDENTITY_LDAP_USER_DN_ATTRIBUTES
envvar
identity_ldap user_dn_attributes
mc-conf
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.
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:
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:
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
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:
For SRV record names with beginning with _ldaps, specify ldaps. The constructed DNS SRV record name resembles the following:
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.
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.
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
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.
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.
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
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:
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.
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.
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.
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.
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.
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.
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.
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
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
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.
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.
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
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.
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:
lambda_webhook enable
mc-conf
Optional
Specify "on" to enable the Object Lambda webhook endpoint for a handler function. Requires specifying endpoint.
Example:
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:
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:
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.
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:
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:
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.
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
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.
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
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_USERenvironment variable.
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
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
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
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
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
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:
The command has the following syntax:
- 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:
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:
-
Replace
ALIASwith the alias of the MinIO deployment and the bucket into which to import object lifecycle management rules:myminio/mydata -
Replace
file.jsonwith 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
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.tagFor example, the following sets the image to thequay.io/minio/operatorrepo and the v7.1.1 tag. The container pulls the image if not already present:The chart also supports specifying an image based on digest value:
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:
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
nameand then a list of environment variables. To reuse an existing Secret containingconfig.env, settenant.configSecret.nameto that Secret and settenant.configSecret.existingSecrettotrue.WarningImportant
Do not use this in production environments. This field is intended for use with rapid development or testing only.
For example:
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
fsGroupChangePolicytoOnRootMismatchas 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.
CautionWarning
Treat the
mountPathandsubPathvalues 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
requestAutoCertto false, the Tenant starts without TLS.WarningImportant
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.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:
users
Array of Kubernetes secrets from which the Operator generates MinIO users during tenant provisioning.
Each secret should specify the
CONSOLE_ACCESS_KEYandCONSOLE_SECRET_KEYas 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: trueto expose the MinIO S3 API.- Specify
console: trueto 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
jsonfor JSON-formatted logs.- Specify
anonymousfor anonymized logs.- Specify
quietto supress logging.An example of JSON-formatted logs is as follows:
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:
The
namefield must correspond to an entry in theadditionalVolumesarray.
ingress
Configures Ingress for the Tenant S3 API and Console.
Set the keys to conform to the Ingress controller and configuration of your choice.
16 - mc ilm ls
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:
The following command lists all lifecycle management rules for the mydata bucket on the myminio MinIO deployment:
The mc ilm ls command has the following syntax:
- 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:
--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:
- Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith 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
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:
The command has the following syntax:
- 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:
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:
- Replace
RULEwith the unique name of the lifecycle management rule. - Replace
ALIASwith thealiasof the S3-compatible host. - Replace
PATHwith 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
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.
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 |
|---|---|
The |
|
The |
|
The |
19 - mc admin bucket quota
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.
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.
- Replace
TARGETwith thealiasof a configured MinIO deployment. ReplaceBUCKETwith the name of the bucket on which to set the hard quota. - Replace
LIMITwith the maximum size to which the bucket can grow. For example, to set a hard limit of 10 Terrabytes, specify10t. 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:
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.
- Replace
TARGETwith thealiasof a configured MinIO deployment. ReplaceBUCKETwith the name of the bucket on which to clear the quota.
Syntax
mc admin bucket quota has the following syntax:
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:
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
Changed: RELEASE.2022-12-24T15-21-38Z
mc admin bucket remote addreplaced bymc replicate addmc admin bucket remote updatereplaced bymc replicate updatemc admin bucket remote rmreplaced bymc replicate rmmc admin bucket remote lsreplaced bymc replicate ls
Changed: RELEASE.2023-02-16T19-20-11Z
-
mc admin bucket remote bandwidthreplaced bymc replicate statusReplication related statistics are moving to the
mc replicate statuscommand.
Description
The mc admin bucket remote command manages the ARN resources for use with bucket replication.
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:
- Replace
SOURCEwith thealiasof the MinIO deployment to use as the replication target. ReplaceBUCKETwith the full path of the bucket into which MinIO replicates objects from theDESTINATION. - Replace
DESTINATIONwith thealiasof the MinIO deployment to use as the replication source. ReplaceBUCKETwith the full path of the bucket from which MinIO replicates objects into theSOURCE.
Remove an Existing Replication Target
Use mc admin bucket remote rm to remove a replication target from a bucket:
- Replace
SOURCEwith thealiasof the MinIO deployment being used as the replication source. ReplaceBUCKETwith the full path of the bucket from which MinIO replicates objects. - Replace
ARNwith 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:
- Replace
ALIASwith thealiasof the MinIO deployment being used as the replication source. ReplacePATHwith the full path of the bucket from which MinIO replicates objects.
Syntax
mc admin bucket remote add
mc-cmd
Changed: RELEASE.2022-12-24T15-21-38Z
mc admin bucket remote addreplaced bymc replicate add
Adds a remote target to a bucket on a MinIO deployment. The command has the following syntax:
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:
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:
-
Replace
ACCESSKEYwith the access key for a user on thedestination MinIO deployment.
-
Replace
SECRETKEYwith the secret key for a user on thedestination MinIO deployment.
-
Replace
DESTHOSTNAMEwith the hostname and port of the MinIOdeployment (i.e.
minio-server.example.net:9000). -
Replace
DESTBUCKETwith the bucket on thedestination.
--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:
onoffauto(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
Changed: RELEASE.2022-12-24T15-21-38Z
mc admin bucket remote lsreplaced bymc replicate ls
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
Changed: RELEASE.2022-12-24T15-21-38Z
mc admin bucket remote rmreplaced bymc replicate rm
Removes a remote target for a bucket on the MinIO deployment. The command has the following syntax:
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:
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
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.
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 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:
minioapplicationall(Default)
22 - mc admin idp ldap
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
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.
The command has the following syntax:
- Replace
ALIASwith 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 ofPARAMETER="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.
The command has the following syntax:
- Replace
ALIASwith 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 ofPARAMETER="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.
The command has the following syntax:
- Replace
ALIASwith 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.
The command has the following syntax:
- Replace
ALIASwith 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.
The command has the following syntax:
- Replace
ALIASwith 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.
The command has the following syntax:
- Replace
ALIASwith 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.
The command has the following syntax:
- Replace
ALIASwith 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
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.
The following example attaches the policy, userpolicy, to the user bobfisher on the myminio deployment.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for AD/LDAP integration. - Replace
POLICYNAMEwith the policy to attach to the entity. You may list multiple policies to attach to the entity. - Use must use one of either the
--useror--groupflag. 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.
The following example detaches the policy, userpolicy, from the user bobfisher on the myminio deployment.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for AD/LDAP integration. - Replace
POLICYNAMEwith the policy to detach from the entity. You may list multiple policies to detach from the entity. - Use must use one of either the
--useror--groupflag. 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
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for AD/LDAP integration. - You may use each of the
--user,--group, and/or--policyflags 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
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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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 ofPARAMETER="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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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 ofPARAMETER="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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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.
The command has the following syntax:
- Replace
ALIASwith 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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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.
The command has the following syntax:
- Replace
ALIASwith the alias of a MinIO deployment to configure for OpenID integration. - Replace
CFG_NAMEwith 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
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.
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:
Use mc admin profile stop to stop profiling data from the specified resource and output the results:
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:
- Replace
ALIASwith thealiasof the MinIO host. - Replace
TYPEwith 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:
The command outputs the profiled data as profile.zip.
Syntax
mc admin profile has the following syntax:
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 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:
cpumemblockmutextracethreadsgoroutines
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:
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
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.
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 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
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”).
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:.
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:
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:
- Amazon S3 Permissions
- Google Cloud Storage Access Control
- Authorizing access to data in Azure storage
Syntax
mc admin tier add
mc-cmd
Creates a new remote storage tier for transitioning objects using MinIO lifecycle management rules.
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:
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:
|
Use AWS S3 or a remote MinIO deployment as the storage backend for the new Tier. Requires specifying the following additional options: |
|
Use Azure Blob Storage as the storage backend for the new Tier. Requires specifying the following additional options: |
|
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:
STANDARDREDUCED_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:
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:
The command accepts the following arguments:
TARGET
mc-cmd
Required
The alias of a configured MinIO deployment.
28 - mc admin top
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.
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:
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.
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.
Important
MinIO strongly recommends using an S3-Compatible SDK for performing object storage operations.
Object APIs
- CopyObject
- DeleteObject
- DeleteObjects
- DeleteObjectTagging
- GetObject
- GetObjectAttributes
- GetObjectTagging
- HeadObject
- ListObjects
- ListObjectsV2
- ListObjectVersions
- PutObject
- PutObjectTagging
- RestoreObject
- SelectObjectContent
Object Locking
- GetObjectRetention
- PutObjectRetention
- GetObjectLegalHold
- PutObjectLegalHold
- GetObjectLockConfiguration
- PutObjectLockConfiguration
Unsupported API Object Endpoints
Multipart Uploads
- AbortMultipartUpload
- CompleteMultipartUpload
- CreateMultipartUpload
- ListMultipartUploads
- ListParts
- UploadPart
- UploadPartCopy
Differences from S3 APIs for Multipart Uploads
ListMultipartUploadsrequires the exact object name as a prefix.- The
AbortIncompleteMultipartUploadlifecycle action is not supported withPutBucketLifecycle.
Bucket APIs
- CreateBucket
- DeleteBucket
- DeleteBucketEncryption
- DeleteBucketTagging
- GetBucketEncryption
- GetBucketLocation
- GetBucketTagging
- GetBucketVersioning
- HeadBucket
- ListBuckets
- ListDirectoryBuckets
- PutBucketEncryption
- PutBucketTagging
- PutBucketVersioning
Bucket Replication
Bucket Lifecycle
- GetBucketLifecycle
- GetBucketLifecycleConfiguration
- PutBucketLifecycle
- PutBucketLifecycleConfiguration
- DeleteBucketLifecycle
Bucket Notifications
- GetBucketNotification
- GetBucketNotificationConfiguration
- PutBucketNotification
- PutBucketNotificationConfiguration
Bucket Policies
Unsupported API Bucket Operations
MinIO alternatives for unsupported Bucket resources
- For calls to
BucketACLorObjectACLoperations, use Policies. - Calls to
BucketCORSoperations are not needed because CORS is enabled by default on all buckets for all HTTP verbs. - For calls to
BucketWebsiteoperations, usecaddyornginx. - For calls to
BucketAnalytics,BucketMetrics, orBucketLoggingoperations, use Bucket Notifications.