mirror of
https://github.com/minio/docs.git
synced 2025-07-30 07:03:26 +03:00
DOCS-380: Refactor CLI reference
This commit is contained in:
96
source/includes/common-minio-mc.rst
Normal file
96
source/includes/common-minio-mc.rst
Normal file
@ -0,0 +1,96 @@
|
||||
.. start-minio-mc-globals
|
||||
|
||||
.. mc-cmd:: debug
|
||||
:option:
|
||||
|
||||
Enables verbose output to the console.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc --debug COMMAND
|
||||
|
||||
.. mc-cmd:: config-dir
|
||||
:option:
|
||||
|
||||
The path to a ``JSON`` formatted configuration file that
|
||||
:program:`mc` uses for storing data. See :ref:`mc-configuration` for
|
||||
more information on how :program:`mc` uses the configuration file.
|
||||
|
||||
.. start-minio-mc-json-globals
|
||||
|
||||
.. mc-cmd:: JSON
|
||||
:option:
|
||||
|
||||
Enables `JSON lines <http://jsonlines.org/>`_ formatted output to the
|
||||
console.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc --JSON COMMAND
|
||||
|
||||
.. end-minio-mc-json-globals
|
||||
|
||||
.. mc-cmd:: no-color
|
||||
:option:
|
||||
|
||||
Disables the built-in color theme for console output. Useful for dumb
|
||||
terminals.
|
||||
|
||||
.. mc-cmd:: quiet
|
||||
:option:
|
||||
|
||||
Suppresses console output.
|
||||
|
||||
.. mc-cmd:: 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.
|
||||
|
||||
.. mc-cmd:: version
|
||||
:option:
|
||||
|
||||
Displays the current version of :mc-cmd:`mc`.
|
||||
|
||||
.. mc-cmd:: help
|
||||
:option:
|
||||
|
||||
Displays a summary of command usage on the terminal.
|
||||
|
||||
.. end-minio-mc-globals
|
||||
|
||||
.. start-minio-mc-no-flags
|
||||
|
||||
This command supports only global flags
|
||||
|
||||
.. end-minio-mc-no-flags
|
||||
|
||||
.. start-minio-mc-s3-compatibility
|
||||
|
||||
The :program:`mc` commandline tool is built for compatibility with the AWS S3
|
||||
API and is tested 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 :program:`mc`
|
||||
commands *may* work as documented, any such usage is at your own risk.
|
||||
|
||||
.. end-minio-mc-s3-compatibility
|
||||
|
||||
.. start-minio-syntax
|
||||
|
||||
- Brackets ``[]`` indicate optional parameters.
|
||||
- Parameters sharing a line are mutually dependent.
|
||||
- Parameters sharing a line *and* seperated using the pipe ``|`` operator are
|
||||
mutually exclusive.
|
||||
|
||||
Copy the example to a text editor and modify as-needed before running the
|
||||
command in the terminal/shell.
|
||||
|
||||
.. end-minio-syntax
|
@ -23,11 +23,11 @@ The example above specifies the following arguments:
|
||||
* - Argument
|
||||
- Description
|
||||
|
||||
* - :mc-cmd:`ALIAS <mc ilm add TARGET>`
|
||||
* - :mc-cmd:`ALIAS <mc ilm add ALIAS>`
|
||||
- Specify the :mc:`alias <mc alias>` of the MinIO deployment for which
|
||||
you are creating the lifecycle management rule.
|
||||
|
||||
* - :mc-cmd:`BUCKET <mc ilm add TARGET>`
|
||||
* - :mc-cmd:`BUCKET <mc ilm add ALIAS>`
|
||||
- Specify the full path to the bucket for which you are
|
||||
creating the lifecycle management rule.
|
||||
|
||||
@ -41,13 +41,15 @@ The example above specifies the following arguments:
|
||||
|
||||
* - :mc-cmd:`DAYS <mc ilm add transition-days>`
|
||||
- The number of calendar days after which MinIO marks an object as
|
||||
eligible for transition.
|
||||
eligible for transition. Specify the number of days as an integer,
|
||||
e.g. ``30`` for 30 days.
|
||||
|
||||
* - :mc-cmd:`NONCURRENT_DAYS <mc ilm add noncurrentversion-transition-days>`
|
||||
- The number of calendar days after which MinIO marks a noncurrent
|
||||
object version as eligible for transition. MinIO specifically measures
|
||||
the time since an object *became* non-current instead of the object
|
||||
creation time.
|
||||
creation time. Specify the number of days as an integer,
|
||||
e.g. ``90`` for 90 days.
|
||||
|
||||
Omit this value to ignore noncurrent object versions.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
.. start-rewind-desc
|
||||
|
||||
Directs |command| to operate only on the object version(s) that existed at
|
||||
specified point-in-time.
|
||||
*Optional* Directs |command| 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"``.
|
||||
@ -17,7 +17,8 @@ that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
|
||||
.. start-versions-desc
|
||||
|
||||
Directs |command| to operate on all object versions that exist in the bucket.
|
||||
*Optional* Directs |command| to operate on all object versions that exist in the
|
||||
bucket.
|
||||
|
||||
|versions| requires that the specified |alias| be an S3-compatible service
|
||||
that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
@ -27,7 +28,7 @@ that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
|
||||
.. start-version-id-desc
|
||||
|
||||
Directs |command| to operate only on the specified object version.
|
||||
*Optional* Directs |command| to operate only on the specified object version.
|
||||
|
||||
|versionid| requires that the specified |alias| be an S3-compatible service
|
||||
that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
@ -35,101 +36,6 @@ that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
|
||||
.. end-version-id-desc
|
||||
|
||||
..
|
||||
|
||||
So this is an ugly workaround. Since you can't override substitutions
|
||||
on a single page, those reference commands with multiple subcommands
|
||||
get kind of messy. Instead, the following sections "duplicate"
|
||||
the core content for supporting commands with multiple subcommands that
|
||||
support versioning arguments.
|
||||
|
||||
The ideal path forward would be to extend the include directive to
|
||||
allow for per-directive replacement, but that will take significant
|
||||
engineering effort. So until then, kludges it is.
|
||||
|
||||
..
|
||||
----------------- 2nd Argument --------------------
|
||||
|
||||
.. start-rewind-desc-2
|
||||
|
||||
Directs |command-2| to operate only on the object version(s) that existed at
|
||||
specified point-in-time.
|
||||
|
||||
- To rewind to a specific date in the past, specify the date as an
|
||||
ISO8601-formatted timestamp. For example: ``--rewind "2020.03.24T10:00"``.
|
||||
|
||||
- To rewind a duration in time, specify the duration as a string in
|
||||
``#d#hh#mm#ss`` format. For example: ``--rewind "1d2hh3mm4ss"``.
|
||||
|
||||
|rewind-2| requires that the specified |alias-2| be an S3-compatible service
|
||||
that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
:mc-cmd:`mc version` to enable or disable bucket versioning.
|
||||
|
||||
.. end-rewind-desc-2
|
||||
|
||||
.. start-versions-desc-2
|
||||
|
||||
Directs |command-2| to operate on all object versions that exist in the bucket.
|
||||
|
||||
|versions-2| requires that the specified |alias-2| be an S3-compatible service
|
||||
that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
:mc-cmd:`mc version` to enable or disable bucket versioning.
|
||||
|
||||
.. end-versions-desc-2
|
||||
|
||||
.. start-version-id-desc-2
|
||||
|
||||
Directs |command-2| to operate only on the specified object version.
|
||||
|
||||
|versionid-2| requires that the specified |alias-2| be an S3-compatible service
|
||||
that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
:mc-cmd:`mc version` to enable or disable bucket versioning.
|
||||
|
||||
.. end-version-id-desc-2
|
||||
|
||||
|
||||
|
||||
..
|
||||
|
||||
-------------- 3rd Subcommand --------------
|
||||
|
||||
.. start-rewind-desc-3
|
||||
|
||||
Directs |command-3| to operate only on the object version(s) that existed at
|
||||
specified point-in-time.
|
||||
|
||||
- To rewind to a specific date in the past, specify the date as an
|
||||
ISO8601-formatted timestamp. For example: ``--rewind "2020.03.24T10:00"``.
|
||||
|
||||
- To rewind a duration in time, specify the duration as a string in
|
||||
``#d#hh#mm#ss`` format. For example: ``--rewind "1d2hh3mm4ss"``.
|
||||
|
||||
|rewind-3| requires that the specified |alias-3| be an S3-compatible service
|
||||
that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
:mc-cmd:`mc version` to enable or disable bucket versioning.
|
||||
|
||||
.. end-rewind-desc-3
|
||||
|
||||
.. start-versions-desc-3
|
||||
|
||||
Directs |command-3| to operate on all object versions that exist in the bucket.
|
||||
|
||||
|versions-3| requires that the specified |alias-3| be an S3-compatible service
|
||||
that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
:mc-cmd:`mc version` to enable or disable bucket versioning.
|
||||
|
||||
.. end-versions-desc-3
|
||||
|
||||
.. start-version-id-desc-3
|
||||
|
||||
Directs |command-3| to operate only on the specified object version.
|
||||
|
||||
|versionid-3| requires that the specified |alias-3| be an S3-compatible service
|
||||
that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
:mc-cmd:`mc version` to enable or disable bucket versioning.
|
||||
|
||||
.. end-version-id-desc-3
|
||||
|
||||
.. start-versioning-admonition
|
||||
|
||||
.. admonition:: Requires Versioning
|
||||
|
@ -1,26 +1,5 @@
|
||||
.. tab-set::
|
||||
|
||||
.. tab-item:: Docker
|
||||
|
||||
**Stable**
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
docker pull minio/mc
|
||||
docker run minio/mc admin info play
|
||||
|
||||
**Edge**
|
||||
|
||||
*Do not use bleeding-edge deployments of MinIO in production environments*
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
docker pull minio/mc:edge
|
||||
docker run minio/mc:edge admin info server play
|
||||
|
||||
|
||||
.. tab-item:: Linux
|
||||
|
||||
The following commands add a *temporary* extension to your system
|
||||
|
Reference in New Issue
Block a user