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.