mirror of
https://github.com/minio/docs.git
synced 2025-07-28 19:42:10 +03:00
GA Fixups
GA Preperations
This commit is contained in:
167
source/reference/minio-cli/minio-mc-admin.rst
Normal file
167
source/reference/minio-cli/minio-mc-admin.rst
Normal file
@ -0,0 +1,167 @@
|
||||
==========================
|
||||
MinIO Admin (``mc admin``)
|
||||
==========================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. mc:: mc admin
|
||||
|
||||
The MinIO Client :mc-cmd:`mc` command line tool provides the :mc-cmd:`mc admin`
|
||||
command for performing administrative tasks on your MinIO deployments.
|
||||
|
||||
While :mc-cmd:`mc` supports any S3-compatible service,
|
||||
:mc-cmd:`mc admin` *only* supports MinIO deployments.
|
||||
|
||||
:mc-cmd:`mc admin` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc admin [FLAGS] COMMAND [ARGUMENTS]
|
||||
|
||||
Command Quick reference
|
||||
-----------------------
|
||||
|
||||
The following table lists :mc-cmd:`mc admin` commands:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 40 60
|
||||
:width: 100%
|
||||
|
||||
* - Command
|
||||
- Description
|
||||
|
||||
* - :mc:`mc admin bucket remote`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-bucket-remote.rst
|
||||
:start-after: start-mc-admin-bucket-remote-desc
|
||||
:end-before: end-mc-admin-bucket-remote-desc
|
||||
|
||||
* - :mc:`mc admin bucket quota`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-bucket-quota.rst
|
||||
:start-after: start-mc-admin-bucket-quota-desc
|
||||
:end-before: end-mc-admin-bucket-quota-desc
|
||||
|
||||
* - :mc:`mc admin group`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-group.rst
|
||||
:start-after: start-mc-admin-group-desc
|
||||
:end-before: end-mc-admin-group-desc
|
||||
|
||||
* - :mc:`mc admin heal`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-heal.rst
|
||||
:start-after: start-mc-admin-heal-desc
|
||||
:end-before: end-mc-admin-heal-desc
|
||||
|
||||
* - :mc:`mc admin info`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-info.rst
|
||||
:start-after: start-mc-admin-info-desc
|
||||
:end-before: end-mc-admin-info-desc
|
||||
|
||||
* - :mc:`mc admin kms key`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-kms-key.rst
|
||||
:start-after: start-mc-admin-kms-key-desc
|
||||
:end-before: end-mc-admin-kms-key-desc
|
||||
|
||||
* - :mc:`mc admin obd`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-obd.rst
|
||||
:start-after: start-mc-admin-obd-desc
|
||||
:end-before: end-mc-admin-obd-desc
|
||||
|
||||
* - :mc:`mc admin policy`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-policy.rst
|
||||
:start-after: start-mc-admin-policy-desc
|
||||
:end-before: end-mc-admin-policy-desc
|
||||
|
||||
* - :mc:`mc admin profile`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-profile.rst
|
||||
:start-after: start-mc-admin-profile-desc
|
||||
:end-before: end-mc-admin-profile-desc
|
||||
|
||||
* - :mc:`mc admin prometheus`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-prometheus.rst
|
||||
:start-after: start-mc-admin-prometheus-desc
|
||||
:end-before: end-mc-admin-prometheus-desc
|
||||
|
||||
* - :mc:`mc admin service`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-service.rst
|
||||
:start-after: start-mc-admin-service-desc
|
||||
:end-before: end-mc-admin-service-desc
|
||||
|
||||
* - :mc:`mc admin top`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-top.rst
|
||||
:start-after: start-mc-admin-top-desc
|
||||
:end-before: end-mc-admin-top-desc
|
||||
|
||||
* - :mc:`mc admin trace`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-trace.rst
|
||||
:start-after: start-mc-admin-trace-desc
|
||||
:end-before: end-mc-admin-trace-desc
|
||||
|
||||
* - :mc:`mc admin update`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-update.rst
|
||||
:start-after: start-mc-admin-update-desc
|
||||
:end-before: end-mc-admin-update-desc
|
||||
|
||||
* - :mc:`mc admin user`
|
||||
- .. include:: /reference/minio-cli/minio-mc-admin/mc-admin-user.rst
|
||||
:start-after: start-mc-admin-user-desc
|
||||
:end-before: end-mc-admin-user-desc
|
||||
|
||||
.. _mc-admin-install:
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
.. include:: /includes/minio-mc-installation.rst
|
||||
|
||||
Quickstart
|
||||
----------
|
||||
|
||||
Ensure that the host machine has :mc:`mc`
|
||||
:ref:`installed <mc-admin-install>` 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-cmd:`mc alias set` command to add the
|
||||
deployment to the :program:`mc` configuration.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
bash +o history
|
||||
mc config host add <ALIAS> <ENDPOINT> ACCESS_KEY SECRET_KEY
|
||||
bash -o history
|
||||
|
||||
Replace each argument with the required values. Specifying only the
|
||||
``mc config host add`` command starts an input prompt for entering the
|
||||
required values.
|
||||
|
||||
Use the :mc-cmd:`mc admin info` command to test the connection to
|
||||
the newly added MinIO deployment:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin info <ALIAS>
|
||||
|
||||
Global Options
|
||||
--------------
|
||||
|
||||
:mc-cmd:`mc admin` supports the same global options as
|
||||
:mc-cmd:`mc`. See :ref:`minio-mc-global-options`.
|
||||
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
:hidden:
|
||||
:glob:
|
||||
|
||||
/reference/minio-cli/minio-mc-admin/*
|
@ -0,0 +1,207 @@
|
||||
=========================
|
||||
``mc admin bucket quota``
|
||||
=========================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin bucket quota
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-bucket-quota-desc
|
||||
|
||||
The :mc-cmd:`mc admin bucket quota` command manages per-bucket
|
||||
storage quotas.
|
||||
|
||||
.. end-mc-admin-bucket-quota-desc
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
.. _mc-admin-bucket-quota-units:
|
||||
|
||||
Units of Measurement
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The :mc-cmd-option:`mc admin bucket quota hard` and
|
||||
:mc-cmd-option:`mc admin bucket quota fifo` flags
|
||||
accept the following case-insensitive suffixes to represent the unit of the
|
||||
specified size value:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 20 80
|
||||
:width: 100%
|
||||
|
||||
* - 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:`mc admin bucket quota` with the
|
||||
:mc-cmd-option:`~mc admin bucket quota hard` flag to specify a hard quota
|
||||
on a bucket. Hard quotas prevent the bucket size from growing past the specified
|
||||
limit.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket quota TARGET/BUCKET --hard LIMIT
|
||||
|
||||
- Replace ``TARGET`` with the :mc-cmd:`alias <mc alias>` of a configured
|
||||
MinIO deployment. Replace ``BUCKET`` with the name of the bucket on which to
|
||||
set the hard quota.
|
||||
|
||||
- Replace ``LIMIT`` with the maximum size to which the bucket can grow.
|
||||
For example, to set a hard limit of 10 Terrabytes, specify ``10t``.
|
||||
See :ref:`mc-admin-bucket-quota-units` for supported units.
|
||||
|
||||
Configure a First-In First-Out (FIFO) Quota on a Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc admin bucket quota` with the
|
||||
:mc-cmd-option:`~mc admin bucket quota fifo` flag to specify a quota with
|
||||
First-In First-Out deletion of content. FIFO quotas prevent the bucket size
|
||||
from growing past the specified limit by deleting the oldest content on the
|
||||
bucket to make room for newer content.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket quota TARGET/BUCKET --fifo LIMIT
|
||||
|
||||
- Replace ``TARGET`` with the :mc-cmd:`alias <mc alias>` of a configured
|
||||
MinIO deployment. Replace ``BUCKET`` with the name of the bucket on which to
|
||||
set the quota.
|
||||
|
||||
- Replace ``LIMIT`` with the maximum size to which the bucket can grow.
|
||||
For example, to set a limit of 10 Terrabytes, specify ``10t``.
|
||||
See :ref:`mc-admin-bucket-quota-units` for supported units.
|
||||
|
||||
Retrieve Bucket Quota Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc admin bucket quota` to retrieve the current quota configuration
|
||||
for a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket quota TARGET/BUCKET
|
||||
|
||||
Replace ``TARGET`` with the :mc-cmd:`alias <mc alias>` of a configured
|
||||
MinIO deployment. Replace ``BUCKET`` with the name of the bucket on which to
|
||||
retreive the quota.
|
||||
|
||||
Clear Configured Bucket Quota
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc admin bucket quota` with the
|
||||
:mc-cmd-option:`~mc admin bucket quota clear` flag to clear all quotas from
|
||||
a bucket.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket quota TARGET/BUCKET --clear
|
||||
|
||||
- Replace ``TARGET`` with the :mc-cmd:`alias <mc alias>` of a configured
|
||||
MinIO deployment. Replace ``BUCKET`` with the name of the bucket on which to
|
||||
clear the quota.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc-cmd:`mc admin bucket quota` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket quota TARGET [ARGUMENTS]
|
||||
|
||||
:mc-cmd:`mc admin bucket quota` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the bucket for which the command creates the quota.
|
||||
Specify the :mc-cmd:`alias <mc alias>` of the MinIO deployment as a
|
||||
prefix to the path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket quota play/mybucket
|
||||
|
||||
Omit all other arguments to return the current quota settings for the
|
||||
specified bucket.
|
||||
|
||||
.. mc-cmd:: hard
|
||||
:option:
|
||||
|
||||
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 :ref:`mc-admin-bucket-quota-units` for supported unit sizes.
|
||||
|
||||
.. mc-cmd:: fifo
|
||||
:option:
|
||||
|
||||
Sets a maximum limit to the bucket storage size. The MinIO server removes
|
||||
the oldest objects in the bucket to make space for newer objects such that
|
||||
the bucket size remains below the specified limit.
|
||||
|
||||
For example, a ``fifo`` limit of ``10GB`` would result in removal of the
|
||||
oldest objects in the bucket once it reaches ``10GB`` in size.
|
||||
|
||||
See :ref:`mc-admin-bucket-quota-units` for supported unit sizes.
|
||||
|
||||
.. mc-cmd:: clear
|
||||
:option:
|
||||
|
||||
Clears all quotas configured for the bucket.
|
||||
|
||||
|
||||
|
@ -0,0 +1,241 @@
|
||||
==========================
|
||||
``mc admin bucket remote``
|
||||
==========================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin bucket remote
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-bucket-remote-desc
|
||||
|
||||
The :mc-cmd:`mc admin bucket remote` command manages the ``ARN`` resources
|
||||
for use with :mc-cmd:`bucket replication <mc replicate>`.
|
||||
|
||||
.. end-mc-admin-bucket-remote-desc
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Add a New Replication Target
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin bucket remote add` to create a new replication target
|
||||
ARN for use with :mc-cmd:`mc replicate`:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket remote add SOURCE/BUCKET SOURCE/BUCKET
|
||||
|
||||
- Replace :mc-cmd:`SOURCE <mc admin bucket remote add SOURCE>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the MinIO deployment to use as the replication
|
||||
target. Replace ``BUCKET`` with the full path of the bucket into which MinIO
|
||||
replicates objects from the ``DESTINATION``.
|
||||
|
||||
- Replace :mc-cmd:`DESTINATION <mc admin bucket remote add DESTINATION>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the MinIO deployment to use as the
|
||||
replication source. Replace ``BUCKET`` with the full path of the bucket from
|
||||
which MinIO replicates objects into the ``SOURCE``.
|
||||
|
||||
Remove an Existing Replication Target
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin bucket remote rm` to remove a replication target from a
|
||||
bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket remote rm SOURCE/BUCKET --arn ARN
|
||||
|
||||
- Replace :mc-cmd:`SOURCE <mc admin bucket remote rm SOURCE>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the MinIO deployment being used as the
|
||||
replication source. Replace ``BUCKET`` with the full path of the bucket from
|
||||
which MinIO replicates objects.
|
||||
|
||||
- Replace :mc-cmd:`ARN <mc admin bucket remote rm ARN>` with the
|
||||
ARN of the remote target.
|
||||
|
||||
Removing the target halts all in-progress
|
||||
:mc-cmd:`bucket replication <mc replicate>` to the target.
|
||||
|
||||
Retrieve Configured Replication Targets
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin bucket remote ls` to list a bucket's configured
|
||||
replication targets:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket remote ls SOURCE/BUCKET
|
||||
|
||||
- Replace :mc-cmd:`SOURCE <mc admin bucket remote ls SOURCE>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the MinIO deployment being used as the
|
||||
replication source. Replace ``BUCKET`` with the full path of the bucket from
|
||||
which MinIO replicates objects.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. mc-cmd:: add
|
||||
:fullpath:
|
||||
|
||||
Adds a remote target to a bucket on a MinIO deployment. The
|
||||
command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket add SOURCE DESTINATION --service "replication" [FLAGS]
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: SOURCE
|
||||
|
||||
*Required*
|
||||
|
||||
The full path to the bucket to which the command adds the remote target.
|
||||
Specify the :mc-cmd:`alias <mc alias>` of a configured MinIO deployment as
|
||||
the prefix to the bucket path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket add play/mybucket
|
||||
|
||||
.. mc-cmd:: DESTINATION
|
||||
|
||||
*Required*
|
||||
|
||||
The target MinIO deployment and bucket.
|
||||
|
||||
Specify the full URL to the destination MinIO deployment and bucket
|
||||
using the following format:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
http(s)://ACCESSKEY:SECRETKEY@DESTHOSTNAME/DESTBUCKET
|
||||
|
||||
- Replace ``ACCESSKEY`` with the access key for a user on the
|
||||
destination MinIO deployment.
|
||||
|
||||
- Replace ``SECRETKEY`` with the secret key for a user on the
|
||||
destination MinIO deployment.
|
||||
|
||||
- Replace ``DESTHOSTNAME`` with the hostname and port of the MinIO
|
||||
deployment (i.e. ``minio-server.example.net:9000``).
|
||||
|
||||
- Replace ``DESTBUCKET`` with the bucket on the
|
||||
destination.
|
||||
|
||||
.. mc-cmd:: service
|
||||
:option:
|
||||
|
||||
*Required*
|
||||
|
||||
Specify ``"replication"``.
|
||||
|
||||
.. mc-cmd:: region
|
||||
:option:
|
||||
|
||||
The region of the :mc-cmd:`~mc admin bucket remote add DESTINATION`.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`~mc admin bucket remote add path`
|
||||
|
||||
.. mc-cmd:: path
|
||||
:option:
|
||||
|
||||
The bucket path lookup supported by the destination server. Specify
|
||||
one of the following:
|
||||
|
||||
- ``on``
|
||||
- ``off``
|
||||
- ``auto`` (Default)
|
||||
|
||||
Mutually exclusive with
|
||||
:mc-cmd-option:`~mc admin bucket remote add region`
|
||||
|
||||
.. mc-cmd:: ls
|
||||
:fullpath:
|
||||
|
||||
Lists all remote targets associated to a bucket on the MinIO deployment. The
|
||||
command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket ls SOURCE --service "replication"
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: SOURCE
|
||||
|
||||
The full path to the bucket for which the command returns the configured
|
||||
remote targets. Specify the :mc-cmd:`alias <mc alias>` of a configured
|
||||
MinIO deployment as the prefix to the bucket path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket ls play/mybucket
|
||||
|
||||
.. mc-cmd:: service
|
||||
:option:
|
||||
|
||||
*Required*
|
||||
|
||||
Specify ``"replication"``.
|
||||
|
||||
|
||||
.. mc-cmd:: rm
|
||||
:fullpath:
|
||||
|
||||
Removes a remote target for a bucket on the MinIO deployment. The
|
||||
command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket rm SOURCE --arn ARN
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: SOURCE
|
||||
|
||||
*Required*
|
||||
|
||||
The full path to the bucket from which the command removes the
|
||||
remote target. Specify the
|
||||
:mc-cmd:`alias <mc alias>` of a configured MinIO deployment as the
|
||||
prefix to the bucket path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin bucket remove play/mybucket
|
||||
|
||||
.. mc-cmd:: ARN
|
||||
:option:
|
||||
|
||||
*Required*
|
||||
|
||||
The ``ARN`` of the remote target for which the command removes from the
|
||||
target bucket. Use :mc-cmd:`mc admin bucket remote ls` to list all remote
|
||||
targets and their associated ARNs for a specific bucket.
|
||||
|
@ -0,0 +1,66 @@
|
||||
====================
|
||||
``mc admin console``
|
||||
====================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin console
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-console-desc
|
||||
|
||||
The :mc-cmd:`mc admin console` command returns server log entries for each
|
||||
MinIO server in the deployment.
|
||||
|
||||
.. end-mc-admin-console-desc
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc-cmd:`mc admin console` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin console [FLAGS] TARGET NODENAME
|
||||
|
||||
:mc-cmd:`mc admin console` supports the following:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc:`alias <mc alias>` of a configured MinIO deployment from which
|
||||
the command retrieves server logs.
|
||||
|
||||
.. mc-cmd:: NODENAME
|
||||
|
||||
The specific MinIO server node from which the command retrieves server logs.
|
||||
|
||||
.. mc-cmd:: limit, l
|
||||
:option:
|
||||
|
||||
The number of most recent log entries to show. Defaults to ``10``.
|
||||
|
||||
.. mc-cmd:: type, t
|
||||
:option:
|
||||
|
||||
The type of errog logs to return. Specify one or more of the following
|
||||
options as a comma-seperated ``,`` list:
|
||||
|
||||
- ``minio``
|
||||
- ``application``
|
||||
- ``all`` (Default)
|
||||
|
348
source/reference/minio-cli/minio-mc-admin/mc-admin-group.rst
Normal file
348
source/reference/minio-cli/minio-mc-admin/mc-admin-group.rst
Normal file
@ -0,0 +1,348 @@
|
||||
===================
|
||||
``mc admin group``
|
||||
===================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin group
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-group-desc
|
||||
|
||||
The :mc-cmd:`mc admin group` command manages groups on a MinIO deployment.
|
||||
|
||||
.. end-mc-admin-group-desc
|
||||
|
||||
A :ref:`group <minio-groups>` is a collection of :ref:`users
|
||||
<minio-users>`. Each group can have one or more assigned
|
||||
:ref:`policies <minio-policy>` 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.
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
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 :ref:`policies
|
||||
<minio-policy>` 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-cmd:`mc admin policy set` command.
|
||||
|
||||
For more information on MinIO users and groups, see
|
||||
:ref:`minio-users` and :ref:`minio-groups`. For
|
||||
more information on MinIO policies, see :ref:`minio-policy`.
|
||||
|
||||
.. admonition:: ``Deny`` overrides ``Allow``
|
||||
:class: note
|
||||
|
||||
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
|
||||
:iam-docs:`Determining Whether a Request is Allowed or Denied Within an Account
|
||||
<reference_policies_evaluation-logic.html#policy-eval-denyallow>`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Create a New Group
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin group add` to create a new group to an S3-compatible host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group add ALIAS GROUPNAME MEMBER [MEMBER...]
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin group add TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`GROUPNAME <mc admin group add GROUPNAME>` with the name
|
||||
of the group to create.
|
||||
|
||||
- Replace :mc-cmd:`MEMBER <mc admin group add MEMBERS>` with *at least* one
|
||||
:mc-cmd:`user <mc admin user>` on the S3 host. Specify multiple members
|
||||
as a list: ``MEMBER1 MEMBER2 MEMBER3``
|
||||
|
||||
List Available Groups
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin group list` to list list all groups on an S3-compatible
|
||||
host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group list ALIAS
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin group list TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
|
||||
View Group Details
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin group info` to view detailed group information on an
|
||||
S3-compatible host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group info ALIAS GROUPNAME
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin group info TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`GROUPNAME <mc admin group info GROUPNAME>` with the name of
|
||||
the group.
|
||||
|
||||
Remove a Group
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin group remove` to remove a group from an S3-compatible
|
||||
host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group remove ALIAS GROUPNAME
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin group remove TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`GROUPNAME <mc admin group remove GROUPNAME>` with the
|
||||
name of the group.
|
||||
|
||||
Disable a Group
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin group disable` to disable a group on an S3-compatible
|
||||
host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group disable ALIAS GROUPNAME
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin group disable TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`GROUPNAME <mc admin group disable GROUPNAME>` with the name
|
||||
of the group.
|
||||
|
||||
Enable a Group
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin group enable` to enable a group on an S3-compatible
|
||||
host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group enable ALIAS GROUPNAME
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin group enable TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`GROUPNAME <mc admin group enable GROUPNAME>` with the name
|
||||
of the group.
|
||||
|
||||
|
||||
Quick Reference
|
||||
---------------
|
||||
|
||||
:mc-cmd:`mc admin group add TARGET GROUPNAME MEMBERS <mc admin group add>`
|
||||
Adds a user to a group on the MinIO deployment. Creates the group if it
|
||||
does not exist.
|
||||
|
||||
:mc-cmd:`mc admin group info TARGET GROUPNAME <mc admin group info>`
|
||||
Returns detailed information for a group on the MinIO deployment.
|
||||
|
||||
:mc-cmd:`mc admin group list TARGET <mc admin group list>`
|
||||
Returns a list of all groups on the MinIO deployment.
|
||||
|
||||
:mc-cmd:`mc admin group remove TARGET GROUPNAME <mc admin group remove>`
|
||||
Removes a group on the MinIO deployment.
|
||||
|
||||
:mc-cmd:`mc admin group enable TARGET GROUPNAME <mc admin group enable>`
|
||||
Enables a group on the MinIO deployment. Users can only inherit
|
||||
:ref:`policies <minio-policy>` assigned to an enabled group.
|
||||
|
||||
:mc-cmd:`mc admin group disable TARGET GROUPNAME <mc admin group disable>`
|
||||
Disables a group on the MinIO deployment. Users cannot inherit :ref:`policies
|
||||
<minio-policy>` assigned to a disabled group.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. mc-cmd:: add
|
||||
:fullpath:
|
||||
|
||||
Adds an existing user to the group. The command creates the group if it
|
||||
does not exist. The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group add TARGET GROUPNAME MEMBERS
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment on which
|
||||
the command adds users to the new or existing group
|
||||
|
||||
.. mc-cmd:: GROUPNAME
|
||||
|
||||
The name of the group. The command creates the group if it does not
|
||||
already exist. Use :mc-cmd:`mc admin group list` to review the existing
|
||||
groups on a deployment.
|
||||
|
||||
.. mc-cmd:: MEMBERS
|
||||
|
||||
The name of the user to add to the group.
|
||||
|
||||
The user *must* exist on the :mc-cmd:`~mc admin group add TARGET` MinIO
|
||||
deployment. Use :mc-cmd:`mc admin user list` to review the available
|
||||
users on the deployment.
|
||||
|
||||
.. mc-cmd:: info
|
||||
:fullpath:
|
||||
|
||||
Returns details for the group on the target deployment, such as all
|
||||
:ref:`users <minio-users>` with membership in the group and the
|
||||
assigned :ref:`policies <minio-policy>`. The command has
|
||||
the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group info TARGET GROUPNAME
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment from which
|
||||
to retrieve the group information.
|
||||
|
||||
.. mc-cmd:: GROUPNAME
|
||||
|
||||
The name of the group.
|
||||
|
||||
.. mc-cmd:: list
|
||||
:fullpath:
|
||||
|
||||
List all groups on the target MinIO deployment. The command has the
|
||||
following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group list TARGET
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment from
|
||||
which to retrieve groups.
|
||||
|
||||
.. mc-cmd:: remove
|
||||
:fullpath:
|
||||
|
||||
Removes a group on the target MinIO deployment. Removing a group does *not*
|
||||
remove any users with membership in the group. Use
|
||||
:mc-cmd:`mc admin user remove` to remove users from a group.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group remove TARGET GROUPNAME
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment on which
|
||||
to remove the group.
|
||||
|
||||
.. mc-cmd:: GROUPNAME
|
||||
|
||||
The name of the group to remove.
|
||||
|
||||
.. mc-cmd:: enable
|
||||
:fullpath:
|
||||
|
||||
Enables the group on the target MinIO deployment. Users can only inherit
|
||||
:ref:`policies <minio-policy>` from an enabled group.
|
||||
Groups are enabled on creation by default. The command has the following
|
||||
syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group enable TARGET GROUPNAME
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment on
|
||||
which to enable the group.
|
||||
|
||||
.. mc-cmd:: GROUPNAME
|
||||
|
||||
The name of the group to enable.
|
||||
|
||||
.. mc-cmd:: disable
|
||||
:fullpath:
|
||||
|
||||
Disables the group on the target MinIO deployment. Users cannot inherit
|
||||
:ref:`policies <minio-policy>` from a disabled group. The
|
||||
command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin group disable TARGET GROUPNAME
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment on which
|
||||
to disable the group.
|
||||
|
||||
.. mc-cmd:: GROUPNAME
|
||||
|
||||
The name of the group to disable.
|
||||
|
96
source/reference/minio-cli/minio-mc-admin/mc-admin-heal.rst
Normal file
96
source/reference/minio-cli/minio-mc-admin/mc-admin-heal.rst
Normal file
@ -0,0 +1,96 @@
|
||||
=================
|
||||
``mc admin heal``
|
||||
=================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin heal
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-heal-desc
|
||||
|
||||
The :mc:`mc admin heal` command scans for objects that are damaged or
|
||||
corrupted and heals those objects.
|
||||
|
||||
.. end-mc-admin-heal-desc
|
||||
|
||||
:mc:`mc admin heal` is resource intensive and typically not required even
|
||||
after disk failures or corruption events. Instead, MinIO automatically heals
|
||||
objects damaged by silent bitrot corruption, disk failure, or other issues on
|
||||
POST/GET. MinIO also performs periodic background object healing.
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`mc admin heal` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin heal [FLAGS] TARGET
|
||||
|
||||
:mc:`mc admin heal` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required*
|
||||
|
||||
The full path to the bucket or bucket prefix on which the command should
|
||||
perform object healing. Specify the :mc-cmd:`alias <mc alias>` of a
|
||||
configured MinIO deployment as the prefix for the path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin heal play/mybucket/myprefix
|
||||
|
||||
If the ``TARGET`` bucket or bucket prefix has an active healing scan,
|
||||
the command returns the status of that scan.
|
||||
|
||||
.. mc-cmd:: scan
|
||||
:option:
|
||||
|
||||
The type of scan to perform. Specify one of the following supported scan
|
||||
modes:
|
||||
|
||||
- ``normal`` (default)
|
||||
- ``deep``
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively scans for objects in the specified bucket or bucket prefix.
|
||||
|
||||
.. mc-cmd:: dry-run
|
||||
:option:
|
||||
|
||||
Inspects the :mc-cmd:`~mc admin heal TARGET` bucket or bucket prefix,
|
||||
but does *not* perform any object healing.
|
||||
|
||||
.. mc-cmd:: force-start, f
|
||||
:option:
|
||||
|
||||
Force starts the healing process.
|
||||
|
||||
.. mc-cmd:: force-stop, s
|
||||
:option:
|
||||
|
||||
Force stops the healing sequence.
|
||||
|
||||
.. mc-cmd:: remove
|
||||
:option:
|
||||
|
||||
Removes dangling objects in the healing process.
|
47
source/reference/minio-cli/minio-mc-admin/mc-admin-info.rst
Normal file
47
source/reference/minio-cli/minio-mc-admin/mc-admin-info.rst
Normal file
@ -0,0 +1,47 @@
|
||||
=================
|
||||
``mc admin info``
|
||||
=================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. mc:: mc admin info
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-info-desc
|
||||
|
||||
The :mc:`mc admin info` command displays information on a MinIO server.
|
||||
For distributed MinIO deployments, :mc:`mc admin info` displays information
|
||||
for each MinIO server in the deployment.
|
||||
|
||||
.. end-mc-admin-info-desc
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin info play
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc-cmd:`mc admin info` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin info TARGET
|
||||
|
||||
Specify the :mc-cmd:`alias <mc alias>` of a configured MinIO deployment as the
|
||||
``TARGET``.
|
@ -0,0 +1,90 @@
|
||||
====================
|
||||
``mc admin kms key``
|
||||
====================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin kms key
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-kms-key-desc
|
||||
|
||||
The :mc-cmd:`mc admin kms key` command performs cryptographic key management
|
||||
operations through the MinIO Key Encryption Service (KES).
|
||||
|
||||
.. end-mc-admin-kms-key-desc
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
.. TODO
|
||||
|
||||
Return to this section as part of the KES documentation. There's a lot here
|
||||
that only makes sense once we can link to KES overview + config.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. mc-cmd:: create
|
||||
:fullpath:
|
||||
|
||||
|
||||
Creates a new master key on a Key Management System (KMS).
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin kms key create TARGET [KEY_NAME]
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
Specify the :mc-cmd:`alias <mc alias>` of a configured MinIO deployment.
|
||||
|
||||
The ``TARGET`` deployment **must** include a configured
|
||||
MinIO Key Encryption Service (KES) server.
|
||||
|
||||
.. mc-cmd:: KEY_NAME
|
||||
|
||||
Specify the name of the new master key.
|
||||
|
||||
.. mc-cmd:: status
|
||||
:fullpath:
|
||||
|
||||
Requests information on a Key Management System (KMS) master key.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin kms key status TARGET [KEY_NAME]
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
Specify the :mc-cmd:`alias <mc alias>` of a configured MinIO deployment.
|
||||
|
||||
The ``TARGET`` deployment **must** include a configured MinIO Key
|
||||
Encryption Service (KES) server.
|
||||
|
||||
.. mc-cmd:: KEY_NAME
|
||||
|
||||
Specify the name of a master key on the KMS.
|
||||
|
||||
Omit this argument to return the default master key on the
|
||||
:mc-cmd:`~mc admin kms key status TARGET` deployment.
|
69
source/reference/minio-cli/minio-mc-admin/mc-admin-obd.rst
Normal file
69
source/reference/minio-cli/minio-mc-admin/mc-admin-obd.rst
Normal file
@ -0,0 +1,69 @@
|
||||
================
|
||||
``mc admin obd``
|
||||
================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin obd
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-obd-desc
|
||||
|
||||
The :mc:`mc admin obd` command generates detailed diagnostics for the
|
||||
target MinIO deployment as a ``GZIP`` compressed ``JSON`` file. MinIO Support
|
||||
may request the output of :mc:`mc admin obd` as part of troubleshooting
|
||||
and diagnostics.
|
||||
|
||||
.. end-mc-admin-obd-desc
|
||||
|
||||
:mc:`mc admin obd` names the file using the following pattern:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
alias-health_YYYYMMDDHHMMSS.json.gzip
|
||||
|
||||
The ``alias`` is the :mc-cmd:`~mc admin obd TARGET` MinIO deployment from which
|
||||
:mc:`mc admin obd` returned the diagnostics.
|
||||
|
||||
The :mc:`mc admin obd` output may contain sensitive information about your
|
||||
environment. Exercise all possible precautions, such as redacting sensitive
|
||||
fields, prior to sharing the data on any public forum.
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc-cmd:`mc admin obd` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin obd [FLAGS] TARGET
|
||||
|
||||
:mc-cmd:`mc admin obd` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required*
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment from which
|
||||
the command retrieves the diagnostic data.
|
||||
|
||||
.. mc-cmd:: deadline
|
||||
:option:
|
||||
|
||||
The maximum duration the command can run. Specify a string as
|
||||
``##h##m##s``. Defaults to ``1h0m0s``.
|
||||
|
321
source/reference/minio-cli/minio-mc-admin/mc-admin-policy.rst
Normal file
321
source/reference/minio-cli/minio-mc-admin/mc-admin-policy.rst
Normal file
@ -0,0 +1,321 @@
|
||||
===================
|
||||
``mc admin policy``
|
||||
===================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin policy
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-policy-desc
|
||||
|
||||
The :mc-cmd:`mc admin policy` command manages 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.
|
||||
|
||||
.. end-mc-admin-policy-desc
|
||||
|
||||
For complete documentation on MinIO PBAC, including policy document JSON
|
||||
structure and syntax, see
|
||||
:ref:`minio-auth-authz-overview`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Create a Policy
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: myminio-alias
|
||||
:end-before: end-myminio-alias
|
||||
|
||||
Consider the following JSON policy document:
|
||||
|
||||
.. code-block:: javascript
|
||||
:class: copyable
|
||||
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:ListAllMyBuckets"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:minio:s3:::*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
The following :mc-cmd:`mc admin policy add` command creates a new policy
|
||||
``listbucketsonly`` on the ``myminio`` MinIO deployment using the
|
||||
example JSON policy document:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy add myminio listbucketsonly /path/to/listbucketsonly.json
|
||||
|
||||
You can associate the new ``listbucketsonly`` policy to users or groups on the
|
||||
``myminio`` deployment using the :mc-cmd:`mc admin policy set` command.
|
||||
|
||||
List Available Policies
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: myminio-alias
|
||||
:end-before: end-myminio-alias
|
||||
|
||||
The following :mc-cmd:`mc admin policy list` command lists the available
|
||||
policies on the ``myminio`` MinIO deployment:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy list myminio
|
||||
|
||||
The command returns output that resembles the following:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
readwrite
|
||||
writeonly
|
||||
|
||||
To retrieve information on a specific policy, use the
|
||||
:mc-cmd:`mc admin policy info` command:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy info myminio writeonly
|
||||
|
||||
The command returns output that resembles the following:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
"Statement": [
|
||||
{
|
||||
"Effect": "Allow",
|
||||
"Action": [
|
||||
"s3:PutObject"
|
||||
],
|
||||
"Resource": [
|
||||
"arn:aws:s3:::*"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Remove a Policy
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: myminio-alias
|
||||
:end-before: end-myminio-alias
|
||||
|
||||
The following :mc-cmd:`mc admin policy remove` command removes a policy
|
||||
on the ``myminio`` MinIO deployment:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy remove myminio listbucketsonly
|
||||
|
||||
|
||||
Apply a Policy to a User or Group
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: myminio-alias
|
||||
:end-before: end-myminio-alias
|
||||
|
||||
- Use the :mc-cmd:`mc admin user list` command to return a list of
|
||||
users on the target MinIO deployment.
|
||||
|
||||
- Use the :mc-cmd:`mc admin group list` command to return a list of
|
||||
users on the target MinIO deployment.
|
||||
|
||||
The following :mc-cmd:`mc admin policy set` command associates the
|
||||
``listbucketsonly`` policy to a user on the ``myminio`` MinIO deployment.
|
||||
Replace the ``<USER>`` with the name of a user that exists on the deployment.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy set myminio listbucketsonly user=<USER>
|
||||
|
||||
The following :mc-cmd:`mc admin policy set` command associates the
|
||||
``listbucketsonly`` policy to a group on the ``myminio`` MinIO deployment.
|
||||
Replace the ``<GROUP>`` with the name of a user that exists on the deployment.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy set myminio listbucketsonly group=<GROUP>
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. mc-cmd:: add
|
||||
:fullpath:
|
||||
|
||||
Creates a new policy on the target MinIO
|
||||
deployment. The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy add TARGET POLICYNAME POLICYPATH
|
||||
|
||||
The :mc-cmd:`mc admin policy add` command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment on which
|
||||
to add the new policy.
|
||||
|
||||
.. mc-cmd:: POLICYNAME
|
||||
|
||||
The name of the policy to add.
|
||||
|
||||
Specifying the name of an existing policy overwrites that policy on the
|
||||
:mc-cmd:`~mc admin policy add TARGET` MinIO deployment.
|
||||
|
||||
.. mc-cmd:: POLICYPATH
|
||||
|
||||
The file path to the policy to add. The file *must* be a JSON-formatted
|
||||
file with :iam-docs:`IAM-compatible syntax <reference_policies.html>`.
|
||||
|
||||
.. mc-cmd:: list
|
||||
:fullpath:
|
||||
|
||||
Lists all policies on the target MinIO deployment. The command
|
||||
has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy list TARGET
|
||||
|
||||
For example, the following command lists all policies on the
|
||||
``myminio`` MinIO deployment:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy list play
|
||||
|
||||
The :mc-cmd:`mc admin policy list` command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment from which
|
||||
the command lists the available policies.
|
||||
|
||||
.. mc-cmd:: info
|
||||
:fullpath:
|
||||
|
||||
Returns the specified policy in JSON format if it exists
|
||||
on the target MinIO deployment. The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy info TARGET POLICYNAME
|
||||
|
||||
:mc-cmd:`mc admin policy info` accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment from
|
||||
which the command returns information on the specified policy.
|
||||
|
||||
.. mc-cmd:: POLICYNAME
|
||||
|
||||
The name of the policy whose details the command returns.
|
||||
|
||||
.. mc-cmd:: set
|
||||
:fullpath:
|
||||
|
||||
Applies an existing policy to a user or group on the
|
||||
target MinIO deployment. :mc-cmd:`mc admin policy set` overwrites the
|
||||
existing policy associated to the user or group.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy set TARGET POLICYNAME[,POLICYNAME,...] [ user=USERNAME | group=GROUPNAME ]
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc:`alias <mc alias>` of a configured MinIO deployment on which
|
||||
the command associates the :mc-cmd:`~mc admin policy set POLICYNAME`
|
||||
to the :mc-cmd:`~mc admin policy set user` or
|
||||
:mc-cmd:`~mc admin policy set group`.
|
||||
|
||||
.. mc-cmd:: POLICYNAME
|
||||
|
||||
The name of the policy which the command associates to the specified
|
||||
:mc-cmd:`~mc admin policy set user` or
|
||||
:mc-cmd:`~mc admin policy set group`. Specify multiple policies
|
||||
as a comma-separated list.
|
||||
|
||||
MinIO deployments include the following :ref:`built-in policies
|
||||
<minio-policy-built-in>` policies by default:
|
||||
|
||||
- :userpolicy:`readonly`
|
||||
- :userpolicy:`readwrite`
|
||||
- :userpolicy:`diagnostics`
|
||||
- :userpolicy:`writeonly`
|
||||
|
||||
.. mc-cmd:: user
|
||||
|
||||
The name of the user to which the command associates the
|
||||
:mc-cmd:`~mc admin policy set POLICYNAME`.
|
||||
|
||||
Mutually exclusive with :mc-cmd:`~mc admin policy set group`
|
||||
|
||||
.. mc-cmd:: group
|
||||
|
||||
The name of the group to which the command associates the
|
||||
:mc-cmd:`~mc admin policy set POLICYNAME`. All users with membership in
|
||||
the group inherit the policies associated to the group.
|
||||
|
||||
Mutually exclusive with :mc-cmd:`~mc admin policy set user`
|
||||
|
||||
.. mc-cmd:: remove
|
||||
:fullpath:
|
||||
|
||||
This command removes an existing policy from the target MinIO deployment. The
|
||||
command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin policy remove TARGET POLICYNAME
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc:`alias <mc alias>` of a configured MinIO deployment on which
|
||||
the command removes the :mc-cmd:`~mc admin policy remove POLICYNAME`.
|
||||
|
||||
.. mc-cmd:: POLICYNAME
|
||||
|
||||
The name of the policy which the command removes from the
|
||||
:mc-cmd:`~mc admin policy remove TARGET` deployment.
|
169
source/reference/minio-cli/minio-mc-admin/mc-admin-profile.rst
Normal file
169
source/reference/minio-cli/minio-mc-admin/mc-admin-profile.rst
Normal file
@ -0,0 +1,169 @@
|
||||
====================
|
||||
``mc admin profile``
|
||||
====================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin profile
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-profile-desc
|
||||
|
||||
The :mc-cmd:`mc admin profile` command generates profiling data for debugging
|
||||
purposes.
|
||||
|
||||
.. end-mc-admin-profile-desc
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
Profile Data Format
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc-cmd:`mc admin profile` produces a ``ZIP`` archive ``profile.zip`` that
|
||||
contains one or more ``.pprof`` files. Use the
|
||||
`pprof <https://github.com/google/pprof>`__ ``go`` utility to read the
|
||||
profile data.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Profile Data for Single Resource
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin profile start` with the
|
||||
:mc-cmd-option:`~mc admin profile start type` flag to start profiling the
|
||||
resource:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin profile start --type "TYPE" ALIAS
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin profile start TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the MinIO host.
|
||||
|
||||
- Replace :mc-cmd:`TYPE <mc admin profile start type>` with the resource to
|
||||
profile.
|
||||
|
||||
Use :mc-cmd:`mc admin profile stop` to stop profiling data from the specified
|
||||
resource and output the results:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin profile stop
|
||||
|
||||
The command outputs the profiled data as ``profile.zip``.
|
||||
|
||||
Profile Data for Multiple Resources
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin profile start` with the
|
||||
:mc-cmd-option:`~mc admin profile start type` flag to start profiling the
|
||||
resources:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin profile start --type "TYPE,[TYPE...]" ALIAS
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin profile start TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the MinIO host.
|
||||
|
||||
- Replace :mc-cmd:`TYPE <mc admin profile start type>` with the resources to
|
||||
profile. Specify multiple resources as a comma-separated list.
|
||||
|
||||
Use :mc-cmd:`mc admin profile stop` to stop profiling data from the specified
|
||||
resources and output the results:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin profile stop
|
||||
|
||||
The command outputs the profiled data as ``profile.zip``.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc-cmd:`mc admin profile` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin profile SUBCOMMAND
|
||||
|
||||
:mc-cmd:`mc admin profile` supports the following subcommands:
|
||||
|
||||
.. mc-cmd:: start
|
||||
:fullpath:
|
||||
|
||||
Starts collecting profiling data on the target MinIO deployment. The
|
||||
command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin profile start [FLAGS] TARGET
|
||||
|
||||
:mc-cmd:`mc admin profile start` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment from
|
||||
which the command collects profiling data.
|
||||
|
||||
.. mc-cmd:: type
|
||||
:option:
|
||||
|
||||
The type(s) of profiling data to collect from the
|
||||
:mc-cmd:`~mc admin profile start TARGET` MinIO deployment.
|
||||
|
||||
Specify one or more of the following supported types as a comma-separated
|
||||
list:
|
||||
|
||||
- ``cpu``
|
||||
- ``mem``
|
||||
- ``block``
|
||||
- ``mutex``
|
||||
- ``trace``
|
||||
- ``threads``
|
||||
- ``goroutines``
|
||||
|
||||
Defaults to ``cpu,mem,block`` if omitted.
|
||||
|
||||
.. mc-cmd:: stop
|
||||
:fullpath:
|
||||
|
||||
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 <https://github.com/google/pprof>`__ utility.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin profile stop TARGET
|
||||
|
||||
The command supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment from
|
||||
which the command returns available profiling data.
|
||||
|
||||
|
||||
|
@ -0,0 +1,51 @@
|
||||
=======================
|
||||
``mc admin prometheus``
|
||||
=======================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin prometheus
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-prometheus-desc
|
||||
|
||||
The :mc-cmd:`mc admin prometheus` command generates a configuration file for
|
||||
use with `Prometheus <https://prometheus.io/>`__.
|
||||
|
||||
.. end-mc-admin-prometheus-desc
|
||||
|
||||
For more complete documentation on using MinIO with Prometheus, see our
|
||||
legacy documentation site
|
||||
:legacy:`How to monitor MinIO server with Prometheus
|
||||
<how-to-monitor-minio-using-prometheus.html>`
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc-cmd:`mc admin prometheus` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin prometheus generate TARGET
|
||||
|
||||
:mc-cmd:`mc admin prometheus` supports the following:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc:`alias <mc alias>` of a configured MinIO deployment for which
|
||||
the command generates a Prometheus-compatible configuration file.
|
||||
|
103
source/reference/minio-cli/minio-mc-admin/mc-admin-service.rst
Normal file
103
source/reference/minio-cli/minio-mc-admin/mc-admin-service.rst
Normal file
@ -0,0 +1,103 @@
|
||||
====================
|
||||
``mc admin service``
|
||||
====================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin service
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-service-desc
|
||||
|
||||
The :mc-cmd:`mc admin service` command can restart or stop MinIO servers.
|
||||
|
||||
.. end-mc-admin-service-desc
|
||||
|
||||
:mc-cmd:`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. Exercise caution before issuing an update command on
|
||||
production environments.
|
||||
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Restart MinIO Servers in Target Deployment
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: myminio-alias
|
||||
:end-before: end-myminio-alias
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin service restart myminio
|
||||
|
||||
Stop MinIO Servers in Target Deployment
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: myminio-alias
|
||||
:end-before: end-myminio-alias
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin service stop myminio
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc-cmd:`mc admin service` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin service COMMAND [ARGUMENTS]
|
||||
|
||||
:mc-cmd:`mc admin service` supports the following commands:
|
||||
|
||||
.. mc-cmd:: restart
|
||||
|
||||
Restarts MinIO servers.
|
||||
|
||||
:mc-cmd:`mc admin service restart` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin service restart TARGET
|
||||
|
||||
Specify the :mc-cmd:`alias <mc alias>` of a configured MinIO deployment.
|
||||
:mc-cmd:`~mc admin service restart` restarts *all* MinIO servers in the
|
||||
deployment.
|
||||
|
||||
.. mc-cmd:: stop
|
||||
|
||||
Stops MinIO servers.
|
||||
|
||||
:mc-cmd:`mc admin service stop` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin service stop TARGET
|
||||
|
||||
Specify the :mc-cmd:`alias <mc alias>` of a configured MinIO deployment.
|
||||
:mc-cmd:`~mc admin service stop` stops *all* MinIO servers in the
|
||||
deployment.
|
||||
|
59
source/reference/minio-cli/minio-mc-admin/mc-admin-top.rst
Normal file
59
source/reference/minio-cli/minio-mc-admin/mc-admin-top.rst
Normal file
@ -0,0 +1,59 @@
|
||||
================
|
||||
``mc admin top``
|
||||
================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin top
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-top-desc
|
||||
|
||||
The :mc-cmd:`mc admin top` command returns statistics for distributed
|
||||
MinIO deployments, similar to the output of the ``top`` command.
|
||||
|
||||
:mc-cmd:`mc admin top` is not supported on standalone MinIO deployments
|
||||
or MinIO Gateway deployments.
|
||||
|
||||
.. end-mc-admin-top-desc
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. mc-cmd:: locks
|
||||
:fullpath:
|
||||
|
||||
Returns the 10 oldest locks on the MinIO deployment.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin top locks TARGET
|
||||
|
||||
The command supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc 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 standalone MinIO deployments or MinIO
|
||||
Gateway deployments.
|
||||
|
||||
|
76
source/reference/minio-cli/minio-mc-admin/mc-admin-trace.rst
Normal file
76
source/reference/minio-cli/minio-mc-admin/mc-admin-trace.rst
Normal file
@ -0,0 +1,76 @@
|
||||
==================
|
||||
``mc admin trace``
|
||||
==================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin trace
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-trace-desc
|
||||
|
||||
The :mc-cmd:`mc admin trace` command displays the results of an
|
||||
`HTTP TRACE <https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/TRACE>`__
|
||||
request against each MinIO server in a deployment.
|
||||
|
||||
.. end-mc-admin-trace-desc
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
Use :mc:`mc admin trace` to perform an HTTP trace of each MinIO server in
|
||||
the deployment:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin trace ALIAS
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin trace TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the MinIO deployment.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc-cmd:`mc admin trace` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin trace [FLAGS] TARGET
|
||||
|
||||
:mc-cmd:`mc admin trace` supports the following argument:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
Specify the :mc:`alias <mc alias>` of a configured MinIO deployment
|
||||
against which the command issues ``HTTP TRACE`` requests.
|
||||
|
||||
.. mc-cmd:: all, a
|
||||
:option:
|
||||
|
||||
Returns all traffic on the MinIO deployment, including internode traffic
|
||||
between MinIO servers.
|
||||
|
||||
.. mc-cmd:: verbose
|
||||
:option:
|
||||
|
||||
Returns verbose ``HTTP TRACE`` output.
|
||||
|
||||
.. mc-cmd:: errors, e
|
||||
:option:
|
||||
|
||||
Returns failed ``HTTP TRACE`` requests only.
|
@ -0,0 +1,78 @@
|
||||
===================
|
||||
``mc admin update``
|
||||
===================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. mc:: mc admin update
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-update-desc
|
||||
|
||||
The :mc-cmd:`mc admin update` command updates all MinIO servers in the
|
||||
deployment. The command also supports using a private mirror server for
|
||||
environments where the deployment does not have public internet access.
|
||||
|
||||
.. end-mc-admin-update-desc
|
||||
|
||||
:mc-cmd:`mc admin update` affects *all* MinIO servers in the target deployment
|
||||
at the same time. The update procedure interrupts in-progress API operations on
|
||||
the MinIO deployment. Exercise caution before issuing an update command on
|
||||
production environments.
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Use :mc:`mc admin update` to update each :mc:`minio` server process in the
|
||||
MinIO deployment:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin update ALIAS
|
||||
|
||||
Replace :mc-cmd:`ALIAS <mc admin update ALIAS>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the MinIO deployment.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc-cmd:`mc admin update` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin update ALIAS [MIRROR_URL]
|
||||
|
||||
:mc-cmd:`mc admin update` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: ALIAS
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of the MinIO deployment to update.
|
||||
|
||||
If the specified ``ALIAS`` corresponds to a distributed MinIO
|
||||
deployment, :mc-cmd:`mc admin update` updates *all* MinIO servers
|
||||
in the deployment at the same time. The command does not perform a
|
||||
rolling upgrade or similar zero or near-zero downtime upgrade procedure.
|
||||
|
||||
Use :mc-cmd:`mc alias list` to review the configured aliases and their
|
||||
corresponding MinIO deployment endpoints.
|
||||
|
||||
.. mc-cmd:: MIRROR_URL
|
||||
|
||||
The mirror URL of the ``minio`` server binary to use for updating MinIO
|
||||
servers in the :mc-cmd:`~mc admin update ALIAS` deployment.
|
||||
|
336
source/reference/minio-cli/minio-mc-admin/mc-admin-user.rst
Normal file
336
source/reference/minio-cli/minio-mc-admin/mc-admin-user.rst
Normal file
@ -0,0 +1,336 @@
|
||||
=================
|
||||
``mc admin user``
|
||||
=================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin user
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-user-desc
|
||||
|
||||
The :mc-cmd:`mc admin user` command manages users on a MinIO deployment. Clients
|
||||
*must* authenticate to the MinIO deployment with the access key and secret key
|
||||
associated to a user on the deployment. MinIO users constitue a key component in
|
||||
MinIO Identity and Access Management.
|
||||
|
||||
.. end-mc-admin-user-desc
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
Users 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 :ref:`policies
|
||||
<minio-policy>` to a User. Users *also* inherit the policies
|
||||
of any groups of which they are members. A user's total set of permissions
|
||||
includes their explicitly assigned policies *and* any policies inherited via
|
||||
group membership.
|
||||
|
||||
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-cmd:`mc admin policy set` to associate one or more policies to
|
||||
the user.
|
||||
|
||||
- Use :mc-cmd:`mc admin group add` to associate the user to the group. Users
|
||||
inherit any policies assigned to the group.
|
||||
|
||||
Each user's total set of permissions consists of their explicitly assigned
|
||||
permission *and* the inherited permissions from each of their assigned groups.
|
||||
|
||||
For more information on MinIO users and groups, see
|
||||
:ref:`minio-users` and :ref:`minio-groups`. For
|
||||
more information on MinIO policies, see :ref:`minio-policy`.
|
||||
|
||||
.. admonition:: ``Deny`` overrides ``Allow``
|
||||
:class: note
|
||||
|
||||
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
|
||||
:iam-docs:`Determining Whether a Request is Allowed or Denied Within an Account
|
||||
<reference_policies_evaluation-logic.html#policy-eval-denyallow>`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Create a New User
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin user add` to create a user on an S3-compatible host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user add ALIAS ACCESSKEY SECRETKEY
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin user add TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`ACCESSKEY <mc admin user add ACCESSKEY>` with the
|
||||
access key for the user. MinIO allows retrieving the access key after
|
||||
user creation through the :mc-cmd:`mc admin user info` command.
|
||||
|
||||
- Replace :mc-cmd:`SECRETKEY <mc admin user add SECRETKEY>` with the
|
||||
secret key for the user. MinIO *does not* provide any method for retrieving
|
||||
the secret key once set.
|
||||
|
||||
Specify a unique, random, and long string for both the ``ACCESSKEY`` and
|
||||
``SECRETKEY``. Your organization may have specific internal or regulatory
|
||||
requirements around generating values for use with access or secret keys.
|
||||
|
||||
List Available Users
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin user list` to list all users on an S3-compatible host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user list ALIAS
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin user list TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
:mc-cmd:`mc admin user list` does *not* return the access key or secret key
|
||||
associated to a user. Use :mc-cmd:`mc admin user info` to retrieve detailed
|
||||
user information, including the user access key.
|
||||
|
||||
View User Details
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin user info` to view detailed user information on an
|
||||
S3-compatible host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user info ALIAS USERNAME
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin user info TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`USERNAME <mc admin user info USERNAME>` with the name of
|
||||
the user.
|
||||
|
||||
Remove a User
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin user remove` to remove a user from an S3-compatible host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user remove ALIAS USERNAME
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin user remove TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`USERNAME <mc admin user remove USERNAME>` with the name of
|
||||
the user to remove.
|
||||
|
||||
Disable a User
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin user disable` to disable a user on an S3-compatible host.
|
||||
Disabling a user prevents clients from authenticating to the S3 host with that
|
||||
user's credentials, but does *not* remove that user from the S3 host.
|
||||
|
||||
Use :mc-cmd:`mc admin user enable` to enable a disabled user on an S3-compatible
|
||||
host.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user disable ALIAS USERNAME
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin user disable TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`USERNAME <mc admin user disable USERNAME>` with the name of
|
||||
the user to disable.
|
||||
|
||||
Enable a User
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc admin user enable` to enable a user on an S3-compatible
|
||||
host.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user enable ALIAS USERNAME
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc admin user enable TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`USERNAME <mc admin user enable USERNAME>` with the name of
|
||||
the user to enable.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. mc-cmd:: add
|
||||
:fullpath:
|
||||
|
||||
Adds new user to the target MinIO deployment. The command has the following
|
||||
syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user add TARGET ACCESSKEY SECRETKEY
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment on which
|
||||
the command creates the new user.
|
||||
|
||||
.. mc-cmd:: ACCESSKEY
|
||||
|
||||
The access key that uniquely identifies the new user, similar to a
|
||||
username.
|
||||
|
||||
.. mc-cmd:: SECRETKEY
|
||||
|
||||
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)
|
||||
|
||||
|
||||
.. mc-cmd:: list
|
||||
:fullpath:
|
||||
|
||||
Lists all users on the target MinIO deployment. The command has the
|
||||
following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user list TARGET
|
||||
|
||||
The command accepts the following argument:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment from which
|
||||
the command lists users.
|
||||
|
||||
.. mc-cmd:: info
|
||||
:fullpath:
|
||||
|
||||
Returns detailed information of a user on the target MinIO deployment. The
|
||||
command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user info TARGET USERNAME
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc-cmd:`alias <mc alias>` of a configured MinIO deployment from
|
||||
which the command retrieves the specified user information.
|
||||
|
||||
.. mc-cmd:: USERNAME
|
||||
|
||||
The name of the user whose information the command retrieves.
|
||||
|
||||
.. mc-cmd:: remove
|
||||
|
||||
Removes a user from the target MinIO deployment. The command has the
|
||||
following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user remove TARGET USERNAME
|
||||
|
||||
The command supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc:`alias <mc alias>` of a configured MinIO deployment on which
|
||||
the command removes the specified user.
|
||||
|
||||
.. mc-cmd:: USERNAME
|
||||
|
||||
The name of the user which the command removes.
|
||||
|
||||
.. mc-cmd:: disable
|
||||
:fullpath:
|
||||
|
||||
Disables a 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.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user disable TARGET USERNAME
|
||||
|
||||
The command supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc:`alias <mc alias>` of a configured MinIO deployment on which
|
||||
the command disables the specified user.
|
||||
|
||||
.. mc-cmd:: USERNAME
|
||||
|
||||
The name of the user to disable.
|
||||
|
||||
.. mc-cmd:: enable
|
||||
:fullpath:
|
||||
|
||||
Enables a user on the target deployment. Clients can only use enabled
|
||||
users to authenticate to the MinIO deployment. Users created using
|
||||
:mc-cmd:`mc admin user add` are enabled by default.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin user enable TARGET USERNAME
|
||||
|
||||
The command supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The :mc:`alias <mc alias>` of a configured MinIO deployment on which
|
||||
the command enables the specified user.
|
||||
|
||||
.. mc-cmd:: USERNAME
|
||||
|
||||
The name of the user to enable.
|
@ -0,0 +1,34 @@
|
||||
===================
|
||||
``mc admin config``
|
||||
===================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc admin config
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-admin-config-desc
|
||||
|
||||
The :mc-cmd:`mc admin config` command manages configuration settings for the
|
||||
:mc:`minio` server.
|
||||
|
||||
.. end-mc-admin-bucket-remote-desc
|
||||
|
||||
.. admonition:: Use ``mc admin`` on MinIO Deployments Only
|
||||
:class: note
|
||||
|
||||
.. include:: /includes/facts-mc-admin.rst
|
||||
:start-after: start-minio-only
|
||||
:end-before: end-minio-only
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Syntax
|
||||
------
|
366
source/reference/minio-cli/minio-mc.rst
Normal file
366
source/reference/minio-cli/minio-mc.rst
Normal file
@ -0,0 +1,366 @@
|
||||
=====================
|
||||
MinIO Client (``mc``)
|
||||
=====================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. mc:: mc
|
||||
|
||||
The MinIO Client :mc-cmd:`mc` command line tool provides a modern alternative
|
||||
to UNIX commands like ``ls``, ``cat``, ``cp``, ``mirror``, and ``diff`` with
|
||||
support for both filesystems and Amazon S3-compatible cloud storage services
|
||||
(AWS Signature v2 and v4).
|
||||
|
||||
:mc-cmd:`mc` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc [FLAGS] COMMAND [COMMAND FLAGS | -h] [ARGUMENTS...] ALIAS
|
||||
|
||||
.. _mc-install:
|
||||
|
||||
Quickstart
|
||||
----------
|
||||
|
||||
1) Install ``mc``
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Install the :program:`mc` command line tool onto the host machine. Click
|
||||
the tab that corresponds to the host machine operating system or environment:
|
||||
|
||||
.. include:: /includes/minio-mc-installation.rst
|
||||
|
||||
2) Add an 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-cmd:`mc alias set` command to add an Amazon S3-compatible service
|
||||
to the :mc-cmd:`mc` :ref:`configuration <mc-configuration>`.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
bash +o history
|
||||
mc alias set ALIAS HOSTNAME ACCESS_KEY SECRET_KEY
|
||||
bash -o history
|
||||
|
||||
- Replace ``ALIAS`` with a name to associate to the S3 service.
|
||||
:mc-cmd:`mc` commands typically require ``ALIAS`` as an argument for
|
||||
identifying which S3 service to execute against.
|
||||
|
||||
- Replace ``HOSTNAME`` with the URL endpoint or IP address of the S3 service.
|
||||
|
||||
- Replace ``ACCESS_KEY`` and ``SECRET_KEY`` with the access and secret
|
||||
keys for a user on the S3 service.
|
||||
|
||||
Replace each argument with the required values. Specifying only the
|
||||
``mc config host add`` command starts an input prompt for entering the
|
||||
required values.
|
||||
|
||||
Each of the following tabs contains a provider-specific example:
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: MinIO Server
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc alias set myminio https://minioserver.example.net ACCESS_KEY SECRET KEY
|
||||
|
||||
.. tab:: AWS S3 Storage
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc alias set myS3 https://s3.amazon.com/endpoint ACCESS_KEY SECRET KEY
|
||||
|
||||
.. tab:: Google Cloud Storage
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc alias set myGCS https://storage.googleapis.com/endpoint ACCESS_KEY SECRET KEY
|
||||
|
||||
3) Test the Connection
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use the :mc-cmd:`mc admin info` command to test the connection to
|
||||
the newly added MinIO deployment:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc admin info myminio
|
||||
|
||||
The command returns information on the S3 service if successful. If
|
||||
unsuccessful, check each of the following:
|
||||
|
||||
- The host machine has connectivity to the S3 service URL (i.e. using ``ping``
|
||||
or ``traceroute``).
|
||||
|
||||
- The specified ``ACCESSKEY`` and ``SECRETKEY`` correspond to a user on the
|
||||
S3 service. The user must have permission to perform actions on the
|
||||
service.
|
||||
|
||||
For MinIO deployments, see :ref:`minio-auth-authz-overview`
|
||||
for more information on user access permissions. For other S3-compatible
|
||||
services, defer to the documentation for that service.
|
||||
|
||||
.. _minio-mc-commands:
|
||||
|
||||
Command Quick Reference
|
||||
-----------------------
|
||||
|
||||
The following table lists :mc-cmd:`mc` commands:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 25 75
|
||||
:width: 100%
|
||||
|
||||
* - Command
|
||||
- Description
|
||||
|
||||
* - :mc:`mc alias`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-alias.rst
|
||||
:start-after: start-mc-alias-desc
|
||||
:end-before: end-mc-alias-desc
|
||||
|
||||
* - :mc:`mc cat`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-cat.rst
|
||||
:start-after: start-mc-cat-desc
|
||||
:end-before: end-mc-cat-desc
|
||||
|
||||
* - :mc:`mc cp`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-cp.rst
|
||||
:start-after: start-mc-cp-desc
|
||||
:end-before: end-mc-cp-desc
|
||||
|
||||
* - :mc:`mc diff`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-diff.rst
|
||||
:start-after: start-mc-diff-desc
|
||||
:end-before: end-mc-diff-desc
|
||||
|
||||
* - :mc:`mc encrypt`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-encrypt.rst
|
||||
:start-after: start-mc-encrypt-desc
|
||||
:end-before: end-mc-encrypt-desc
|
||||
|
||||
* - :mc:`mc event`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-event.rst
|
||||
:start-after: start-mc-event-desc
|
||||
:end-before: end-mc-event-desc
|
||||
|
||||
* - :mc:`mc find`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-find.rst
|
||||
:start-after: start-mc-find-desc
|
||||
:end-before: end-mc-find-desc
|
||||
|
||||
* - :mc:`mc head`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-head.rst
|
||||
:start-after: start-mc-head-desc
|
||||
:end-before: end-mc-head-desc
|
||||
|
||||
* - :mc:`mc ilm`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-ilm.rst
|
||||
:start-after: start-mc-ilm-desc
|
||||
:end-before: end-mc-ilm-desc
|
||||
|
||||
* - :mc:`mc legalhold`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-legalhold.rst
|
||||
:start-after: start-mc-legalhold-desc
|
||||
:end-before: end-mc-legalhold-desc
|
||||
|
||||
* - :mc:`mc lock`
|
||||
- Deprecated since
|
||||
:release:`RELEASE.2020-09-18T00-13-21Z`. Use :mc:`mc retention`.
|
||||
|
||||
* - :mc:`mc ls`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-ls.rst
|
||||
:start-after: start-mc-ls-desc
|
||||
:end-before: end-mc-ls-desc
|
||||
|
||||
* - :mc:`mc mb`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-mb.rst
|
||||
:start-after: start-mc-mb-desc
|
||||
:end-before: end-mc-mb-desc
|
||||
|
||||
* - :mc:`mc mirror`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-mirror.rst
|
||||
:start-after: start-mc-mirror-desc
|
||||
:end-before: end-mc-mirror-desc
|
||||
|
||||
* - :mc:`mc mv`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-mv.rst
|
||||
:start-after: start-mc-mv-desc
|
||||
:end-before: end-mc-mv-desc
|
||||
|
||||
* - :mc:`mc policy`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-policy.rst
|
||||
:start-after: start-mc-policy-desc
|
||||
:end-before: end-mc-policy-desc
|
||||
|
||||
* - :mc:`mc rb`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-rb.rst
|
||||
:start-after: start-mc-rb-desc
|
||||
:end-before: end-mc-rb-desc
|
||||
|
||||
* - :mc:`mc retention`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-retention.rst
|
||||
:start-after: start-mc-retention-desc
|
||||
:end-before: end-mc-retention-desc
|
||||
|
||||
* - :mc:`mc rm`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-rm.rst
|
||||
:start-after: start-mc-rm-desc
|
||||
:end-before: end-mc-rm-desc
|
||||
|
||||
* - :mc:`mc share`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-share.rst
|
||||
:start-after: start-mc-share-desc
|
||||
:end-before: end-mc-share-desc
|
||||
|
||||
* - :mc:`mc sql`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-sql.rst
|
||||
:start-after: start-mc-sql-desc
|
||||
:end-before: end-mc-sql-desc
|
||||
|
||||
* - :mc:`mc stat`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-stat.rst
|
||||
:start-after: start-mc-stat-desc
|
||||
:end-before: end-mc-stat-desc
|
||||
|
||||
* - :mc:`mc tag`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-tag.rst
|
||||
:start-after: start-mc-tag-desc
|
||||
:end-before: end-mc-tag-desc
|
||||
|
||||
* - :mc:`mc tree`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-tree.rst
|
||||
:start-after: start-mc-tree-desc
|
||||
:end-before: end-mc-tree-desc
|
||||
|
||||
* - :mc:`mc update`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-update.rst
|
||||
:start-after: start-mc-update-desc
|
||||
:end-before: end-mc-update-desc
|
||||
|
||||
* - :mc:`mc version`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-version.rst
|
||||
:start-after: start-mc-version-desc
|
||||
:end-before: end-mc-version-desc
|
||||
|
||||
* - :mc:`mc watch`
|
||||
- .. include:: /reference/minio-cli/minio-mc/mc-watch.rst
|
||||
:start-after: start-mc-watch-desc
|
||||
:end-before: end-mc-watch-desc
|
||||
|
||||
|
||||
:mc-cmd:`mc` also includes an administration extension for managing MinIO
|
||||
deployments. See :mc-cmd:`mc admin` for more complete documentation.
|
||||
|
||||
.. _mc-configuration:
|
||||
|
||||
Configuration File
|
||||
------------------
|
||||
|
||||
:mc-cmd:`mc` uses a ``JSON`` formatted configuration file used for storing
|
||||
certain kinds of information, such as the :mc-cmd:`aliases <mc alias>` for
|
||||
each configured S3-compatible service.
|
||||
|
||||
For Linux and OSX, the default configuration file location is
|
||||
``~/.mc/config.json``.
|
||||
|
||||
For Windows, :mc-cmd:`mc` attempts to construct a default file path by trying
|
||||
specific environment variables. If a variable is unset, :mc-cmd:`mc` moves
|
||||
to the next variable. If all attempts fail, :mc-cmd:`mc` returns an error.
|
||||
The following list describes each possible file path location in the order
|
||||
:mc-cmd:`mc` checks them:
|
||||
|
||||
#. ``HOME\.mc\config.json``
|
||||
#. ``USERPROFILE\.mc\config.json``
|
||||
#. ``HOMEDRIVE+HOMEPATH\.mc\config.json``
|
||||
|
||||
You can use the ``--config-dir``
|
||||
|
||||
.. _minio-mc-global-options:
|
||||
|
||||
Global Options
|
||||
--------------
|
||||
|
||||
.. program:: mc
|
||||
|
||||
All :ref:`commands <minio-mc-commands>` support the following global options:
|
||||
|
||||
.. option:: --debug
|
||||
|
||||
Enables verbose output to the console.
|
||||
|
||||
For example, the following operation adds verbose output to the
|
||||
:mc:`mc ls` command:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc --debug ls play
|
||||
|
||||
.. option:: --config-dir
|
||||
|
||||
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.
|
||||
|
||||
.. option:: --JSON
|
||||
|
||||
Enables `JSON lines <http://jsonlines.org/>`_ formatted output to the
|
||||
console.
|
||||
|
||||
For example, the following operation adds JSON Lines output to the
|
||||
:mc:`mc ls` command:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc --JSON ls play
|
||||
|
||||
.. option:: --no-color
|
||||
|
||||
Disables the built-in color theme for console output. Useful for dumb
|
||||
terminals.
|
||||
|
||||
.. option:: --quiet
|
||||
|
||||
Suppresses console output.
|
||||
|
||||
.. option:: --insecure
|
||||
|
||||
Disables TLS/SSL certificate verification. Allows TLS connectivity to
|
||||
servers with invalid certificates. Exercise caution when using this
|
||||
option against untrusted S3 hosts.
|
||||
|
||||
.. option:: --version
|
||||
|
||||
Displays the current version of :mc-cmd:`mc`.
|
||||
|
||||
.. toctree::
|
||||
:titlesonly:
|
||||
:hidden:
|
||||
:glob:
|
||||
|
||||
/reference/minio-cli/minio-mc/*
|
||||
|
||||
|
||||
|
||||
|
179
source/reference/minio-cli/minio-mc/mc-alias.rst
Normal file
179
source/reference/minio-cli/minio-mc/mc-alias.rst
Normal file
@ -0,0 +1,179 @@
|
||||
============
|
||||
``mc alias``
|
||||
============
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc alias
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-alias-desc
|
||||
|
||||
The :mc-cmd:`mc alias` command provides a convenient interface for
|
||||
managing the list of S3-compatible hosts that :mc-cmd:`mc` can
|
||||
connect to and run operations against.
|
||||
|
||||
:mc-cmd:`mc` commands that operate on S3-compatible services *require*
|
||||
specifying an alias for that service.
|
||||
|
||||
.. end-mc-alias-desc
|
||||
|
||||
Using :mc-cmd:`mc alias` to add or remove an S3-compatible host is equivalent
|
||||
to manually editing entries in the :program:`mc`
|
||||
:ref:`configuration file <mc-configuration>`.
|
||||
|
||||
Required Credentials and Access Control
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc-cmd:`mc alias` requires specifying an access key and corresponding secret
|
||||
key for the S3-compatible host. :program:`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,
|
||||
:program:`mc` cannot perform read or write operations on that bucket.
|
||||
|
||||
For more information on MinIO Access Control, see
|
||||
:ref:`minio-auth-authz-overview`.
|
||||
|
||||
For more complete documentation on S3 Access Control, see
|
||||
:s3-docs:`Amazon S3 Security <security.html>`.
|
||||
|
||||
For all other S3-compatible services, defer to the documentation for that
|
||||
service.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Add an S3-Compatible Service
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc alias set` to add an S3-compatible service for use with
|
||||
:program:`mc`:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc alias set ALIAS HOSTNAME ACCESSKEY SECRETKEY
|
||||
|
||||
- Replace :mc-cmd:`~mc alias set ALIAS` with the alias to associate
|
||||
to the S3-compatible service.
|
||||
|
||||
- Replace :mc-cmd:`~mc alias set HOSTNAME` with the hostname or IP address of
|
||||
the S3-compatible service.
|
||||
|
||||
- Replace :mc-cmd:`~mc alias set ACCESSKEY` and
|
||||
:mc-cmd:`~mc alias set SECRETKEY` with the access and secret key for a user on
|
||||
the S3-compatible service.
|
||||
|
||||
Remove a Configured S3-Compatible Service
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc alias remove` to remove an S3-compatible alias from the
|
||||
:program:`mc` configuration:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc alias remove ALIAS
|
||||
|
||||
- Replace :mc-cmd:`~mc alias remove ALIAS` with the alias of the S3-compatible
|
||||
service to remove.
|
||||
|
||||
Use :mc-cmd:`mc alias list` to list the currently configured aliases and their
|
||||
associated S3-compatible service.
|
||||
|
||||
List Configured S3-Compatible Services
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc alias list` to list all configured S3-compatible aliases:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc alias list
|
||||
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. mc-cmd:: set, s
|
||||
:fullpath:
|
||||
|
||||
Adds a new S3-compatible host to the configuration file. The command
|
||||
has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc alias set ALIAS HOSTNAME ACCESSKEY SECRETKEY --api [S3v2|S3v4]
|
||||
|
||||
:mc-cmd:`mc alias set` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: ALIAS
|
||||
|
||||
*Required* The name to associate to the S3-compatible service.
|
||||
|
||||
The specified string cannot match any existing host aliases. Use
|
||||
:mc-cmd:`~mc alias list` to view the current host aliases before
|
||||
adding a new host.
|
||||
|
||||
.. mc-cmd:: HOSTNAME
|
||||
|
||||
*Required* The URL for the S3-compatible service endpoint.
|
||||
|
||||
.. mc-cmd:: ACCESSKEY
|
||||
|
||||
*Required* The access key for authenticating to the S3 service. The
|
||||
``ACCESSKEY`` must correspond to a user or role on the S3 service.
|
||||
|
||||
:mc-cmd:`mc` can only perform an operation on the S3 service if
|
||||
the ``ACCESSKEY`` user or role grants the required permissions.
|
||||
|
||||
.. mc-cmd:: SECRETKEY
|
||||
|
||||
*Required* The corresponding secret for the specified ``ACCESSKEY``.
|
||||
|
||||
.. mc-cmd:: api
|
||||
:option:
|
||||
|
||||
*Optional* The Amazon S3 Signature version to use when connecting to the
|
||||
S3 service. Supports the following values:
|
||||
|
||||
- ``S3v2``
|
||||
- ``S3v4`` (Default)
|
||||
|
||||
|
||||
.. mc-cmd:: remove, rm
|
||||
:fullpath:
|
||||
|
||||
Removes a host entry from the configuration file. The command has the
|
||||
following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc alias remove ALIAS
|
||||
|
||||
.. mc-cmd:: ALIAS
|
||||
|
||||
*Required* The alias to remove.
|
||||
|
||||
Use :mc-cmd:`~mc alias list` to validate the alias and its associated
|
||||
S3-compatible service before removing it.
|
||||
|
||||
.. mc-cmd:: list, ls
|
||||
:fullpath:
|
||||
|
||||
Lists all hosts in the configuration file. The command has the following
|
||||
syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc alias list
|
||||
|
166
source/reference/minio-cli/minio-mc/mc-cat.rst
Normal file
166
source/reference/minio-cli/minio-mc/mc-cat.rst
Normal file
@ -0,0 +1,166 @@
|
||||
==========
|
||||
``mc cat``
|
||||
==========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc cat
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-cat-desc
|
||||
|
||||
The :mc:`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``.
|
||||
:mc:`~mc cat` has similar functionality to ``cat``.
|
||||
|
||||
.. end-mc-cat-desc
|
||||
|
||||
Common Operations
|
||||
-----------------
|
||||
|
||||
View an S3 Object
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc cat` to return the object:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cat ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc cat SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc cat SOURCE>` with the path to the object on the
|
||||
S3-compatible host.
|
||||
|
||||
View an S3 Object at a Point-In-Time
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd-option:`mc cat rewind` to return the object at a specific
|
||||
point-in-time in the past:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cat ALIAS/PATH --rewind DURATION
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc cat SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc cat SOURCE>` with the path to the object on the
|
||||
S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc cat rewind>` with the point-in-time in the past
|
||||
at which the command returns the object. For example, specify ``30d`` to
|
||||
return the version of the object 30 days prior to the current date.
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versioning-admonition
|
||||
:end-before: end-versioning-admonition
|
||||
|
||||
View an S3 Object with Specific Version
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd-option:`mc cat version-id` to return a specific version of the
|
||||
object:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc cat ALIAS/PATH --version-id VERSION
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc cat SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc cat SOURCE>` with the path to the object on the
|
||||
S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`VERSION <mc cat version-id>` with the specific version of the
|
||||
object to return.
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versioning-admonition
|
||||
:end-before: end-versioning-admonition
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. Replacement substitutions
|
||||
|
||||
.. |command| replace:: :mc-cmd:`mc cat`
|
||||
.. |rewind| replace:: :mc-cmd-option:`~mc cat rewind`
|
||||
.. |versionid| replace:: :mc-cmd-option:`~mc cat version-id`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc cat SOURCE`
|
||||
|
||||
:mc:`~mc cat` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc cat [FLAGS] SOURCE [SOURCE ...]
|
||||
|
||||
:mc:`~mc cat` supports requires following arguments:
|
||||
|
||||
.. mc-cmd:: SOURCE
|
||||
|
||||
**REQUIRED**
|
||||
|
||||
The object to concatenate.
|
||||
|
||||
For objects on S3-compatible hosts, specify the path to the object as
|
||||
``ALIAS/PATH``, where:
|
||||
|
||||
- ``ALIAS`` is the :mc:`alias <mc alias>` of a configured S3-compatible host,
|
||||
*and*
|
||||
|
||||
- ``PATH`` is the path to the object.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc cat play/mybucket/object.txt
|
||||
|
||||
For files on a filesystem, specify the full filesystem path to the file as
|
||||
``SOURCE``:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc cat ~/data/object.txt
|
||||
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc
|
||||
:end-before: end-rewind-desc
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc
|
||||
:end-before: end-version-id-desc
|
||||
|
||||
.. mc-cmd:: encrypt-key
|
||||
:option:
|
||||
|
||||
Encrypt or decrypt objects using server-side encryption with
|
||||
client-specified keys. Specify key-value pairs as ``KEY=VALUE``.
|
||||
|
||||
- Each ``KEY`` represents a bucket or object.
|
||||
- Each ``VALUE`` represents the data key to use for encrypting
|
||||
object(s).
|
||||
|
||||
Enclose the entire list of key-value pairs passed to
|
||||
:mc-cmd-option:`~mc cat encrypt-key` in double quotes ``"``.
|
||||
|
||||
:mc-cmd-option:`~mc cat encrypt-key` can use the ``MC_ENCRYPT_KEY``
|
||||
environment variable for retrieving a list of encryption key-value pairs
|
||||
as an alternative to specifying them on the command line.
|
||||
|
449
source/reference/minio-cli/minio-mc/mc-cp.rst
Normal file
449
source/reference/minio-cli/minio-mc/mc-cp.rst
Normal file
@ -0,0 +1,449 @@
|
||||
=========
|
||||
``mc cp``
|
||||
=========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc cp
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-cp-desc
|
||||
|
||||
The :mc:`mc cp` command copies data from one or more sources to a target
|
||||
S3-compatible service.
|
||||
|
||||
.. end-mc-cp-desc
|
||||
|
||||
Examples
|
||||
~~~~~~~~
|
||||
|
||||
Copy Object to S3
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc cp` to copy an object to an S3-compatible host:
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: Filesystem to S3
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp SOURCE ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`SOURCE <mc cp SOURCE>` with the filesystem path to the
|
||||
object.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc cp TARGET>` with the :mc:`alias <mc alias>`
|
||||
of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc cp TARGET>` with the path to the object on
|
||||
the S3-compatible host. You can specify a different object name to
|
||||
"rename" the object on copy.
|
||||
|
||||
.. tab:: S3 to S3
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp SRCALIAS/SRCPATH TGTALIAS/TGTPATH
|
||||
|
||||
- Replace :mc-cmd:`SRCALIAS <mc cp SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of a source S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`SRCPATH <mc cp SOURCE>` with the path to the
|
||||
object on the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`TGTALIAS <mc cp TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a target S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`TGTPATH <mc cp TARGET>` with the path to the
|
||||
object on a target S3-compatible host. Omit the object name to use
|
||||
the ``SRCPATH`` object name.
|
||||
|
||||
Recursively Copy Objects to S3
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd-option:`mc cp recursive` to recursively copy objects to an
|
||||
S3-compatible host:
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: Filesystem to S3
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp --recursive SOURCE ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`SOURCE <mc cp SOURCE>` with the filesystem path to the
|
||||
directory containing the file(s).
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc cp TARGET>` with the :mc:`alias <mc alias>`
|
||||
of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc cp TARGET>` with the path to the object on
|
||||
the S3-compatible host. :mc-cmd:`mc cp` uses the ``SOURCE`` filenames
|
||||
when creating the objects on the target host.
|
||||
|
||||
.. tab:: S3 to S3
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp --recursive SRCALIAS/SRCPATH TGTALIAS/TGTPATH
|
||||
|
||||
- Replace :mc-cmd:`SRCALIAS <mc cp SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of a source S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`SRCPATH <mc cp SOURCE>` with the path to the
|
||||
bucket or bucket prefix on the source S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`TGTALIAS <mc cp TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a target S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`TGTPATH <mc cp TARGET>` with the path to the
|
||||
object on the target S3-compatible host. :mc-cmd:`mc cp` uses the
|
||||
``SRCPATH`` object names when creating objects on the target
|
||||
host.
|
||||
|
||||
Copy Point-In-Time Version of Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd-option:`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.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp --rewind DURATION SRCALIAS/SRCPATH TGTALIAS/TGTPATH
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc cp rewind>` with the point-in-time in the
|
||||
past at which the command copies the object. For example, specify
|
||||
``30d`` to copy the version of the object 30 days prior to the
|
||||
current date.
|
||||
|
||||
- Replace :mc-cmd:`SRCALIAS <mc cp SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of a source S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`SRCPATH <mc cp SOURCE>` with the path to the
|
||||
object on the source S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`TGTALIAS <mc cp TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a target S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`TGTPATH <mc cp TARGET>` with the path to the
|
||||
object on the target S3-compatible host. Omit the object name to use
|
||||
the ``SRCPATH`` object name.
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versioning-admonition
|
||||
:end-before: end-versioning-admonition
|
||||
|
||||
Copy Specific Version of Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd-option:`mc cp version-id` to copy a specific version of an object. This
|
||||
command only applies to S3-to-S3 copy.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp --version-id VERSION SRCALIAS/SRCPATH TGTALIAS/TGTPATH
|
||||
|
||||
- Replace :mc-cmd:`VERSION <mc cp rewind>` with the version of the object to
|
||||
copy.
|
||||
|
||||
- Replace :mc-cmd:`SRCALIAS <mc cp SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of a source S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`SRCPATH <mc cp SOURCE>` with the path to the
|
||||
object on the source S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`TGTALIAS <mc cp TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a target S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`TGTPATH <mc cp TARGET>` with the path to the
|
||||
object on the target S3-compatible host. Omit the object name to use
|
||||
the ``SRCPATH`` object name.
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versioning-admonition
|
||||
:end-before: end-versioning-admonition
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. |command| replace:: :mc-cmd:`mc cp`
|
||||
.. |rewind| replace:: :mc-cmd-option:`~mc cp rewind`
|
||||
.. |versionid| replace:: :mc-cmd-option:`~mc cp version-id`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc cp SOURCE`
|
||||
|
||||
:mc:`mc cp` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc cp [FLAGS] SOURCE [SOURCE...] TARGET
|
||||
|
||||
:mc:`~mc cp` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: SOURCE
|
||||
|
||||
**REQUIRED**
|
||||
|
||||
The object or objects to copy. You can specify both local paths
|
||||
and S3 paths using a configured S3 service :mc:`alias <mc alias>`.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
mc cp play/mybucket/object.txt ~/localfiles/mybucket/object.txt TARGET
|
||||
|
||||
If you specify a directory or bucket to :mc-cmd:`~mc cp SOURCE`, you must
|
||||
also specify :mc-cmd-option:`~mc cp recursive` to recursively copy the
|
||||
contents of that directory or bucket. If you omit the ``--recursive``
|
||||
argument, :mc:`~mc cp` only copies objects in the top level of the specified
|
||||
directory or bucket.
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
**REQUIRED**
|
||||
|
||||
The full path to the bucket to copy the specified
|
||||
:mc-cmd:`~mc cp SOURCE` to. Specify the :mc:`alias <mc alias>`
|
||||
of a configured S3 service as the prefix to the
|
||||
:mc-cmd:`~mc cp TARGET` path.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc cp ~/localfiles/object.txt play/mybucket/
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively copy the contents of each bucket or directory
|
||||
:mc-cmd:`~mc cp SOURCE` to the :mc-cmd:`~mc cp TARGET`
|
||||
bucket.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc
|
||||
:end-before: end-rewind-desc
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc
|
||||
:end-before: end-version-id-desc
|
||||
|
||||
.. mc-cmd:: older-than
|
||||
:option:
|
||||
|
||||
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).
|
||||
|
||||
.. mc-cmd:: newer-than
|
||||
:option:
|
||||
|
||||
Remove 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).
|
||||
|
||||
.. mc-cmd:: storage-class, sc
|
||||
:option:
|
||||
|
||||
Set the storage class for the new object(s) on the
|
||||
:mc-cmd:`~mc cp TARGET`.
|
||||
|
||||
See :aws-docs:`AmazonS3/latest/dev/storage-class-intro.html` for
|
||||
more information on S3 storage classses.
|
||||
|
||||
.. mc-cmd:: preserve, a
|
||||
:option:
|
||||
|
||||
Preserve file system attributes and bucket policy rules of the
|
||||
:mc-cmd:`~mc cp SOURCE` directories, buckets, and objects on the
|
||||
:mc-cmd:`~mc cp TARGET` bucket(s).
|
||||
|
||||
.. mc-cmd:: attr
|
||||
:option:
|
||||
|
||||
Add custom metadata for the object. Specify key-value pairs as
|
||||
``KEY=VALUE\;``. For example,
|
||||
``--attr key1=value1\;key2=value2\;key3=value3``.
|
||||
|
||||
.. mc-cmd:: continue, c
|
||||
:option:
|
||||
|
||||
Create or resume a copy session.
|
||||
|
||||
.. mc-cmd:: encrypt
|
||||
:option:
|
||||
|
||||
Encrypt or decrypt objects using server-side encryption with
|
||||
server-managed keys. Specify key-value pairs as ``KEY=VALUE``.
|
||||
|
||||
- Each ``KEY`` represents a bucket or object.
|
||||
- Each ``VALUE`` represents the data key to use for encrypting
|
||||
object(s).
|
||||
|
||||
Enclose the entire list of key-value pairs passed to
|
||||
:mc-cmd-option:`~mc cp encrypt` in double-quotes ``"``.
|
||||
|
||||
:mc-cmd-option:`~mc cp encrypt` can use the ``MC_ENCRYPT`` environment
|
||||
variable for retrieving a list of encryption key-value pairs as an
|
||||
alternative to specifying them on the command line.
|
||||
|
||||
.. mc-cmd:: encrypt-key
|
||||
:option:
|
||||
|
||||
Encrypt or decrypt objects using server-side encryption with
|
||||
client-specified keys. Specify key-value pairs as ``KEY=VALUE``.
|
||||
|
||||
- Each ``KEY`` represents a bucket or object.
|
||||
- Each ``VALUE`` represents the data key to use for encrypting
|
||||
object(s).
|
||||
|
||||
Enclose the entire list of key-value pairs passed to
|
||||
:mc-cmd-option:`~mc cp encrypt-key` in double quotes ``"``.
|
||||
|
||||
:mc-cmd-option:`~mc cp encrypt-key` can use the ``MC_ENCRYPT_KEY``
|
||||
environment variable for retrieving a list of encryption key-value pairs
|
||||
as an alternative to specifying them on the command line.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
:mc:`mc cp` verifies all copy operations to object storage using MD5SUM
|
||||
checksums.
|
||||
|
||||
Interrupted or failed copy operations can resume from the point of failure
|
||||
by issuing the :mc:`mc cp` operation again with the
|
||||
:mc-cmd-option:`~mc cp continue` argument.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Copy a text file to an object storage.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp myobject.txt play/mybucket
|
||||
|
||||
Copy a text file to an object storage with specified metadata.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp --attr key1=value1;key2=value2 myobject.txt play/mybucket
|
||||
|
||||
Copy a folder recursively from MinIO cloud storage to Amazon S3 cloud storage with specified metadata.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp --attr Cache-Control=max-age=90000,min-fresh=9000\;key1=value1\;key2=value2 \
|
||||
--recursive play/mybucket/bucketname/ s3/mybucket/
|
||||
|
||||
|
||||
Copy a text file to an object storage and assign ``storage-class`` REDUCED_REDUNDANCY to the uploaded object.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp --storage-class REDUCED_REDUNDANCY myobject.txt play/mybucket
|
||||
|
||||
Copy a server-side encrypted file to an object storage.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The following example assumes that the ``s3`` and ``myminio`` aliases
|
||||
exists in the :mc:`mc` :ref:`configuration file <mc-configuration>`. See
|
||||
:mc:`mc alias` for more information on aliases.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp --recursive \
|
||||
--encrypt-key "s3/documents/=32byteslongsecretkeymustbegiven1 , myminio/documents/=32byteslongsecretkeymustbegiven2" \
|
||||
s3/documents/myobject.txt myminio/documents/
|
||||
|
||||
Perform key-rotation on a server-side encrypted object.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc:`mc cp` key rotation requires creating an additional alias with the same
|
||||
endpoing as the target S3 service alias. :mc:`mc cp` effectively decrypts
|
||||
the object using the old secret key, encrypts the object using the new
|
||||
secret key, and replaces the old object with the newly encrypted object.
|
||||
|
||||
The following example assumes that the ``myminio1`` and ``myminio2`` aliases
|
||||
exists in the :mc:`mc` :ref:`configuration file <mc-configuration>`. See
|
||||
:mc:`mc alias` for more information on aliases.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp --encrypt-key 'myminio1/mybucket=32byteslongsecretkeymustgenerate , myminio2/mybucket/=32byteslongsecretkeymustgenerat1' \
|
||||
myminio1/mybucket/encryptedobject myminio2/mybucket/encryptedobject
|
||||
|
||||
Copy a javascript file to object storage and assign ``Cache-Control`` header to the uploaded object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp --attr Cache-Control=no-cache myscript.js play/mybucket
|
||||
|
||||
Copy a text file to an object storage and preserve the filesyatem attributes.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cp -a myobject.txt play/mybucket
|
||||
|
||||
|
65
source/reference/minio-cli/minio-mc/mc-diff.rst
Normal file
65
source/reference/minio-cli/minio-mc/mc-diff.rst
Normal file
@ -0,0 +1,65 @@
|
||||
===========
|
||||
``mc diff``
|
||||
===========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. mc:: mc diff
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-diff-desc
|
||||
|
||||
The :mc:`mc diff` mc computes the differences between two filesystem directories
|
||||
or S3-compatible buckets. :mc:`mc diff` lists only those objects which are
|
||||
missing or which differ in size. :mc:`mc diff` does **not** compare the contents
|
||||
of objects.
|
||||
|
||||
.. end-mc-diff-desc
|
||||
|
||||
Output Legend
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
:mc:`mc diff` uses the following legend when formatting the diff output:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
FIRST < SECOND - object exists only in FIRST
|
||||
FIRST > SECOND - object exists only in SECOND
|
||||
FIRST ! SECOND - Newer object exists in FIRST
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc diff play/bucket1 play/bucket2
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`mc diff` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc diff FIRST SECOND
|
||||
|
||||
:mc:`~mc diff` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: FIRST
|
||||
|
||||
The path to a filesystem directory or S3-compatible bucket.
|
||||
|
||||
.. mc-cmd:: SECOND
|
||||
|
||||
The path to a filesystem directory or S3-compatible bucket.
|
125
source/reference/minio-cli/minio-mc/mc-encrypt.rst
Normal file
125
source/reference/minio-cli/minio-mc/mc-encrypt.rst
Normal file
@ -0,0 +1,125 @@
|
||||
==============
|
||||
``mc encrypt``
|
||||
==============
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc encrypt
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-encrypt-desc
|
||||
|
||||
The :mc:`mc encrypt` mc sets, updates, or disables the default
|
||||
bucket Server-Side Encryption (SSE) mode. MinIO automatically encrypts
|
||||
objects using the specified SSE mode.
|
||||
|
||||
For more information on configuring SSE, see
|
||||
:ref:`minio-sse`
|
||||
|
||||
.. end-mc-encrypt-desc
|
||||
|
||||
Behavior
|
||||
~~~~~~~~
|
||||
|
||||
:mc:`mc encrypt` 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:`mc mv` mc with the :mc-cmd-option:`~mc mv encrypt` or
|
||||
:mc-cmd-option:`~mc mv encrypt-key` arguments to manually modify the
|
||||
encryption settings or encrypted state of the bucket contents *before*
|
||||
changing the bucket default.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. mc-cmd:: set
|
||||
:fullpath:
|
||||
|
||||
Sets the default encryption settings for the bucket. The command has the
|
||||
following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc encrypt set ENCRYPTION [KMSKEY] TARGET
|
||||
|
||||
The mc requires the following arguments:
|
||||
|
||||
.. mc-cmd:: ENCRYPTION
|
||||
|
||||
Specify the server-side encryption type to use as the default SSE mode.
|
||||
Supports the following values:
|
||||
|
||||
- ``sse-kms`` - SSE using a Key Management System (KMS)
|
||||
- ``sse-s3`` - SSE using client-provided keys (SSE-C).
|
||||
|
||||
.. mc-cmd:: KMSKEY
|
||||
|
||||
Specify the KMS Master Key to use for performing SSE object encryption.
|
||||
Only required if :mc-cmd:`~mc encrypt set ENCRYPTION` is ``sse-kms``.
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the bucket on which to set the default SSE mode. Specify
|
||||
the :mc-cmd:`~mc alias` of a configured S3 service as the prefix to the
|
||||
TARGET path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc encrypt set ENCRYPTION [KMSKEY] play/mybucket
|
||||
|
||||
.. mc-cmd:: clear
|
||||
:fullpath:
|
||||
|
||||
Removes the default encryption settings for the bucket. The command has
|
||||
the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc encrypt clear TARGET
|
||||
|
||||
The command requires the following argument:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the bucket on which to clear the default SSE mode.
|
||||
Specify the :mc-cmd:`~mc alias` of a configured S3 service as the prefix
|
||||
to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc encrypt remove play/mybucket
|
||||
|
||||
.. mc-cmd:: info
|
||||
:fullpath:
|
||||
|
||||
Returns the current default bucket encryption settings. The command
|
||||
has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc encrypt info TARGET
|
||||
|
||||
The command requires the following argument:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the bucket on which to return the default SSE mode.
|
||||
Specify the :mc-cmd:`~mc alias` of a configured S3 service as the prefix
|
||||
to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc encrypt remove play/mybucket
|
||||
|
||||
|
308
source/reference/minio-cli/minio-mc/mc-event.rst
Normal file
308
source/reference/minio-cli/minio-mc/mc-event.rst
Normal file
@ -0,0 +1,308 @@
|
||||
============
|
||||
``mc event``
|
||||
============
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc event
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-event-desc
|
||||
|
||||
The :mc:`mc event` command supports adding, removing, and listing
|
||||
the bucket event notifications.
|
||||
|
||||
MinIO automatically sends triggered events to the configured notification
|
||||
targets. MinIO supports notification targets like AMQP, Redis, ElasticSearch,
|
||||
NATS and PostgreSQL. See
|
||||
:doc:`MinIO Bucket Notifications </concepts/bucket-notifications>`
|
||||
for more information.
|
||||
|
||||
.. end-mc-event-desc
|
||||
|
||||
.. _mc-event-supported-events:
|
||||
|
||||
Supported Bucket Events
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The following table lists the supported S3 Event and the corresponding
|
||||
:mc:`mc event` alias:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 20 80
|
||||
:width: 100%
|
||||
|
||||
* - MinIO Alias
|
||||
- Corresponding S3 Event
|
||||
|
||||
* - ``put``
|
||||
- ``s3:ObjectCreated:Put``
|
||||
|
||||
* - ``completeMultipartUpload``
|
||||
- ``s3:ObjectCreated:CompleteMultipartUpload``
|
||||
|
||||
* - ``head``
|
||||
- ``s3:ObjectAccessed:Head``
|
||||
|
||||
* - ``post``
|
||||
- ``s3:ObjectCreated:Post``
|
||||
|
||||
* - ``delete``
|
||||
- ``s3:ObjectRemoved:Delete``
|
||||
|
||||
* - ``copy``
|
||||
- ``s3:ObjectCreated:Copy``
|
||||
|
||||
* - ``get``
|
||||
- ``s3:ObjectAccessed:Get``
|
||||
|
||||
For more complete documentation on the listed S3 events, see
|
||||
:s3-docs:`S3 Supported Event Types
|
||||
<NotificationHowTo.html#notification-how-to-event-types-and-destinations>`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Add New Event Notification to a Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc event add` to add a notification event to a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc event add ALIAS/PATH ARN --event EVENTS
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc event add TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc event add TARGET>` with the path to the bucket on
|
||||
the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`ARN <mc event add ARN>` with the
|
||||
:aws-docs:`Amazon Resource Name (ARN)
|
||||
<general/latest/gr/aws-arns-and-namespaces>` of the notification target.
|
||||
|
||||
- Replace :mc-cmd:`EVENTS <mc event add event>` with a comma-separated list of
|
||||
:ref:`events <mc-event-supported-events>`.
|
||||
|
||||
|
||||
Remove an Event Notification from a Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc event remove` to remove a notification event from a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc event remove ALIAS/PATH ARN --event EVENTS
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc event add TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc event add TARGET>` with the path to the bucket on
|
||||
the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`ARN <mc event add ARN>` with the
|
||||
:aws-docs:`Amazon Resource Name (ARN)
|
||||
<general/latest/gr/aws-arns-and-namespaces>` of the notification target.
|
||||
|
||||
- Replace :mc-cmd:`EVENTS <mc event add event>` with a comma-separated list of
|
||||
:ref:`events <mc-event-supported-events>` to remove.
|
||||
|
||||
List Bucket Notification Events
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc event list` to list all configured notification events on a
|
||||
bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc event list ALIAS/PATH ARN
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc event add TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc event add TARGET>` with the path to the bucket on
|
||||
the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`ARN <mc event add ARN>` with the
|
||||
:aws-docs:`Amazon Resource Name (ARN)
|
||||
<general/latest/gr/aws-arns-and-namespaces>` of the notification target.
|
||||
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. mc-cmd:: add
|
||||
:fullpath:
|
||||
|
||||
Adds a new bucket event notification. For supported event types, see
|
||||
:ref:`mc-event-supported-events`. The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc event add TARGET ARN [FLAGS]
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The S3 service :mc:`alias <mc alias>` and bucket to
|
||||
which the command adds the new event notification. Specify the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3 service as the prefix to
|
||||
the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc event add play/mybucket
|
||||
|
||||
.. mc-cmd:: ARN
|
||||
|
||||
*Required* The :aws-docs:`Amazon Resource Name (ARN)
|
||||
<general/latest/gr/aws-arns-and-namespaces>` of the notification target.
|
||||
|
||||
The MinIO server outputs an ARN for each configured
|
||||
notification target at server startup. See
|
||||
:doc:`/concepts/bucket-notifications` for more
|
||||
information.
|
||||
|
||||
.. mc-cmd:: event
|
||||
:option:
|
||||
|
||||
The event(s) for which MinIO generates bucket notifications.
|
||||
Specify multiple events using a comma ``,`` delimiter.
|
||||
See :ref:`mc-event-supported-events` for supported events.
|
||||
|
||||
Defaults to ``put,delete, get``.
|
||||
|
||||
.. mc-cmd:: prefix
|
||||
:option:
|
||||
|
||||
The bucket prefix in which the specified
|
||||
:mc-cmd-option:`~mc event add event` can trigger a bucket notification.
|
||||
|
||||
For example, given a :mc-cmd:`~mc event add TARGET` of ``play/mybucket``
|
||||
and a :mc-cmd-option:`~mc event add prefix` of ``photos``, only events in
|
||||
``play/mybucket/photos`` trigger bucket notifications.
|
||||
|
||||
.. mc-cmd:: suffix
|
||||
:option:
|
||||
|
||||
The bucket suffix in which the specified
|
||||
:mc-cmd-option:`~mc event add event` can trigger a bucket notification.
|
||||
|
||||
For example, given a :mc-cmd:`~mc event add TARGET` of ``play/mybucket``
|
||||
and a :mc-cmd-option:`~mc event add suffix` of ``.jpg``, only events in
|
||||
``play/mybucket/*.jpg`` trigger bucket notifications.
|
||||
|
||||
.. mc-cmd:: remove
|
||||
:fullpath:
|
||||
|
||||
Removes an existing bucket event notification. The command has the
|
||||
following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc event remove TARGET ARN [FLAGS]
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The S3 service :mc:`alias <mc alias>` and bucket from
|
||||
which the command removes the event notification. Specify the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3 service as the prefix to
|
||||
the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc event add play/mybucket
|
||||
|
||||
.. mc-cmd:: ARN
|
||||
|
||||
*Required* The :aws-docs:`Amazon Resource Name (ARN)
|
||||
<general/latest/gr/aws-arns-and-namespaces>` of the notification target.
|
||||
|
||||
The MinIO server outputs an ARN for each configured
|
||||
notification target at server startup. See
|
||||
:doc:`/concepts/bucket-notifications` for more information.
|
||||
|
||||
.. mc-cmd:: force
|
||||
:option:
|
||||
|
||||
Removes all events on the :mc-cmd:`~mc event remove TARGET` bucket with
|
||||
the :mc-cmd-option:`~mc event remove ARN` notification target.
|
||||
|
||||
.. mc-cmd:: event
|
||||
:option:
|
||||
|
||||
The event(s) to remove. Specify multiple events using a comma ``,``
|
||||
delimiter. See :ref:`mc-event-supported-events` for supported events.
|
||||
|
||||
Defaults to removing all events on the :mc-cmd:`~mc event remove TARGET`
|
||||
bucket with the :mc-cmd-option:`~mc event remove ARN` notification target.
|
||||
|
||||
.. mc-cmd:: prefix
|
||||
:option:
|
||||
|
||||
The bucket prefix in which the command removes bucket notifications.
|
||||
|
||||
For example, given a :mc-cmd:`~mc event remove TARGET` of
|
||||
``play/mybucket`` and a :mc-cmd-option:`~mc event remove prefix` of
|
||||
``photos``, the command only removes bucket notifications in
|
||||
``play/mybucket/photos``.
|
||||
|
||||
.. mc-cmd:: suffix
|
||||
:option:
|
||||
|
||||
The bucket suffix in which the command removes bucket notifications.
|
||||
|
||||
For example, given a :mc-cmd:`~mc event remove TARGET` of
|
||||
``play/mybucket`` and a :mc-cmd-option:`~mc event remove suffix` of
|
||||
``.jpg``, the command only removes bucket notifications in
|
||||
``play/mybucket/*.jpg``.
|
||||
|
||||
.. mc-cmd:: list
|
||||
:fullpath:
|
||||
|
||||
Lists bucket event notifications.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc event add TARGET ARN [FLAGS]
|
||||
|
||||
:mc-cmd:`~mc alias list` supports the following arguments
|
||||
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The S3 service :mc:`alias <mc alias>` and bucket to
|
||||
which the command lists event notification. Specify the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3 service as the prefix to
|
||||
the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc event add play/mybucket
|
||||
|
||||
.. mc-cmd:: ARN
|
||||
|
||||
*Required* The :aws-docs:`Amazon Resource Name (ARN)
|
||||
<general/latest/gr/aws-arns-and-namespaces>` of the bucket resource.
|
||||
|
||||
The MinIO server outputs an ARN for each configured
|
||||
notification target at server startup. See
|
||||
:doc:`/concepts/bucket-notifications` for more information.
|
||||
|
||||
|
||||
|
274
source/reference/minio-cli/minio-mc/mc-find.rst
Normal file
274
source/reference/minio-cli/minio-mc/mc-find.rst
Normal file
@ -0,0 +1,274 @@
|
||||
===========
|
||||
``mc find``
|
||||
===========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc find
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-find-desc
|
||||
|
||||
The :mc:`mc find` command supports querying for objects on an S3-compatible
|
||||
host. You can also use the command to search for files on a filesystem.
|
||||
|
||||
.. end-mc-find-desc
|
||||
|
||||
.. _mc-find-units:
|
||||
|
||||
Units of Measurement
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The :mc-cmd-option:`mc find smaller` and :mc-cmd-option:`mc find larger` flags
|
||||
accept the following case-insensitive suffixes to represent the unit of the
|
||||
specified size value:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 20 80
|
||||
:width: 100%
|
||||
|
||||
* - 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``.
|
||||
|
||||
|
||||
.. _mc-find-substitution-format:
|
||||
|
||||
Substitution Format
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The :mc-cmd-option:`mc find exec` and :mc-cmd-option:`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.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Find a Specific Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc find ALIAS/PATH --name NAME
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc find PATH>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc find PATH>` with the path to a bucket on the
|
||||
S3-compatible host. Omit the path to search from the root of the S3 host.
|
||||
|
||||
- Replace :mc-cmd:`NAME <mc find name>` with the object.
|
||||
|
||||
Find Objects with File Extention in Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc find ALIAS/PATH --name *.EXTENSION
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc find PATH>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc find PATH>` with the path to a bucket on the
|
||||
S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`EXTENSION <mc find name>` with the file extention of the
|
||||
object.
|
||||
|
||||
Find All Matching Files and Copy To S3 Service
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc find` with the :mc-cmd-option:`~mc find exec` option to find
|
||||
files on a local filesystem and pass them to an :program:`mc` command for
|
||||
further processing. The following example uses :mc:`mc cp` to copy the
|
||||
output of :mc:`mc find` to an S3-compatible host.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc find FILEPATH --name "*.EXTENSION" --exec "mc cp {} ALIAS/PATH"
|
||||
|
||||
- Replace :mc-cmd:`FILEPATH <mc find PATH>` with the full file path to the
|
||||
directory to search.
|
||||
|
||||
- Replace :mc-cmd:`EXTENSION <mc find name>` with the file extention of the
|
||||
object.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc find PATH>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc find PATH>` with the path to a bucket on the
|
||||
S3-compatible host.
|
||||
|
||||
To continuously watch the specified directory and copy new objects,
|
||||
include the :mc-cmd-option:`~mc find watch` argument:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc find --watch FILEPATH --name "*.EXTENSION" --exec "mc cp {} ALIAS/PATH"
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`mc find` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc find PATH [FLAGS]
|
||||
|
||||
:mc:`~mc find` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: PATH
|
||||
|
||||
*Required*
|
||||
|
||||
The full path to search.
|
||||
|
||||
For objects on S3-compatible hosts, specify the path to the object as
|
||||
``ALIAS/PATH``, where:
|
||||
|
||||
- ``ALIAS`` is the :mc:`alias <mc alias>` of a configured S3-compatible host,
|
||||
*and*
|
||||
|
||||
- ``PATH`` is the path to the object.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc find play/mybucket
|
||||
|
||||
For files on a filesystem, specify the full filesystem path to the file
|
||||
as ``PATH``:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc find ~/Documents/
|
||||
|
||||
Issuing :mc-cmd:`mc find PATH` with no other arguments returns a list of
|
||||
*all* objects or files at the specified path, similar to :mc-cmd:`mc ls`.
|
||||
|
||||
.. mc-cmd:: exec
|
||||
:option:
|
||||
|
||||
Spawns an external process for each object returned by
|
||||
:mc:`mc find`. Supports
|
||||
:ref:`substitution formatting <mc-find-substitution-format>` of the
|
||||
output.
|
||||
|
||||
.. mc-cmd:: ignore
|
||||
:option:
|
||||
|
||||
Exclude objects whose names match the specified wildcard pattern.
|
||||
|
||||
.. mc-cmd:: name
|
||||
:option:
|
||||
|
||||
Return objects whose names match the specified wildcard pattern.
|
||||
|
||||
.. mc-cmd:: older
|
||||
:option:
|
||||
|
||||
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).
|
||||
|
||||
.. mc-cmd:: newer
|
||||
:option:
|
||||
|
||||
Mirror object(s) newer than the specified number of days. Specify a
|
||||
string in ``#d#hh#mm#ss`` format. For example:
|
||||
``--older-than 1d2hh3mm4ss``
|
||||
|
||||
.. mc-cmd:: path
|
||||
:option:
|
||||
|
||||
Return the contents of directories whose names match the specified
|
||||
wildcard pattern.
|
||||
|
||||
.. mc-cmd:: print
|
||||
:option:
|
||||
|
||||
Prints results to ``STDOUT``. Supports
|
||||
:ref:`substitution formatting <mc-find-substitution-format>` of the
|
||||
output.
|
||||
|
||||
.. mc-cmd:: regex
|
||||
:option:
|
||||
|
||||
Returns objects or the contents of directories whose names match the
|
||||
specified PCRE regex pattern.
|
||||
|
||||
.. mc-cmd:: larger
|
||||
:option:
|
||||
|
||||
Match all objects larger than the specified size in
|
||||
:ref:`units <mc-find-units>`.
|
||||
|
||||
.. mc-cmd:: smaller
|
||||
:option:
|
||||
|
||||
Match all objects smaller than the specifized size in
|
||||
:ref:`units <mc-find-units>`.
|
||||
|
||||
.. mc-cmd:: maxdepth
|
||||
:option:
|
||||
|
||||
Limits directory navigation to the specified depth.
|
||||
|
||||
.. mc-cmd:: watch
|
||||
:option:
|
||||
|
||||
Continuously monitor the :mc-cmd:`~mc find PATH` and return
|
||||
any new objects which match the specified criteria.
|
||||
|
||||
|
||||
|
||||
|
159
source/reference/minio-cli/minio-mc/mc-head.rst
Normal file
159
source/reference/minio-cli/minio-mc/mc-head.rst
Normal file
@ -0,0 +1,159 @@
|
||||
===========
|
||||
``mc head``
|
||||
===========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc head
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-head-desc
|
||||
|
||||
The :mc:`mc head` command displays the first ``n`` lines of an object,
|
||||
where ``n`` is an argument specified to the command.
|
||||
|
||||
.. end-mc-head-desc
|
||||
|
||||
:mc:`mc head` does not perform any transformation or formatting of object
|
||||
contents to facilitate readability.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
View Partial Contents of an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc head` to return the first 10 lines of an object:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc head ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc head SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc head SOURCE>` with the path to the object on the
|
||||
S3-compatible host.
|
||||
|
||||
View Partial Contents of an Object at a Point in Time
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd-option:`mc head rewind` to return the first 10 lines of the
|
||||
object at a specific point-in-time in the past:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc head ALIAS/PATH --rewind DURATION
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc head SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc head SOURCE>` with the path to the object on the
|
||||
S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc head rewind>` with the point-in-time in the past
|
||||
at which the command returns the object. For example, specify ``30d`` to
|
||||
return the version of the object 30 days prior to the current date.
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versioning-admonition
|
||||
:end-before: end-versioning-admonition
|
||||
|
||||
View Partial Contents of an Object with Specific Version
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd-option:`mc head version-id` to return the first 10 lines of the
|
||||
object at a specific point-in-time in the past:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc head ALIAS/PATH --version-id VERSION
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc head SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc head SOURCE>` with the path to the object on the
|
||||
S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`VERSION <mc head version-id>` with the version of the object.
|
||||
For example, specify ``30d`` to return the version of the object 30 days prior
|
||||
to the current date.
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versioning-admonition
|
||||
:end-before: end-versioning-admonition
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. |command| replace:: :mc-cmd:`mc head`
|
||||
.. |rewind| replace:: :mc-cmd-option:`~mc head rewind`
|
||||
.. |versionid| replace:: :mc-cmd-option:`~mc head version-id`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc head SOURCE`
|
||||
|
||||
:mc:`~mc head` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc head [FLAGS] SOURCE [SOURCE...]
|
||||
|
||||
:mc:`~mc head` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: --lines, -n
|
||||
|
||||
The number of lines to print.
|
||||
|
||||
Defaults to ``10``.
|
||||
|
||||
.. mc-cmd:: SOURCE
|
||||
|
||||
**REQUIRED**
|
||||
|
||||
The object or objects to print. You can specify both local paths
|
||||
and S3 paths using a configured S3 service :mc:`alias <mc alias>`.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
mc head play/mybucket/object.txt ~/localfiles/mybucket/object.txt
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc
|
||||
:end-before: end-rewind-desc
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc
|
||||
:end-before: end-version-id-desc
|
||||
|
||||
.. mc-cmd:: encrypt-key
|
||||
:option:
|
||||
|
||||
Encrypt or decrypt objects using server-side encryption with
|
||||
client-specified keys. Specify key-value pairs as ``KEY=VALUE``.
|
||||
|
||||
- Each ``KEY`` represents a bucket or object.
|
||||
- Each ``VALUE`` represents the data key to use for encrypting
|
||||
object(s).
|
||||
|
||||
Enclose the entire list of key-value pairs passed to
|
||||
:mc-cmd-option:`~mc head encrypt-key` in double quotes ``"``.
|
||||
|
||||
:mc-cmd-option:`~mc head encrypt-key` can use the ``MC_ENCRYPT_KEY``
|
||||
environment variable for retrieving a list of encryption key-value pairs
|
||||
as an alternative to specifying them on the command line.
|
341
source/reference/minio-cli/minio-mc/mc-ilm.rst
Normal file
341
source/reference/minio-cli/minio-mc/mc-ilm.rst
Normal file
@ -0,0 +1,341 @@
|
||||
==========
|
||||
``mc ilm``
|
||||
==========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc ilm
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-ilm-desc
|
||||
|
||||
The :mc:`mc ilm` command manages object lifecycle management
|
||||
rules on a bucket. See the AWS documentation on
|
||||
:s3-docs:`Object Lifecycle Management <object-lifecycle-mgmt.html>` for more
|
||||
information.
|
||||
|
||||
.. end-mc-ilm-desc
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Expire Bucket Contents After Specific Date
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc ilm add` with :mc-cmd-option:`~mc ilm add expiry-date` to
|
||||
expire bucket contents after a specific date.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ilm add --id "RULE" --expiry-date "DATE" ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`RULE <mc ilm add id>` with the unique name of the lifecycle
|
||||
management rule.
|
||||
|
||||
- Replace :mc-cmd:`DATE <mc ilm add expiry-date>` with the future date after
|
||||
which to expire the object. For example, specify "2021-01-01" to expire
|
||||
objects after January 1st, 2021.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc ilm add TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc ilm add TARGET>` with the path to the bucket on the
|
||||
S3-compatible host.
|
||||
|
||||
Expire Bucket Contents After Number of Days
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc ilm add` with :mc-cmd-option:`~mc ilm add expiry-days` to
|
||||
expire bucket contents a number of days after object creation:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ilm add --id "RULE" --expiry-days "DAYS" ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`RULE <mc ilm add id>` with the unique name of the lifecycle
|
||||
management rule.
|
||||
|
||||
- Replace :mc-cmd:`DATE <mc ilm add expiry-date>` with the number of days after
|
||||
which to expire the object. For example, specify ``30d`` to expire the
|
||||
object 30 days after creation.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc ilm add TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc ilm add TARGET>` with the path to the bucket on the
|
||||
S3-compatible host.
|
||||
|
||||
List Bucket Lifecycle Management Rules
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc ilm list` to list a bucket's lifecycle management rules:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ilm list ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc ilm add TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc ilm add TARGET>` with the path to the bucket on the
|
||||
S3-compatible host.
|
||||
|
||||
Remove a Bucket Lifecycle Management Rule
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc ilm remove` to remove a bucket lifecycle management rule:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ilm remove --id "RULE" ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`RULE <mc ilm add id>` with the unique name of the lifecycle
|
||||
management rule.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc ilm add TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc ilm add TARGET>` with the path to the bucket on the
|
||||
S3-compatible host.
|
||||
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. mc-cmd:: list
|
||||
:fullpath:
|
||||
|
||||
Lists the current lifecycle management rules of the specified bucket. The
|
||||
subcommand has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ilm list [FLAGS] TARGET
|
||||
|
||||
The subcommand supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to the bucket from which to list existing
|
||||
lifecycle management rules. Specify the :mc-cmd:`alias <mc alias>`
|
||||
of a configured S3 service as the prefix to the ``TARGET`` path.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc ilm list play/mybucket
|
||||
|
||||
.. mc-cmd:: expiry
|
||||
:option:
|
||||
|
||||
:mc-cmd:`mc ilm` returns only fields related to lifecycle rule expiration.
|
||||
|
||||
.. mc-cmd:: transition
|
||||
:option:
|
||||
|
||||
:mc-cmd:`mc ilm` returns only fields related to lifecycle rule transition.
|
||||
|
||||
.. mc-cmd:: minimum
|
||||
:option:
|
||||
|
||||
:mc-cmd:`mc ilm` returns only the following fields:
|
||||
|
||||
- ``id``
|
||||
- ``prefix``
|
||||
- ``status``
|
||||
- ``transition set``
|
||||
- ``expiry set``
|
||||
|
||||
.. mc-cmd:: add
|
||||
:fullpath:
|
||||
|
||||
Adds or modifies bucket lifecycle management rules. The command has
|
||||
the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ilm add [FLAGS] TARGET
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required*
|
||||
|
||||
The full path to the bucket from which to add or modify the lifecycle
|
||||
management rule. Specify the :mc-cmd:`alias <mc alias>` of a configured S3
|
||||
service as the prefix to the ``TARGET`` path.
|
||||
|
||||
Specify all ``[FLAGS]`` *prior* to the ``TARGET``.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc ilm list [FLAGS] play/mybucket
|
||||
|
||||
.. mc-cmd:: id
|
||||
:option:
|
||||
|
||||
*Required* The unique name of the rule. Specify the
|
||||
:mc-cmd-option:`mc ilm add id` of an existing rule to modify the
|
||||
lifecycle configuration of that rule.
|
||||
|
||||
.. mc-cmd:: prefix
|
||||
:option:
|
||||
|
||||
The path to the specific subset of the :mc-cmd:`~mc ilm add TARGET` bucket
|
||||
on which to apply the lifecycle configuration rule. MinIO appends the
|
||||
:mc-cmd-option:`~mc ilm add prefix` field to the ``TARGET`` path to
|
||||
construct the full path.
|
||||
|
||||
Omit to apply the rule to the entire ``TARGET`` bucket.
|
||||
|
||||
.. mc-cmd:: tags
|
||||
:option:
|
||||
|
||||
One or more ampersand ``&``-delimited key-value pairs describing
|
||||
the object tags to which to apply the lifecycle configuration rule.
|
||||
|
||||
.. mc-cmd:: expiry-date
|
||||
:option:
|
||||
|
||||
The ISO-8601-formatted date after which MinIO removes objects
|
||||
covered by the rule. Specifying a date that is *prior* to the
|
||||
current date marks all objects covered by the rule for removal.
|
||||
|
||||
.. mc-cmd:: expiry-days
|
||||
:option:
|
||||
|
||||
The number of days from object creation after which MinIO removes
|
||||
objects covered by the rule.
|
||||
|
||||
.. mc-cmd:: transition-date
|
||||
:option:
|
||||
|
||||
The ISO-8601-formatted date after which MinIO transitions objects
|
||||
covered by the rule to the specified ``--storage-class``.
|
||||
Specifying a date that is *prior* to the current date marks all
|
||||
objects covered by the rule for transition.
|
||||
|
||||
.. mc-cmd:: transition-days
|
||||
:option:
|
||||
|
||||
The number of days from object creation after which MinIO
|
||||
transitions objects covered by the rule to the specified
|
||||
``--storage-class``.
|
||||
|
||||
.. mc-cmd:: storage-class
|
||||
:option:
|
||||
|
||||
The Amazon S3 storage class to transition objects covered by the
|
||||
rule. See :s3-docs:`Transition objects using Amazon S3 Lifecycle
|
||||
<lifecycle-transition-general-considerations.html>` for more
|
||||
information on S3 storage classes.
|
||||
|
||||
.. mc-cmd:: disable
|
||||
:option:
|
||||
|
||||
Disables the rule with matching :mc-cmd-option:`~mc ilm add id`.
|
||||
|
||||
.. mc-cmd:: remove
|
||||
:fullpath:
|
||||
|
||||
Removes an existing lifecycle management rule from the bucket. The
|
||||
command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ilm remove [FLAGS] TARGET
|
||||
|
||||
The command supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to the bucket from which to remove the
|
||||
specified lifecycle management rule. Specify the :mc-cmd:`alias
|
||||
<mc alias>` of a configured S3 service as the prefix to the
|
||||
``TARGET`` path.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc ilm remove [FLAGS] play/mybucket
|
||||
|
||||
.. mc-cmd:: id
|
||||
|
||||
*Required* The unique name of the rule.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`mc ilm remove all`
|
||||
|
||||
.. mc-cmd:: all
|
||||
|
||||
*Required* Removes all rules in the bucket. Mutually exclusive with
|
||||
:mc-cmd-option:`mc ilm remove id`.
|
||||
|
||||
Requires including :mc-cmd-option:`~mc ilm remove force`.
|
||||
|
||||
.. mc-cmd:: force
|
||||
|
||||
Required if specifying :mc-cmd-option:`~mc ilm remove all`.
|
||||
|
||||
.. mc-cmd:: export
|
||||
:fullpath:
|
||||
|
||||
Export the JSON-formatted lifecycle configuration to ``STDOUT``. The command
|
||||
has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ilm export TARGET
|
||||
|
||||
The command supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to the bucket from which to export the
|
||||
configured lifecycle management rules. Specify the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3 service as the prefix
|
||||
to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc ilm export play/mybucket > play_mybucket_lifecycle_rules.json
|
||||
|
||||
.. mc-cmd:: import
|
||||
:fullpath:
|
||||
|
||||
Import a JSON-formatted lifecycle configuration from ``STDIN``. The command
|
||||
has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ilm import TARGET
|
||||
|
||||
The command supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to the bucket from which to apply the imported
|
||||
lifecycle management rules. Specify the :mc-cmd:`alias <mc alias>` of a
|
||||
configured S3 service as the prefix to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc ilm import play/mybucket < play_mybucket_lifecycle_rules.json
|
||||
|
253
source/reference/minio-cli/minio-mc/mc-legalhold.rst
Normal file
253
source/reference/minio-cli/minio-mc/mc-legalhold.rst
Normal file
@ -0,0 +1,253 @@
|
||||
================
|
||||
``mc legalhold``
|
||||
================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc legalhold
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-legalhold-desc
|
||||
|
||||
The :mc:`mc legalhold` command enables or disables object legal hold.
|
||||
Enabling legal hold on an object prevents any modification or deletion
|
||||
of the object and is equivalent to setting Write-Once Read-Only (WORM)
|
||||
mode on the object.
|
||||
|
||||
.. end-mc-legalhold-desc
|
||||
|
||||
.. important::
|
||||
|
||||
:mc:`mc legalhold` *requires* that the specified bucket has object locking
|
||||
enabled. You can **only** enable object locking at bucket creation.
|
||||
|
||||
See :mc-cmd-option:`mc mb with-lock` for documentation on creating
|
||||
buckets with object locking enabled.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Enable Legal Hold On Objects
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc legalhold set` to enable legal hold on objects:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc legalhold set [--recursive] ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc legalhold set TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc legalhold set TARGET>` with the path to the bucket
|
||||
or object on the S3-compatible host. If specifying the path to a bucket,
|
||||
include the :mc-cmd-option:`~mc legalhold set recursive` option.
|
||||
|
||||
Remove Legal Hold From Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc legalhold clear` to remove legal hold on objects:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc legalhold clear [--recursive] ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc legalhold clear TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc legalhold clear TARGET>` with the path to the bucket
|
||||
or object on the S3-compatible host. If specifying the path to a bucket,
|
||||
include the :mc-cmd-option:`~mc legalhold clear recursive` option.
|
||||
|
||||
Retrieve the Legal Hold Status Objects
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc legalhold info` to retrieve the legal hold status of an object.
|
||||
Include :mc-cmd-option:`~mc legalhold info recursive` to return the legal hold
|
||||
status of the contents of a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc legalhold clear [--recursive] ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc legalhold clear TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc legalhold clear TARGET>` with the path to the object
|
||||
or bucket on the S3-compatible host. If specifying the path to a bucket,
|
||||
include the :mc-cmd-option:`~mc legalhold info recursive` option.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. replacements for mc legalhold set
|
||||
|
||||
.. |command| replace:: :mc-cmd:`mc legalhold set`
|
||||
.. |rewind| replace:: :mc-cmd-option:`~mc legalhold set rewind`
|
||||
.. |versionid| replace:: :mc-cmd-option:`~mc legalhold set version-id`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc legalhold set TARGET`
|
||||
|
||||
.. mc-cmd:: set
|
||||
:fullpath:
|
||||
|
||||
Enables legal hold on an object or object(s).
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc legalhold set [FLAGS] TARGET
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required*
|
||||
|
||||
The full path to the object or bucket on which to enable
|
||||
the legal hold. Specify the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3-compatible service as the prefix to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc legalhold set play/mybucket/myobject.txt
|
||||
|
||||
If you specify a path to a bucket or bucket prefix, you must also
|
||||
specify :mc-cmd-option:`mc legalhold set recursive`.
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Applies the legal hold to all objects in the
|
||||
:mc-cmd:`~mc legalhold set TARGET` bucket or bucket prefix.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc
|
||||
:end-before: end-rewind-desc
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc
|
||||
:end-before: end-version-id-desc
|
||||
|
||||
.. replacements for mc legalhold clear
|
||||
|
||||
.. |command-2| replace:: :mc-cmd:`mc legalhold clear`
|
||||
.. |rewind-2| replace:: :mc-cmd-option:`~mc legalhold clear rewind`
|
||||
.. |versionid-2| replace:: :mc-cmd-option:`~mc legalhold clear version-id`
|
||||
.. |alias-2| replace:: :mc-cmd-option:`~mc legalhold clear TARGET`
|
||||
|
||||
.. mc-cmd:: clear
|
||||
|
||||
Removes legal hold on an object or object(s).
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc legalhold clear [FLAGS] TARGET
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to the object or bucket on which to remove
|
||||
the legal hold. Specify the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3-compatible service as the prefix to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block::
|
||||
|
||||
mc legalhold set play/mybucket/myobject.txt
|
||||
|
||||
If you specify a path to a bucket or bucket prefix, you must also
|
||||
specify :mc-cmd-option:`mc legalhold set recursive`.
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Removes the legal hold from all objects in the
|
||||
:mc-cmd:`~mc legalhold set TARGET` bucket or bucket prefix.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc-2
|
||||
:end-before: end-rewind-desc-2
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc-2
|
||||
:end-before: end-version-id-desc-2
|
||||
|
||||
.. replacements for mc legalhold info
|
||||
|
||||
.. |command-3| replace:: :mc-cmd:`mc legalhold info`
|
||||
.. |rewind-3| replace:: :mc-cmd-option:`~mc legalhold info rewind`
|
||||
.. |versionid-3| replace:: :mc-cmd-option:`~mc legalhold info version-id`
|
||||
.. |alias-3| replace:: :mc-cmd-option:`~mc legalhold info TARGET`
|
||||
|
||||
.. mc-cmd:: info
|
||||
|
||||
Retrieves the legal hold status of an object or object(s).
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc legalhold info [FLAGS] TARGET
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to the object or bucket on which to retrieve
|
||||
the legal hold status. Specify the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3-compatible service as the prefix to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block::
|
||||
|
||||
mc legalhold set play/mybucket/myobject.txt
|
||||
|
||||
If you specify a path to a bucket or bucket prefix, you must also
|
||||
specify :mc-cmd-option:`mc legalhold set recursive`.
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Retrieves the legal hold from all objects in the
|
||||
:mc-cmd:`~mc legalhold set TARGET` bucket or bucket prefix.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc-3
|
||||
:end-before: end-rewind-desc-3
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc-3
|
||||
:end-before: end-version-id-desc-3
|
||||
|
27
source/reference/minio-cli/minio-mc/mc-lock.rst
Normal file
27
source/reference/minio-cli/minio-mc/mc-lock.rst
Normal file
@ -0,0 +1,27 @@
|
||||
===========
|
||||
``mc lock``
|
||||
===========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. mc:: mc lock
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-lock-desc
|
||||
|
||||
The :mc:`mc lock` command sets or gets the bucket default object lock
|
||||
configuration. Object locking enables Write-Once Read-Many (WORM)
|
||||
object retention for a configurable period of time.
|
||||
|
||||
.. end-mc-lock-desc
|
||||
|
||||
.. admonition:: DEPRECATED
|
||||
:class: important
|
||||
|
||||
:mc:`mc lock` was deprecated in :release:`RELEASE.2020-09-18T00-13-21Z`. Use
|
||||
:mc:`mc retention` to set, retrieve, or clear the bucket default object lock
|
||||
configuration.
|
||||
|
||||
For older versions of :program:`mc`, use ``mc lock --help`` for usage.
|
160
source/reference/minio-cli/minio-mc/mc-ls.rst
Normal file
160
source/reference/minio-cli/minio-mc/mc-ls.rst
Normal file
@ -0,0 +1,160 @@
|
||||
=========
|
||||
``mc ls``
|
||||
=========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc ls
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-ls-desc
|
||||
|
||||
The :mc:`mc ls` command lists all buckets and objects on the target
|
||||
S3-compatible service. For targets on a filesystem, :mc:`mc ls` has the same
|
||||
functionality as the ``ls`` command.
|
||||
|
||||
.. end-mc-ls-desc
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
List Bucket Contents
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc ls <mc ls TARGET>` to list the contents of a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ls [--recursive] ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc ls TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc ls TARGET>` with the path to the bucket on the
|
||||
S3-compatible host.
|
||||
|
||||
If specifying the path to the S3 root (``ALIAS`` only), include the
|
||||
:mc-cmd-option:`~mc ls recursive` option.
|
||||
|
||||
List Object Versions
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd-option:`mc ls versions` to list all versions of an object:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ls --versions ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc ls TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc ls TARGET>` with the path to the bucket or object on
|
||||
the S3-compatible host.
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versioning-admonition
|
||||
:end-before: end-versioning-admonition
|
||||
|
||||
List Bucket Contents at Point in Time
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd-option:`mc ls versions` to list all versions of an object:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ls --rewind DURATION ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc ls TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc ls TARGET>` with the path to the bucket or object on
|
||||
the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc ls rewind>` with the point-in-time in the past
|
||||
at which the command returns the object. For example, specify ``30d`` to
|
||||
return the version of the object 30 days prior to the current date.
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versioning-admonition
|
||||
:end-before: end-versioning-admonition
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. Replacement substitutions
|
||||
|
||||
.. |command| replace:: :mc-cmd:`mc ls`
|
||||
.. |rewind| replace:: :mc-cmd-option:`~mc ls rewind`
|
||||
.. |versions| replace:: :mc-cmd-option:`~mc ls versions`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc ls TARGET`
|
||||
|
||||
:mc-cmd:`mc ls` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ls [FLAGS] TARGET [TARGET ...]
|
||||
|
||||
:mc-cmd:`mc ls` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to one or more locations whose contents the command
|
||||
lists.
|
||||
|
||||
- To list the root contents of an S3-compatible service, specify the
|
||||
:mc-cmd:`alias <mc alias>` of that service. For example:
|
||||
``mc ls play``
|
||||
|
||||
- To list the contents of a bucket on an S3-compatible service,
|
||||
specify the :mc-cmd:`alias <mc alias>` of that service as a prefix to
|
||||
the bucket. For example: ``mc ls play/mybucketname``.
|
||||
|
||||
- To list the contents of a directory on a filesystem, specify the path
|
||||
to that directory. For example: ``mc ls ~/Documents``.
|
||||
|
||||
If specifying multiple ``TARGET`` locations, :mc-cmd:`mc ls` collates
|
||||
the contents of each location sequentially.
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively lists the contents of each bucket or directory in the
|
||||
:mc-cmd:`~mc ls TARGET`.
|
||||
|
||||
.. mc-cmd:: versions
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versions-desc
|
||||
:end-before: end-versions-desc
|
||||
|
||||
Use :mc-cmd-option:`~mc ls versions` and
|
||||
:mc-cmd-option:`~mc ls rewind` together to display on those object
|
||||
versions which existed at a specific point in time.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc
|
||||
:end-before: end-rewind-desc
|
||||
|
||||
Use :mc-cmd-option:`~mc ls rewind` and
|
||||
:mc-cmd-option:`~mc ls versions` together to display on those object
|
||||
versions which existed at a specific point in time.
|
||||
|
||||
.. mc-cmd:: incomplete, -I
|
||||
:option:
|
||||
|
||||
Returns any incomplete uploads on the specified :mc-cmd:`~mc ls TARGET`
|
||||
bucket.
|
105
source/reference/minio-cli/minio-mc/mc-mb.rst
Normal file
105
source/reference/minio-cli/minio-mc/mc-mb.rst
Normal file
@ -0,0 +1,105 @@
|
||||
=========
|
||||
``mc mb``
|
||||
=========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc mb
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-mb-desc
|
||||
|
||||
The :mc:`mc mb` command creates a new bucket or directory at the
|
||||
specified path. For targets on an S3-compatible service, :mc:`mc mb`
|
||||
creates a new bucket. For targets on a filesystem, :mc:`mc mb` has
|
||||
equivalent functionality to ``mkdir -p``.
|
||||
|
||||
.. end-mc-mb-desc
|
||||
|
||||
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
|
||||
:s3-docs:`100 buckets <BucketRestrictions.html>`. :mc:`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.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Create Bucket
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc mb` to create a bucket on an S3-compatible host. The
|
||||
:mc-cmd-option:`~mc mb with-lock` option creates the bucket with locking
|
||||
enabled:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc mb --with-lock ALIAS/BUCKET
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc mb TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`BUCKET <mc mb TARGET>` with the bucket to create.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`~mc mb` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc mb [FLAGS] TARGET [TARGET...]
|
||||
|
||||
:mc:`~mc mb` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to the bucket or directory to create. If
|
||||
creating a directory on a filesystem, :mc:`mc mb` creates all required
|
||||
folders in the specified path similar to ``mkdir -p``.
|
||||
|
||||
To create a bucket, specify the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3 service as the prefix to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc mb [FLAGS] play/mybucket
|
||||
|
||||
.. mc-cmd:: region
|
||||
:option:
|
||||
|
||||
The region in which to create the specified bucket. Has no effect if the
|
||||
specified :mc-cmd:`~mc mb TARGET` is a filesystem directory.
|
||||
|
||||
.. mc-cmd:: ignore-existing, p
|
||||
:option:
|
||||
|
||||
Directs :mc-cmd:`mc mb` to do nothing if the bucket or directory already
|
||||
exists.
|
||||
|
||||
.. mc-cmd:: with-lock, l
|
||||
:option:
|
||||
|
||||
Enables object locking on the specified bucket. Has no effect if the
|
||||
specified :mc-cmd:`~mc mb TARGET` is a filesystem directory.
|
||||
|
||||
.. important::
|
||||
|
||||
You can *only* enable object locking when creating the bucket.
|
||||
You cannot use features like Bucket Lifecycle Management,
|
||||
Bucket Object Retention, or Bucket Legal Hold if object locking is
|
||||
disabled for a bucket.
|
||||
|
237
source/reference/minio-cli/minio-mc/mc-mirror.rst
Normal file
237
source/reference/minio-cli/minio-mc/mc-mirror.rst
Normal file
@ -0,0 +1,237 @@
|
||||
=============
|
||||
``mc mirror``
|
||||
=============
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc mirror
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-mirror-desc
|
||||
|
||||
The :mc:`mc mirror` command synchronizes content to an S3-compatible host,
|
||||
similar to the ``rsync`` utility. :mc:`mc mirror` supports both filesystems and
|
||||
S3-compatible hosts as the synchronization source.
|
||||
|
||||
.. end-mc-mirror-desc
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Mirror a Local Directory to an S3-Compatible Host
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc mirror` to mirror files from a filesystem to an S3 Host:
|
||||
|
||||
.. code-block::
|
||||
:class: copyable
|
||||
|
||||
mc mirror FILEPATH ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`FILEPATH <mc mirror SOURCE>` with the full file path to the
|
||||
directory to mirror.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc mirror TARGET>` with the :mc-cmd:`alias <mc alias>`
|
||||
of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc mirror TARGET>` with the destination bucket.
|
||||
|
||||
Continuously Mirror a Local Directory to an S3-Compatible Host
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc watch` with :mc-cmd-option:`~mc mirror watch` to continuously mirror
|
||||
files from a filesystem to an S3-compatible host:
|
||||
|
||||
.. code-block::
|
||||
:class: copyable
|
||||
|
||||
mc mirror FILEPATH ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`FILEPATH <mc mirror SOURCE>` with the full file path to the
|
||||
directory to mirror.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc mirror TARGET>` with the :mc-cmd:`alias <mc alias>`
|
||||
of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc mirror TARGET>` with the destination bucket.
|
||||
|
||||
Continuously Mirror S3 Bucket to an S3-Compatible Host
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc mirror` with :mc-cmd-option:`~mc mirror watch` to continuously
|
||||
mirror objects in a bucket on one S3-compatible host to another S3-compatible
|
||||
host.
|
||||
|
||||
.. code-block::
|
||||
:class: copyable
|
||||
|
||||
mc mirror --watch SRCALIAS/SRCPATH TGTALIAS/TGTPATH
|
||||
|
||||
- Replace :mc-cmd:`SRCALIAS <mc mirror SOURCE>` with :mc-cmd:`alias <mc alias>`
|
||||
of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`SRCPATH <mc mirror SOURCE>` with the bucket to mirror.
|
||||
|
||||
- Replace :mc-cmd:`TGTALIAS <mc mirror TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`TGTPATH <mc mirror TARGET>` with the destination bucket.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`~mc mirror` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc mirror [FLAGS] SOURCE TARGET
|
||||
|
||||
:mc:`~mc mirror` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: SOURCE
|
||||
|
||||
*REQUIRED*
|
||||
|
||||
The file(s) or object(s) to synchronize to the :mc-cmd:`~mc mirror TARGET`
|
||||
S3 host.
|
||||
|
||||
For objects on S3-compatible hosts, specify the path to the object as
|
||||
``ALIAS/PATH``, where:
|
||||
|
||||
- ``ALIAS`` is the :mc:`alias <mc alias>` of a configured S3-compatible host,
|
||||
*and*
|
||||
|
||||
- ``PATH`` is the path to the bucket or object. If specifying a bucket,
|
||||
:mc:`mc mirror` synchronizes all objects in the bucket.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc mirror [FLAGS] play/mybucket/ TARGET
|
||||
|
||||
For files on a filesystem, specify the full filesystem path to the file or
|
||||
directory :
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc mirror [FLAGS] ~/data/ TARGET
|
||||
|
||||
If specifying a directory, :mc-cmd:`mc mirror` synchronizes all files in the
|
||||
directory.
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*REQUIRED*
|
||||
|
||||
The full path to bucket in which :mc:`mc mirror` copies
|
||||
synchronized SOURCE objects. Specify the ``TARGET`` as
|
||||
``ALIAS/PATH``, where:
|
||||
|
||||
- ``ALIAS`` is the :mc:`alias <mc alias>` of a configured S3-compatible
|
||||
host, *and*
|
||||
|
||||
- ``PATH`` is the path to the bucket.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc mirror SOURCE play/mybucket
|
||||
|
||||
:mc:`mc mirror` uses the object or file names from the
|
||||
:mc-cmd:`~mc mirror SOURCE` when synchronizing to the ``TARGET`` bucket.
|
||||
|
||||
.. mc-cmd:: overwrite
|
||||
:option:
|
||||
|
||||
Overwrites object(s) on the :mc-cmd:`~mc mirror TARGET`.
|
||||
|
||||
.. mc-cmd:: remove
|
||||
:option:
|
||||
|
||||
Removes extraneous object(s) on the target.
|
||||
|
||||
.. mc-cmd:: watch, w
|
||||
:option:
|
||||
|
||||
Continuously monitor the :mc-cmd:`~mc mirror SOURCE` path and
|
||||
synchronize changes.
|
||||
|
||||
.. mc-cmd:: region
|
||||
:option:
|
||||
|
||||
Specify the ``string`` region when creating new bucket(s) on the
|
||||
target.
|
||||
|
||||
Defaults to ``"us-east-1"``.
|
||||
|
||||
.. mc-cmd:: preserve, a
|
||||
:option:
|
||||
|
||||
Preserve file system attributes and bucket policy rules of the
|
||||
:mc-cmd:`~mc mirror SOURCE` on the
|
||||
:mc-cmd:`~mc mirror TARGET`.
|
||||
|
||||
.. mc-cmd:: exclude
|
||||
:option:
|
||||
|
||||
Exclude object(s) in the :mc-cmd:`~mc mirror SOURCE` path that
|
||||
match the specified object name pattern.
|
||||
|
||||
.. mc-cmd:: older-than
|
||||
:option:
|
||||
|
||||
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).
|
||||
|
||||
.. mc-cmd:: newer-than
|
||||
:option:
|
||||
|
||||
Mirror 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).
|
||||
|
||||
.. mc-cmd:: fake
|
||||
:option:
|
||||
|
||||
Perform a fake mirror operation. Use this operation to perform
|
||||
validate that the :mc:`mc mirror` operation will only
|
||||
mirror the desired objects or buckets.
|
||||
|
||||
.. mc-cmd:: storage-class, sc
|
||||
:option:
|
||||
|
||||
Set the storage class for the new object(s) on the
|
||||
:mc-cmd:`~mc mirror TARGET`.
|
||||
|
||||
See the Amazon documentation on
|
||||
:aws-docs:`Storage Classes <AmazonS3/latest/dev/storage-class-intro.html>`
|
||||
for more information on S3 storage classses.
|
||||
|
||||
.. mc-cmd:: encrypt-key
|
||||
:option:
|
||||
|
||||
Encrypt or decrypt objects using server-side encryption with
|
||||
client-specified keys. Specify key-value pairs as ``KEY=VALUE``.
|
||||
|
||||
- Each ``KEY`` represents a bucket or object.
|
||||
- Each ``VALUE`` represents the data key to use for encrypting
|
||||
object(s).
|
||||
|
||||
Enclose the entire list of key-value pairs passed to
|
||||
:mc-cmd-option:`~mc mirror encrypt-key` in double quotes ``"``.
|
||||
|
||||
:mc-cmd-option:`~mc mirror encrypt-key` can use the ``MC_ENCRYPT_KEY``
|
||||
environment variable for retrieving a list of encryption key-value pairs
|
||||
as an alternative to specifying them on the command line.
|
||||
|
||||
You can only delete encrypted objects if you specify the correct
|
||||
:mc-cmd-option:`~mc mirror encrypt-key` secret key.
|
||||
|
270
source/reference/minio-cli/minio-mc/mc-mv.rst
Normal file
270
source/reference/minio-cli/minio-mc/mc-mv.rst
Normal file
@ -0,0 +1,270 @@
|
||||
=========
|
||||
``mc mv``
|
||||
=========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc mv
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-mv-desc
|
||||
|
||||
The :mc:`mc mv` command moves data from one or more sources to a target
|
||||
S3-compatible service.
|
||||
|
||||
.. end-mc-mv-desc
|
||||
|
||||
Checksum Verification
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc:`mc mv` verifies all move operations to object storage using MD5SUM
|
||||
checksums.
|
||||
|
||||
Resume Move Operations
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd-option:`mc mv continue` to resume an interrupted or failed
|
||||
move operation from the point of failure.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Move Files from Filesystem to S3-Compatible Host
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc mv [--recursive] FILEPATH ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`FILEPATH <mc mv SOURCE>` with the full file path to the
|
||||
file to move.
|
||||
|
||||
If specifying the path to a directory, include the
|
||||
:mc-cmd-option:`~mc mv recursive` flag.
|
||||
|
||||
:mc:`mc mv` *removes* the files from the source after
|
||||
successfully moving it to the destination.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc mv TARGET>` with the :mc-cmd:`alias <mc alias>`
|
||||
of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc mv TARGET>` with the destination bucket.
|
||||
|
||||
Move a File from Filesystem to S3-Compatible Host with Custom Metadata
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc mv` with the :mc-cmd-option:`~mc mv attr` option to set custom
|
||||
attributes on file(s).
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc mv --attr "ATTRIBUTES" FILEPATH ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`FILEPATH <mc mv SOURCE>` with the full file path to the
|
||||
file to move. :mc:`mc mv` *removes* the file from the source after
|
||||
successfully moving it to the destination.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc mv TARGET>` with the :mc-cmd:`alias <mc alias>`
|
||||
of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc mv TARGET>` with the destination bucket.
|
||||
|
||||
- Replace :mc-cmd:`ATTRIBUTES <mc mv attr>` with one or more comma-separated
|
||||
key-value pairs ``KEY=VALUE``. Each pair represents one attribute key and
|
||||
value.
|
||||
|
||||
Move Bucket Between S3-Compatible Services
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc mv --recursive SRCALIAS/SRCPATH TGTALIAS/TGTPATH
|
||||
|
||||
- Replace :mc-cmd:`SRCALIAS <mc mv SOURCE>` with the :mc-cmd:`alias <mc alias>`
|
||||
of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`SRCPATH <mc mv SOURCE>` with the path to the bucket.
|
||||
:mc:`mc mv` *removes* the bucket and its contents from the source after
|
||||
successfully moving it to the destination.
|
||||
|
||||
- Replace :mc-cmd:`TGTALIAS <mc mv TARGET>` with the :mc-cmd:`alias <mc alias>`
|
||||
of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`TGTPATH <mc mv TARGET>` with the path to the bucket.
|
||||
|
||||
|
||||
Move File to S3-Compatible Host with Specific Storage Class
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc mv` with the :mc-cmd-option:`~mc mv storage-class` option to set
|
||||
the storage class on the destination S3-compatible host.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc mv --storage-class CLASS FILEPATH ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`CLASS <mc mv storage-class>` with the storage class to
|
||||
associate to the files.
|
||||
|
||||
- Replace :mc-cmd:`FILEPATH <mc mv SOURCE>` with the full file path to the
|
||||
file to move. :mc:`mc mv` *removes* the file from the source after
|
||||
successfully moving it to the destination.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc mv TARGET>` with the :mc-cmd:`alias <mc alias>`
|
||||
of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc mv TARGET>` with the destination bucket.
|
||||
|
||||
- Replace :mc-cmd:`ATTRIBUTES <mc mv attr>` with one or more comma-separated
|
||||
key-value pairs ``KEY=VALUE``. Each pair represents one attribute key and
|
||||
value.
|
||||
|
||||
mc mv --storage-class REDUCED_REDUNDANCY myobject.txt play/mybucket
|
||||
|
||||
|
||||
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`~mc mv` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc mv [FLAGS] SOURCE [SOURCE...] TARGET
|
||||
|
||||
:mc:`~mc mv` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: SOURCE
|
||||
|
||||
*REQUIRED*
|
||||
|
||||
The object or objects to move. You can specify both local paths
|
||||
and S3 paths using a configured S3 service :mc:`alias <mc alias>`.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
mc mv play/mybucket/object.txt ~/localfiles/mybucket/object.txt TARGET
|
||||
|
||||
If you specify a directory or bucket to :mc-cmd:`~mc mv SOURCE`, you must
|
||||
also specify :mc-cmd-option:`~mc mv recursive` to recursively move the
|
||||
contents of that directory. If you omit the :mc-cmd-option:`~mc mv recursive`
|
||||
argument, :mc:`~mc mv` only moves objects in the top level of the specified
|
||||
directory or bucket.
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*REQUIRED*
|
||||
|
||||
The full path to the bucket to move the specified
|
||||
:mc-cmd:`~mc mv SOURCE` to. Specify the :mc:`alias <mc alias>`
|
||||
of a configured S3 service as the prefix to the
|
||||
:mc-cmd:`~mc mv TARGET` path.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc mv ~/localfiles/object.txt play/mybucket/
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively move the contents of each bucket or directory
|
||||
:mc-cmd:`~mc mv SOURCE` to the :mc-cmd:`~mc mv TARGET`
|
||||
bucket.
|
||||
|
||||
.. mc-cmd:: older-than
|
||||
:option:
|
||||
|
||||
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).
|
||||
|
||||
.. mc-cmd:: newer-than
|
||||
:option:
|
||||
|
||||
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).
|
||||
|
||||
.. mc-cmd:: storage-class, sc
|
||||
:option:
|
||||
|
||||
Set the storage class for the new object(s) on the
|
||||
:mc-cmd:`~mc mv TARGET`.
|
||||
|
||||
See the Amazon documentation on
|
||||
:aws-docs:`Storage Classes <AmazonS3/latest/dev/storage-class-intro.html>`
|
||||
for more information on S3 storage classses.
|
||||
|
||||
.. mc-cmd:: preserve, a
|
||||
:option:
|
||||
|
||||
Preserve file system attributes and bucket policy rules of the
|
||||
:mc-cmd:`~mc mv SOURCE` directories, buckets, and objects on the
|
||||
:mc-cmd:`~mc mv TARGET` bucket(s).
|
||||
|
||||
.. mc-cmd:: attr
|
||||
:option:
|
||||
|
||||
Add custom metadata for the object. Specify key-value pairs as
|
||||
``KEY=VALUE\;``. For example,
|
||||
``--attr key1=value1\;key2=value2\;key3=value3``.
|
||||
|
||||
.. mc-cmd:: continue, c
|
||||
:option:
|
||||
|
||||
Create or resume a move session.
|
||||
|
||||
.. mc-cmd:: encrypt
|
||||
:option:
|
||||
|
||||
Encrypt or decrypt objects using server-side encryption with
|
||||
server-managed keys. Specify key-value pairs as ``KEY=VALUE``.
|
||||
|
||||
- Each ``KEY`` represents a bucket or object.
|
||||
- Each ``VALUE`` represents the data key to use for encrypting
|
||||
object(s).
|
||||
|
||||
Enclose the entire list of key-value pairs passed to
|
||||
:mc-cmd-option:`~mc mv encrypt` in double-quotes ``"``.
|
||||
|
||||
:mc-cmd-option:`~mc mv encrypt` can use the ``MC_ENCRYPT`` environment
|
||||
variable for retrieving a list of encryption key-value pairs as an
|
||||
alternative to specifying them on the command line.
|
||||
|
||||
.. mc-cmd:: encrypt-key
|
||||
:option:
|
||||
|
||||
Encrypt or decrypt objects using server-side encryption with
|
||||
client-specified keys. Specify key-value pairs as ``KEY=VALUE``.
|
||||
|
||||
- Each ``KEY`` represents a bucket or object.
|
||||
- Each ``VALUE`` represents the data key to use for encrypting
|
||||
object(s).
|
||||
|
||||
Enclose the entire list of key-value pairs passed to
|
||||
:mc-cmd-option:`~mc mv encrypt-key` in double quotes ``"``.
|
||||
|
||||
:mc-cmd-option:`~mc mv encrypt-key` can use the ``MC_ENCRYPT_KEY``
|
||||
environment variable for retrieving a list of encryption key-value pairs
|
||||
as an alternative to specifying them on the command line.
|
||||
|
||||
|
||||
|
271
source/reference/minio-cli/minio-mc/mc-policy.rst
Normal file
271
source/reference/minio-cli/minio-mc/mc-policy.rst
Normal file
@ -0,0 +1,271 @@
|
||||
=============
|
||||
``mc policy``
|
||||
=============
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc policy
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-policy-desc
|
||||
|
||||
The :mc:`mc policy` command supports setting or removing anonymous
|
||||
policies to a bucket and its contents using AWS S3
|
||||
:s3-docs:`JSON policies <using-iam-policies>`. Buckets with anonymous
|
||||
policies allow public access where clients can perform any action
|
||||
granted by the policy without.
|
||||
|
||||
.. end-mc-policy-desc
|
||||
|
||||
You can set or remove policies on individual folders or objects inside of a
|
||||
bucket for more granular control over anonymous access to a bucket's
|
||||
contents.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Get Current Anonymous Policy for Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc policy get` to retrieve the current anonymous policy for a
|
||||
bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy get ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc policy get TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc policy get TARGET>` with the destination bucket.
|
||||
|
||||
Use :mc-cmd:`mc policy get-json` to retrieve the
|
||||
:s3-docs:`IAM JSON policy document <using-iam-policies>` of a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy get-json ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc policy get-json TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc policy get-json TARGET>` with the destination
|
||||
bucket.
|
||||
|
||||
Set Anonymous Policy for Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc policy set` to set the anonymous policy for a
|
||||
bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy set POLICY ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`POLICY <mc policy set PERMISSION>` with a supported
|
||||
:mc-cmd:`permission <mc policy set PERMISSION>`.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc policy set TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc policy set TARGET>` with the destination bucket.
|
||||
|
||||
Use :mc-cmd:`mc policy set-json` to use a
|
||||
:s3-docs:`IAM JSON policy document <using-iam-policies>` to set the anonymous
|
||||
policy for a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy set-json POLICY ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`POLICY <mc policy set-json FILE>` with the JSON-formatted
|
||||
IAM policy document to use for setting the anonymous policy.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc policy set-json TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc policy set-json TARGET>` with the destination
|
||||
bucket.
|
||||
|
||||
Remove Anonymous Policy for Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc policy set` to clear the anonymous policy for a
|
||||
bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy set none ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc policy set TARGET>` with the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc policy set TARGET>` with the destination bucket.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`~mc policy` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc policy COMMAND [ARGUMENTS]
|
||||
|
||||
:mc:`~mc policy` supports the following commands:
|
||||
|
||||
.. mc-cmd:: set
|
||||
:fullpath:
|
||||
|
||||
Adds one of the following built-in policies to the specified
|
||||
bucket. The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy set PERMISSION TARGET
|
||||
|
||||
The command requires the following arguments:
|
||||
|
||||
.. mc-cmd:: PERMISSION
|
||||
|
||||
Name of the policy to assign to the specified ``TARGET``
|
||||
|
||||
:mc-cmd:`mc policy set PERMISSION` supports the following built-in
|
||||
policies:
|
||||
|
||||
- ``none`` - Disable anonymous access to the ``TARGET``.
|
||||
- ``download`` - Enable download-only access to the ``TARGET``.
|
||||
- ``upload`` - Enable upload-only access to the ``TARGET``.
|
||||
- ``public`` - Enable download and upload access to the ``TARGET``.
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the bucket, folder, or object to which the command
|
||||
applies the specified :mc-cmd:`~mc policy set PERMISSION`. Specify the
|
||||
:mc:`alias <mc alias>` of a configured S3 service as the
|
||||
prefix to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc set public play/mybucket
|
||||
|
||||
.. mc-cmd:: set-json
|
||||
:fullpath:
|
||||
|
||||
Adds an AWS S3 :s3-docs:`JSON policy <using-iam-policies>` to the
|
||||
specified bucket. The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy set-json FILE TARGET
|
||||
|
||||
The command requires the following arguments:
|
||||
|
||||
.. mc-cmd:: FILE
|
||||
|
||||
The full path to the S3 policy ``.json`` file which the
|
||||
command applies to the specified :mc-cmd:`~mc policy set-json TARGET`
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the bucket, folder, or object to which the command applies
|
||||
the specified :mc-cmd:`~mc policy set-json FILE` S3 policy document.
|
||||
Specify the :mc:`alias <mc alias>` of a configured S3 service as the
|
||||
prefix to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc set public play/mybucket
|
||||
|
||||
.. mc-cmd:: get
|
||||
:fullpath:
|
||||
|
||||
Prints the current anonymous policy for the specified bucket, folder,
|
||||
or object on the console.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy get TARGET
|
||||
|
||||
The command requires the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the bucket, folder, or object for which the command
|
||||
returns the current anonymous policy. Specify the :mc:`alias <mc alias>`
|
||||
of a configured S3 service as the prefix to the ``TARGET`` path. For
|
||||
example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc set public play/mybucket
|
||||
|
||||
.. mc-cmd:: get-json
|
||||
:fullpath:
|
||||
|
||||
Returns the current anonymous policy for the specified bucket, folder,
|
||||
or object in ``JSON`` format.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy get-json TARGET
|
||||
|
||||
The command requires the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the bucket, folder, or object for which the command
|
||||
returns the current anonymous policy JSON document. Specify the :mc:`alias
|
||||
<mc alias>` of a configured S3 service as the prefix to the ``TARGET``
|
||||
path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc set public play/mybucket
|
||||
|
||||
.. mc-cmd:: list
|
||||
:fullpath:
|
||||
|
||||
Prints the anonymous policy for the specified bucket and any folders
|
||||
or objects with a different anonymous policy from the bucket.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy list TARGET
|
||||
|
||||
The command requires the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the bucket, folder, or object for which the command
|
||||
returns the current anonymous policy JSON document. Specify the :mc:`alias
|
||||
<mc alias>` of a configured S3 service as the prefix to the ``TARGET``
|
||||
path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc set public play/mybucket
|
||||
|
||||
|
||||
|
73
source/reference/minio-cli/minio-mc/mc-rb.rst
Normal file
73
source/reference/minio-cli/minio-mc/mc-rb.rst
Normal file
@ -0,0 +1,73 @@
|
||||
=========
|
||||
``mc rb``
|
||||
=========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc rb
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-rb-desc
|
||||
|
||||
The :mc:`mc rb` command removes a bucket and all its contents on the target
|
||||
S3-compatible service.
|
||||
|
||||
Removing a bucket with :mc:`mc rb` also removes any configurations associated to
|
||||
that bucket. To remove only the contents of a bucket, use :mc:`mc rm` instead.
|
||||
|
||||
.. end-mc-rb-desc
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
Remove a Bucket
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc rb ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc rb TARGET>` with the :mc-cmd:`alias <mc alias>` of
|
||||
a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc rb TARGET>` with the path to the bucket to remove.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`~mc rb` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc rb [FLAGS] TARGET [TARGET...]
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*REQUIRED*
|
||||
|
||||
The full path to the bucket to remove. Specify ``TARGET`` as
|
||||
``ALIAS/PATH``, where:
|
||||
|
||||
- ``ALIAS`` is the :mc:`alias <mc alias>` of a configured S3-compatible
|
||||
host, *and*
|
||||
|
||||
- ``PATH`` is the path to the bucket.
|
||||
|
||||
.. mc-cmd:: force
|
||||
:option:
|
||||
|
||||
Allows running :mc:`mc rb` on a bucket with versioning enabled.
|
||||
|
||||
.. mc-cmd:: dangerous
|
||||
:option:
|
||||
|
||||
Allows running :mc:`mc rb` when the :mc-cmd:`~mc rb TARGET` specifies the
|
||||
root (all buckets) on the S3-compatible service.
|
60
source/reference/minio-cli/minio-mc/mc-replicate.rst
Normal file
60
source/reference/minio-cli/minio-mc/mc-replicate.rst
Normal file
@ -0,0 +1,60 @@
|
||||
================
|
||||
``mc replicate``
|
||||
================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc replicate
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-replicate-desc
|
||||
|
||||
The :mc:`mc replicate` command configures server-side bucket replication
|
||||
between MinIO deployments.
|
||||
|
||||
.. end-mc-replicate-desc
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
TBD
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. mc-cmd:: add
|
||||
:fullpath:
|
||||
|
||||
Adds a new server-side replication configuration rule for a bucket.
|
||||
|
||||
.. mc-cmd:: set
|
||||
:fullpath:
|
||||
|
||||
Modifies an existing server-side replication configuration rule.
|
||||
|
||||
.. mc-cmd:: ls
|
||||
:fullpath:
|
||||
|
||||
Lists configured server-side replication configuration rules.
|
||||
|
||||
.. mc-cmd:: export
|
||||
:fullpath:
|
||||
|
||||
Exports a server-side replication configuration rule.
|
||||
|
||||
.. mc-cmd:: import
|
||||
:fullpath:
|
||||
|
||||
Imports a server-side replication configuration rule in JSON format.
|
||||
|
||||
.. mc-cmd:: rm
|
||||
:fullpath:
|
||||
|
||||
Removes a server-side replication rule.
|
587
source/reference/minio-cli/minio-mc/mc-retention.rst
Normal file
587
source/reference/minio-cli/minio-mc/mc-retention.rst
Normal file
@ -0,0 +1,587 @@
|
||||
================
|
||||
``mc retention``
|
||||
================
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc retention
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-retention-desc
|
||||
|
||||
The :mc:`mc retention` command configures the Write-Once Read-Many (WORM) object
|
||||
lock 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. For more information on MinIO
|
||||
object locking and data retention, see <link>.
|
||||
|
||||
.. end-mc-retention-desc
|
||||
|
||||
.. note::
|
||||
|
||||
Starting in version :release:`RELEASE.2020-09-18T00-13-21Z`,
|
||||
:mc:`mc retention` fully replaces :mc:`mc lock` for setting the default
|
||||
object lock settings for a bucket.
|
||||
|
||||
Use :mc-cmd:`mc retention set` with the
|
||||
:mc-cmd-option:`~mc retention set default` option to set the default
|
||||
object lock settings for a bucket.
|
||||
|
||||
Bucket Must Enable Object Locking
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc:`mc retention` *requires* that the specified bucket has object locking
|
||||
enabled. You can **only** enable object locking at bucket creation. See
|
||||
:mc-cmd-option:`mc mb with-lock` for documentation on creating buckets with
|
||||
object locking enabled.
|
||||
|
||||
Retention of Object Versions
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For buckets with :mc:`versioning enabled <mc version>`, :mc:`mc retention` by
|
||||
default operates on the *latest* version of the target object or object(s).
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 50 50
|
||||
:width: 100%
|
||||
|
||||
* - Operate on Multiple Versions
|
||||
- Operate on Single Version
|
||||
|
||||
* - | :mc-cmd-option:`mc retention set versions`
|
||||
| :mc-cmd-option:`mc retention clear versions`
|
||||
| :mc-cmd-option:`mc retention info versions`
|
||||
|
||||
- | :mc-cmd-option:`mc retention set version-id`
|
||||
| :mc-cmd-option:`mc retention clear version-id`
|
||||
| :mc-cmd-option:`mc retention info version-id`
|
||||
|
||||
Interaction with Legal Holds
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Locking an object prevents any modification or deletion of that
|
||||
object, similar to the :mc-cmd:`COMPLIANCE <mc retention set MODE>` 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-cmd:`mc legalhold`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Set Default Bucket Retention Settings
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc retention set` with the
|
||||
:mc-cmd-option:`~mc retention set recursive` and
|
||||
:mc-cmd-option:`~mc retention set default` to set the default bucket
|
||||
retention settings.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention --recursive --default set ALIAS/PATH MODE DURATION
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc retention set TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc retention set TARGET>` with the path to the bucket.
|
||||
|
||||
- Replace :mc-cmd:`MODE <mc retention set MODE>` with the retention mode to
|
||||
enable. MinIO supports the AWS S3 retention modes ``governance`` and
|
||||
``compliance``.
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc retention set VALIDITY>` with the duration which
|
||||
the object lock should remain in effect. For example, to set a retention
|
||||
period of 30 days, specify ``30d``
|
||||
|
||||
.. include:: /includes/facts-locking.rst
|
||||
:start-after: start-command-requires-locking-desc
|
||||
:end-before: end-command-requires-locking-desc
|
||||
|
||||
Set Object Lock Configuration for Versioned Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: Specific Version
|
||||
|
||||
Use :mc-cmd:`mc retention set` with
|
||||
:mc-cmd-option:`~mc retention set version-id` to apply the retention
|
||||
settings to a specific object version:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention set --version-id VERSION ALIAS/PATH MODE DURATION
|
||||
|
||||
- Replace :mc-cmd:`VERSION <mc retention set version-id>` with the version
|
||||
of the object.
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc retention set TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc retention set TARGET>` with the path to the object.
|
||||
|
||||
- Replace :mc-cmd:`MODE <mc retention set MODE>` with the retention mode
|
||||
to enable. MinIO supports the AWS S3 retention modes ``governance`` and
|
||||
``compliance``.
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc retention set VALIDITY>` with the duration
|
||||
which the object lock should remain in effect. For example, to set a
|
||||
retention period of 30 days, specify ``30d``
|
||||
|
||||
.. tab:: All Versions
|
||||
|
||||
Use :mc-cmd:`mc retention set` with
|
||||
:mc-cmd-option:`~mc retention set versions` to apply the retention
|
||||
settings to a specific object version:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention set --versions ALIAS/PATH MODE DURATION
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc retention set TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc retention set TARGET>` with the path to the object.
|
||||
|
||||
- Replace :mc-cmd:`MODE <mc retention set MODE>` with the retention mode
|
||||
to enable. MinIO supports the AWS S3 retention modes ``governance`` and
|
||||
``compliance``.
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc retention set VALIDITY>` with the duration
|
||||
which the object lock should remain in effect. For example, to set a
|
||||
retention period of 30 days, specify ``30d``
|
||||
|
||||
|
||||
.. include:: /includes/facts-locking.rst
|
||||
:start-after: start-command-requires-locking-desc
|
||||
:end-before: end-command-requires-locking-desc
|
||||
|
||||
Retrieve Object Lock Settings for an Object or Object(s)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: Specific Object
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention info ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc retention info TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc retention info TARGET>` with the path to the
|
||||
object.
|
||||
|
||||
.. tab:: Multiple Objects
|
||||
|
||||
Use :mc-cmd:`mc retention info` with
|
||||
:mc-cmd-option:`~mc retention info recursive` to retrieve the retention
|
||||
settings for all objects in a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention infoset --recursive ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc retention info TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc retention info TARGET>` with the path to the
|
||||
bucket.
|
||||
|
||||
|
||||
.. include:: /includes/facts-locking.rst
|
||||
:start-after: start-command-requires-locking-desc
|
||||
:end-before: end-command-requires-locking-desc
|
||||
|
||||
Clear Object Lock Settings for an Object or Object(s)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: Specific Object
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention clear ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc retention clear TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc retention clear TARGET>` with the path to the
|
||||
object.
|
||||
|
||||
|
||||
.. tab:: Multiple Objects
|
||||
|
||||
Use :mc-cmd:`mc retention clear` with
|
||||
:mc-cmd-option:`~mc retention clear recursive` to clear the retention
|
||||
settings from all objects in a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention clear --recursive ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc retention clear TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc retention clear TARGET>` with the path to the
|
||||
bucket.
|
||||
|
||||
|
||||
.. include:: /includes/facts-locking.rst
|
||||
:start-after: start-command-requires-locking-desc
|
||||
:end-before: end-command-requires-locking-desc
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. replacements for mc retention set
|
||||
|
||||
.. |command| replace:: :mc-cmd:`mc retention set`
|
||||
.. |rewind| replace:: :mc-cmd-option:`~mc retention set rewind`
|
||||
.. |versionid| replace:: :mc-cmd-option:`~mc retention set version-id`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc retention set TARGET`
|
||||
.. |versions| replace:: :mc-cmd-option:`~mc retention set versions`
|
||||
|
||||
.. mc-cmd:: set
|
||||
:fullpath:
|
||||
|
||||
Sets the object lock settings for the specified
|
||||
:mc-cmd:`~mc retention set TARGET` object.
|
||||
|
||||
:mc-cmd:`mc retention set` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention set [FLAGS] TARGET MODE VALIDITY
|
||||
|
||||
:mc-cmd:`mc retention set` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required*
|
||||
|
||||
The full path to the object or objects for which to set object lock
|
||||
configuration. Specify the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3-compatible service as the prefix to the ``TARGET`` bucket path. For
|
||||
example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc retention play/mybucket/object.txt MODE VALIDITY
|
||||
|
||||
- If the ``TARGET`` specifies a bucket or bucket prefix, include
|
||||
:mc-cmd-option:`~mc retention set recursive` to apply the object lock
|
||||
settings to the bucket contents.
|
||||
|
||||
- If the ``TARGET`` bucket has versioning enabled,
|
||||
:mc-cmd:`mc retention set`
|
||||
by default applies to only the latest object version. Use
|
||||
:mc-cmd-option:`~mc retention set version-id` or
|
||||
:mc-cmd-option:`~mc retention set versions` to apply the object lock
|
||||
settings to a specific version or to all versions of the object.
|
||||
|
||||
.. mc-cmd:: MODE
|
||||
|
||||
Sets the locking mode for the :mc-cmd:`~mc retention set TARGET`.
|
||||
Specify one of the following supported values:
|
||||
|
||||
- ``governance``
|
||||
- ``compliance``
|
||||
|
||||
See the AWS S3 documentation on :s3-docs:`Object Lock Overview
|
||||
<object-lock-overview.html>` for more information on the supported
|
||||
modes.
|
||||
|
||||
Requires specifying :mc-cmd:`~mc retention set VALIDITY`.
|
||||
|
||||
.. mc-cmd:: VALIDITY
|
||||
|
||||
The duration which objects remain in the specified
|
||||
:mc-cmd:`~mc retention set MODE` after creation.
|
||||
|
||||
- For days, specify a string formatted as ``Nd``. For example,
|
||||
``30d`` for 30 days after object creation.
|
||||
|
||||
- For years, specify a string formatted as ``Ny``. For example,
|
||||
``1y`` for 1 year after object creation.
|
||||
|
||||
.. mc-cmd:: bypass
|
||||
:option:
|
||||
|
||||
Allows a user with the ``s3:BypassGovernanceRetention`` permission
|
||||
to modify the object. Requires the ``governance`` retention
|
||||
:mc-cmd:`~mc retention set MODE`
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively applies the object lock settings to all objects in the
|
||||
specified :mc-cmd:`~mc retention set TARGET` path.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`~mc retention set version-id`.
|
||||
|
||||
.. mc-cmd:: default
|
||||
:option:
|
||||
|
||||
Sets the default object lock settings for the bucket specified to
|
||||
:mc-cmd:`~mc retention set TARGET` using the
|
||||
:mc-cmd:`~mc retention set MODE` and :mc-cmd:`~mc retention set VALIDITY`.
|
||||
Any objects created in the bucket inherit the default object lock settings
|
||||
unless explicitly overriden using :mc-cmd:`mc retention set`.
|
||||
|
||||
If specifying :mc-cmd-option:`~mc retention set default`,
|
||||
:mc-cmd:`mc retention set` ignores all other flags.
|
||||
|
||||
Starting in :release:`RELEASE.2020-09-18T00-13-21Z`,
|
||||
:mc-cmd-option:`mc retention set default` replaces the functionality of
|
||||
the deprecated :mc-cmd:`mc lock` command.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc
|
||||
:end-before: end-rewind-desc
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc
|
||||
:end-before: end-version-id-desc
|
||||
|
||||
Mutually exclusive with any of the following flags:
|
||||
|
||||
- :mc-cmd-option:`~mc retention set versions`
|
||||
- :mc-cmd-option:`~mc retention set rewind`
|
||||
- :mc-cmd-option:`~mc retention set recursive`
|
||||
|
||||
.. mc-cmd:: versions
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versions-desc
|
||||
:end-before: end-versions-desc
|
||||
|
||||
Use :mc-cmd-option:`~mc retention set versions` and
|
||||
:mc-cmd-option:`~mc retention set rewind` together to apply the
|
||||
retention settings to all object versions that existed at a
|
||||
specific point-in-time.
|
||||
|
||||
.. |command-2| replace:: :mc-cmd:`mc retention info`
|
||||
.. |rewind-2| replace:: :mc-cmd-option:`~mc retention info rewind`
|
||||
.. |versionid-2| replace:: :mc-cmd-option:`~mc retention info version-id`
|
||||
.. |versions-2| replace:: :mc-cmd-option:`~mc retention info versions`
|
||||
.. |alias-2| replace:: :mc-cmd-option:`~mc retention info TARGET`
|
||||
|
||||
.. mc-cmd:: info
|
||||
:fullpath:
|
||||
|
||||
Returns the current object lock setting for the specified
|
||||
:mc-cmd:`~mc retention info TARGET`.
|
||||
|
||||
:mc-cmd:`mc retention info` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention info [ARGUMENTS] TARGET
|
||||
|
||||
:mc-cmd:`mc retention info` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required*
|
||||
|
||||
The full path to the object for which to retreive
|
||||
the object lock configuration. Specify the :mc-cmd:`alias <mc alias>` of a
|
||||
configured S3-compatible service as the prefix to the ``TARGET`` bucket
|
||||
path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc retention info play/mybucket/object.txt
|
||||
|
||||
- If the ``TARGET`` specifies a bucket or bucket prefix, include
|
||||
:mc-cmd-option:`~mc retention info recursive` to return the object
|
||||
lock settings for all objects in the bucket or bucket prefix.
|
||||
|
||||
- If the ``TARGET`` bucket has versioning enabled,
|
||||
:mc-cmd:`mc retention info` by default applies to only the latest object
|
||||
version. Use :mc-cmd-option:`~mc retention info version-id` or
|
||||
:mc-cmd-option:`~mc retention info versions` to return the object lock
|
||||
settings for a specific version or for all versions of the object.
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively returns the object lock settings for all objects in the
|
||||
specified :mc-cmd:`~mc retention info TARGET` path.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`~mc retention info version-id`.
|
||||
|
||||
.. mc-cmd:: default
|
||||
:option:
|
||||
|
||||
Returns the default object lock settings for the bucket specified to
|
||||
:mc-cmd:`~mc retention info TARGET`.
|
||||
|
||||
If specifying :mc-cmd-option:`~mc retention info default`,
|
||||
:mc-cmd:`mc retention info` ignores all other flags.
|
||||
|
||||
Starting in :release:`RELEASE.2020-09-18T00-13-21Z`,
|
||||
:mc-cmd-option:`mc retention info default` replaces the functionality of
|
||||
the deprecated :mc-cmd:`mc lock` command.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc-2
|
||||
:end-before: end-rewind-desc-2
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc-2
|
||||
:end-before: end-version-id-desc-2
|
||||
|
||||
Mutually exclusive with any of the following flags:
|
||||
|
||||
- :mc-cmd-option:`~mc retention info versions`
|
||||
- :mc-cmd-option:`~mc retention info rewind`
|
||||
- :mc-cmd-option:`~mc retention info recursive`
|
||||
|
||||
.. mc-cmd:: versions
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versions-desc-2
|
||||
:end-before: end-versions-desc-2
|
||||
|
||||
Use :mc-cmd-option:`~mc retention info versions` and
|
||||
:mc-cmd-option:`~mc retention info rewind` together to retrieve the
|
||||
retention settings for all object versions that existed at a
|
||||
specific point-in-time.
|
||||
|
||||
.. |command-3| replace:: :mc-cmd:`mc retention clear`
|
||||
.. |rewind-3| replace:: :mc-cmd-option:`~mc retention clear rewind`
|
||||
.. |versionid-3| replace:: :mc-cmd-option:`~mc retention clear version-id`
|
||||
.. |versions-3| replace:: :mc-cmd-option:`~mc retention clear versions`
|
||||
.. |alias-3| replace:: :mc-cmd-option:`~mc retention clear TARGET`
|
||||
|
||||
.. mc-cmd:: clear
|
||||
:fullpath:
|
||||
|
||||
Clears the object lock setting for the specified ``TARGET``.
|
||||
|
||||
:mc-cmd:`mc retention clear` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention clear [ARGUMENTS] TARGET
|
||||
|
||||
:mc-cmd:`mc retention clear` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to the object or objects for which to clear
|
||||
the object lock configuration. Specify the :mc-cmd:`alias <mc alias>` of a
|
||||
configured S3-compatible service as the prefix to the ``TARGET`` bucket
|
||||
path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc retention clear play/mybucket/object.txt
|
||||
|
||||
- If the ``TARGET`` specifies a bucket or bucket prefix, include
|
||||
:mc-cmd-option:`~mc retention clear recursive` to clear the object lock
|
||||
settings to the bucket contents.
|
||||
|
||||
- If the ``TARGET`` bucket has versioning enabled,
|
||||
:mc-cmd:`mc retention clear` by default applies to only the latest
|
||||
object version. Use :mc-cmd-option:`~mc retention clear version-id` or
|
||||
:mc-cmd-option:`~mc retention clear versions` to clear the object lock
|
||||
settings for a specific version or for all versions of the object.
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively clears the object lock settings for all objects in the
|
||||
specified :mc-cmd:`~mc retention clear TARGET` path.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`~mc retention clear version-id`.
|
||||
|
||||
.. mc-cmd:: default
|
||||
:option:
|
||||
|
||||
Clears the default object lock settings for the bucket specified to
|
||||
:mc-cmd:`~mc retention clear TARGET`.
|
||||
|
||||
If specifying :mc-cmd-option:`~mc retention clear default`,
|
||||
:mc-cmd:`mc retention clear` ignores all other flags.
|
||||
|
||||
Starting in :release:`RELEASE.2020-09-18T00-13-21Z`,
|
||||
:mc-cmd-option:`mc retention clear default` replaces the functionality of
|
||||
the deprecated :mc-cmd:`mc lock` command.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc-3
|
||||
:end-before: end-rewind-desc-3
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc-3
|
||||
:end-before: end-version-id-desc-3
|
||||
|
||||
Mutually exclusive with any of the following flags:
|
||||
|
||||
- :mc-cmd-option:`~mc retention clear versions`
|
||||
- :mc-cmd-option:`~mc retention clear rewind`
|
||||
- :mc-cmd-option:`~mc retention clear recursive`
|
||||
|
||||
.. mc-cmd:: versions
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versions-desc-3
|
||||
:end-before: end-versions-desc-3
|
||||
|
||||
Use :mc-cmd-option:`~mc retention clear versions` and
|
||||
:mc-cmd-option:`~mc retention clear rewind` together to remove the
|
||||
retention settings from all object versions that existed at a
|
||||
specific point-in-time.
|
||||
|
||||
|
||||
|
||||
|
267
source/reference/minio-cli/minio-mc/mc-rm.rst
Normal file
267
source/reference/minio-cli/minio-mc/mc-rm.rst
Normal file
@ -0,0 +1,267 @@
|
||||
=========
|
||||
``mc rm``
|
||||
=========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc rm
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-rm-desc
|
||||
|
||||
The :mc:`mc rm` command removes objects on a target S3-compatible service.
|
||||
To completely remove a bucket, use :mc:`mc rb` instead.
|
||||
|
||||
.. end-mc-rm-desc
|
||||
|
||||
Deleting Bucket Contents
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Using :mc:`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
|
||||
:mc-cmd-option:`default object lock settings <mc retention set default>`.
|
||||
|
||||
To completely remove a bucket, use :mc:`mc rb` instead of :mc:`mc rm`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Remove a Single Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc rm ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc rm TARGET>` with the :mc:`alias <mc alias>` of
|
||||
a configured S3-compatible service.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc rm TARGET>` with the path to the object.
|
||||
|
||||
|
||||
Recursively Remove a Bucket's Contents
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc rm` with the
|
||||
:mc-cmd-option:`~mc rm recursive` and :mc-cmd-option:`~mc rm force` options
|
||||
to recursively remove a bucket's contents.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc rm --recursive --force ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc rm TARGET>` with the :mc:`alias <mc alias>` of
|
||||
a configured S3-compatible service.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc rm TARGET>` with the path to the bucket.
|
||||
|
||||
This operation does *not* remove the bucket. Use :mc:`mc rb` to remove the
|
||||
bucket along with all contents and associated configurations.
|
||||
|
||||
Remove All Incomplete Upload Files for an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc rm` with the :mc-cmd-option:`~mc rm incomplete` option to remove
|
||||
incomplete upload files for an object.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc rm --recursive --force ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc rm TARGET>` with the :mc:`alias <mc alias>` of
|
||||
a configured S3-compatible service.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc rm TARGET>` with the path to the object.
|
||||
|
||||
Removing incomplete upload files prevents resuming the upload using the
|
||||
:mc-cmd-option:`mc mv continue` or :mc-cmd-option:`mc cp continue` commands.
|
||||
|
||||
Roll Object Back To Previous Version
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc rm` with :mc-cmd-option:`~mc rm rewind` to
|
||||
remove all object versions created after the specified point-in-time. This
|
||||
effectively "rolls back" the object to its state at that time.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: moveable
|
||||
|
||||
mc rm --rewind DURATION ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc rm TARGET>` with the :mc:`alias <mc alias>` of
|
||||
a configured S3-compatible service.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc rm TARGET>` with the path to the object.
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc rm rewind>` with the duration in the past to
|
||||
apply the command. For example, to restore an object to its state 30 days
|
||||
in the past, specify ``30d``.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. |command| replace:: :mc-cmd:`mc rm`
|
||||
.. |rewind| replace:: :mc-cmd-option:`~mc rm rewind`
|
||||
.. |versions| replace:: :mc-cmd-option:`~mc rm versions`
|
||||
.. |versionid| replace:: :mc-cmd-option:`~mc rm version-id`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc rm TARGET`
|
||||
|
||||
:mc:`mc rm` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc rm [FLAGS] TARGET [TARGET ...]
|
||||
|
||||
:mc:`~mc rm` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
**REQUIRED**
|
||||
|
||||
The full path to object to remove.
|
||||
Specify the :mc:`alias <mc alias>` of a configured S3 service as the
|
||||
prefix to the :mc-cmd-option:`~mc rm TARGET` path.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc rm play/mybucket/object.txt play/mybucket/otherobject.txt
|
||||
|
||||
If specifying the path to a bucket or bucket prefix, you **must** also
|
||||
specify the :mc-cmd-option:`~mc rm recursive` and
|
||||
:mc-cmd-option:`~mc rm force` arguments. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc rm --recursive --force play/mybucket/
|
||||
|
||||
mc rm --recursive --force play/mybucket/myprefix
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively remove the contents of each :mc-cmd-option:`~mc rm TARGET`
|
||||
bucket or bucket prefix.
|
||||
|
||||
If specifying :mc-cmd-option:`~mc rm recursive`, you **must** also
|
||||
specify :mc-cmd-option:`~mc rm force`.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`mc rm version-id`
|
||||
|
||||
.. mc-cmd:: force
|
||||
:option:
|
||||
|
||||
Allows running :mc:`mc rm` with any of the following arguments:
|
||||
|
||||
- :mc-cmd-option:`~mc rm recursive`
|
||||
- :mc-cmd-option:`~mc rm versions`
|
||||
- :mc-cmd-option:`~mc rm stdin`
|
||||
|
||||
.. mc-cmd:: dangerous
|
||||
:option:
|
||||
|
||||
Allows running :mc:`mc rm` when the :mc-cmd:`~mc rm TARGET` specifies the
|
||||
root (all buckets) on the S3-compatible service.
|
||||
|
||||
.. mc-cmd:: versions
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versions-desc
|
||||
:end-before: end-versions-desc
|
||||
|
||||
Use :mc-cmd-option:`~mc rm versions` and
|
||||
:mc-cmd-option:`~mc rm rewind` together to remove all object
|
||||
versions which existed at a specific point in time.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc
|
||||
:end-before: end-rewind-desc
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc
|
||||
:end-before: end-version-id-desc
|
||||
|
||||
Mutually exclusive with any of the following flags:
|
||||
|
||||
- :mc-cmd-option:`~mc rm versions`
|
||||
- :mc-cmd-option:`~mc rm rewind`
|
||||
- :mc-cmd-option:`~mc rm recursive`
|
||||
|
||||
.. mc-cmd:: older-than
|
||||
:option:
|
||||
|
||||
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).
|
||||
|
||||
.. mc-cmd:: newer-than
|
||||
:option:
|
||||
|
||||
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).
|
||||
|
||||
.. mc-cmd:: incomplete, I
|
||||
:option:
|
||||
|
||||
Remove incomplete uploads for the specified object.
|
||||
|
||||
If any :mc-cmd-option:`~mc rm TARGET` specifies a bucket,
|
||||
you **must** also specify :mc-cmd-option:`~mc rm recursive`
|
||||
and :mc-cmd-option:`~mc rm force`.
|
||||
|
||||
.. mc-cmd:: fake
|
||||
:option:
|
||||
|
||||
Perform a fake remove operation. Use this operation to perform
|
||||
validate that the :mc:`mc rm` operation will only
|
||||
remove the desired objects or buckets.
|
||||
|
||||
.. mc-cmd:: stdin
|
||||
:option:
|
||||
|
||||
Read object names or buckets from ``STDIN``.
|
||||
|
||||
.. mc-cmd:: encrypt-key
|
||||
:option:
|
||||
|
||||
The encryption key to use for performing Server-Side Encryption with Client
|
||||
Keys (SSE-C). Specify comma seperated key-value pairs as ``KEY=VALUE,...``.
|
||||
|
||||
- For ``KEY``, specify the S3-compatible service
|
||||
:mc-cmd:`alias <mc alias>` and full path to the bucket, including any
|
||||
bucket prefixes. Separate the alias and bucket path with a forward slash
|
||||
``\``. For example, ``play/mybucket``
|
||||
|
||||
- For ``VALUE``, specify the data key to use for encryption object(s) in
|
||||
the bucket or bucket prefix specified to ``KEY``.
|
||||
|
||||
:mc-cmd-option:`~mc rm encrypt-key` can use the ``MC_ENCRYPT_KEY``
|
||||
environment variable for populating the list of encryption key-value
|
||||
pairs as an alternative to specifying them on the command line.
|
||||
|
||||
|
||||
|
||||
|
||||
|
286
source/reference/minio-cli/minio-mc/mc-share.rst
Normal file
286
source/reference/minio-cli/minio-mc/mc-share.rst
Normal file
@ -0,0 +1,286 @@
|
||||
============
|
||||
``mc share``
|
||||
============
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc share
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-share-desc
|
||||
|
||||
The :mc:`mc share` command generates temporary URLs with integrated
|
||||
access credentials for uploading or downloading objects to an S3-compatible
|
||||
host. The temporary URL expires after a configurable time limit.
|
||||
|
||||
.. end-mc-share-desc
|
||||
|
||||
For more information on shareable object URLs, see the Amazon S3
|
||||
documentation on :aws-docs:`Pre-Signed URLs
|
||||
<AmazonS3/latest/dev/ShareObjectPreSignedURL.html>`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Generate a CURL GET Command
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: Get Specific Object
|
||||
|
||||
Use :mc-cmd:`mc share download` to generate a URL that supports
|
||||
``GET`` requests for an object:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc share download --expire DURATION ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc share download TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc share download TARGET>` with the path to the
|
||||
object on the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc share download expire>` with the duration
|
||||
after which the URL expires. For example, to set a 30 day expiry,
|
||||
specify ``30d``.
|
||||
|
||||
.. tab:: Get Object(s) in a Bucket
|
||||
|
||||
Use :mc-cmd:`mc share download` with the
|
||||
:mc-cmd-option:`~mc share download recursive` option to generate a URL for
|
||||
each object in a bucket. Each URL supports ``GET`` requests for its
|
||||
associated object:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc share download --recursive --expire DURATION ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc share download TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc share download TARGET>` with the path to the
|
||||
bucket or bucket prefix on the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc share download expire>` with the duration
|
||||
after which the URL expires. For example, to set a 30 day expiry,
|
||||
specify ``30d``.
|
||||
|
||||
Generate a CURL POST Command
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: Upload to Object
|
||||
|
||||
Use :mc-cmd:`mc share upload` to generate a URL that supports
|
||||
``POST`` requests for uploading a file to a specific object location
|
||||
on an S3-compatible host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc share upload --expire DURATION ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc share upload TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc share upload TARGET>` with the path to the
|
||||
object on the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc share upload expire>` with the duration
|
||||
after which the URL expires. For example, to set a 30 day expiry,
|
||||
specify ``30d``.
|
||||
|
||||
.. tab:: Upload File(s) to Bucket
|
||||
|
||||
Use :mc-cmd:`mc share upload` with the
|
||||
:mc-cmd-option:`~mc share upload recursive` option to generate a URL that
|
||||
supports ``POST`` requests for uploading files to a bucket on an
|
||||
S3-compatible host:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc share upload --recursive --expire DURATION ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc share upload TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc share upload TARGET>` with the path to the
|
||||
bucket or bucket prefix on the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`DURATION <mc share upload expire>` with the duration
|
||||
after which the URL expires. For example, to set a 30 day expiry,
|
||||
specify ``30d``.
|
||||
|
||||
The command returns a CURL command for uploading an object to the
|
||||
specified bucket prefix.
|
||||
|
||||
- Replace the ``<FILE>`` string in the returned CURL command with the path
|
||||
to the file to upload.
|
||||
|
||||
- Replace the ``<NAME>`` string in the returned CURL command with the name
|
||||
of the file in the bucket.
|
||||
|
||||
You can use a shell script loop to recursively upload the contents of a
|
||||
filesystem directory to the S3-compatible service:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
for file in ~/Documents/photos/
|
||||
do
|
||||
curl https://play.min.io/mybucket/ \
|
||||
-F policy=AAAAA -F x-amz-algorithm=AWS4-HMAC-SHA256 \
|
||||
-F x-amz-credential=AAAA/us-east-1/s3/aws4_request \
|
||||
-F x-amz-date=20200812T202556Z \
|
||||
-F x-amz-signature=AAAA \
|
||||
-F bucket=rkbucket -F key=mydata/${file} -F file=@${file}
|
||||
|
||||
done
|
||||
|
||||
Defer to the documented best practices for your preferred scripting language
|
||||
for iterating through files in a directory.
|
||||
|
||||
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. |command| replace:: :mc-cmd:`mc share download`
|
||||
.. |versionid| replace:: :mc-cmd-option:`~mc share download version-id`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc share download TARGET`
|
||||
|
||||
.. mc-cmd:: download
|
||||
:fullpath:
|
||||
|
||||
Generates a URL for using an HTTP GET request to retrieve the
|
||||
object(s).
|
||||
|
||||
:mc-cmd:`~mc share download` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc share download [FLAGS] TARGET [TARGET ...]
|
||||
|
||||
:mc-cmd:`~mc share download` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the object for which :mc:`mc share download` generates a
|
||||
URL.
|
||||
|
||||
If any ``TARGET`` specifies a path to a bucket, :mc:`mc share` *must*
|
||||
include the :mc-cmd-option:`mc share download recursive` argument.
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively generate URLs for all objects in a
|
||||
:mc-cmd:`mc share download TARGET` bucket or bucket prefix.
|
||||
|
||||
Required if any ``TARGET`` specifies a path to a bucket or bucket prefix.
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc
|
||||
:end-before: end-version-id-desc
|
||||
|
||||
.. mc-cmd:: expire, E
|
||||
:option:
|
||||
|
||||
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).
|
||||
|
||||
|
||||
.. mc-cmd:: upload
|
||||
|
||||
Generates a ``CURL`` command for uploading object(s) using ``HTTP POST``.
|
||||
|
||||
:mc-cmd:`~mc share upload` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc share upload [FLAGS] TARGET [TARGET ...]
|
||||
|
||||
:mc-cmd:`~mc share upload` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the object for which :mc:`mc share upload` generates a
|
||||
URL.
|
||||
|
||||
If the ``TARGET`` specifies a single object, :mc-cmd:`mc share upload`
|
||||
names the uploaded object based on the name specified to ``TARGET``.
|
||||
|
||||
If the ``TARGET`` specifies a path to a bucket or bucket prefix,
|
||||
:mc-cmd:`mc share upload` *must* include the
|
||||
:mc-cmd-option:`~mc share upload recursive` argument.
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Modifies the CURL URL to support uploading objects to a bucket or bucket
|
||||
prefix. Required if any ``TARGET`` specifies a path to a bucket or bucket
|
||||
prefix. The modified CURL output resembles the following:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
curl ... -F key=TARGET/<NAME> -F file=@<FILE>
|
||||
|
||||
Replace ``<FILE>`` with the path to the file to upload.
|
||||
|
||||
Replace ``<NAME>`` with the file once uploaded.
|
||||
|
||||
|
||||
.. mc-cmd:: expire, E
|
||||
:option:
|
||||
|
||||
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).
|
||||
|
||||
|
||||
.. mc-cmd:: list
|
||||
|
||||
List all unexpired upload or download URLs generated by
|
||||
:mc-cmd:`mc share download` and :mc-cmd:`mc share upload`.
|
||||
|
||||
:mc-cmd:`~mc share list` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc share list SUBCOMMAND
|
||||
|
||||
:mc-cmd:`~mc share download` supports the following subcommands:
|
||||
|
||||
.. mc-cmd:: upload
|
||||
|
||||
List all unexpired URLs generated by :mc-cmd:`mc share upload`.
|
||||
|
||||
.. mc-cmd:: download
|
||||
|
||||
List all unexpired URLs generated by :mc-cmd:`mc share download`.
|
||||
|
281
source/reference/minio-cli/minio-mc/mc-sql.rst
Normal file
281
source/reference/minio-cli/minio-mc/mc-sql.rst
Normal file
@ -0,0 +1,281 @@
|
||||
==========
|
||||
``mc sql``
|
||||
==========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc sql
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-sql-desc
|
||||
|
||||
The :mc:`mc sql` command provides an S3 Select interface for performing sql
|
||||
queries on objects in the specified S3-compatible service.
|
||||
|
||||
.. end-mc-sql-desc
|
||||
|
||||
See :s3-docs:`Selecting content from objects
|
||||
<selecting-content-from-objects>` for more information on S3 Select behavior
|
||||
and limitations.
|
||||
|
||||
Input Formats
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
:mc:`mc sql` supports the following input formats:
|
||||
|
||||
- ``.csv``
|
||||
- ``.json``
|
||||
- ``.parquet``
|
||||
|
||||
For ``.csv`` file types, use :mc-cmd-option:`mc sql csv-input` to
|
||||
specify the CSV data format. See :ref:`mc-sql-csv-format` for more
|
||||
information on CSV formatting fields.
|
||||
|
||||
For ``.json`` file types, use :mc-cmd-option:`mc sql json-input` to specify
|
||||
the JSON data format.
|
||||
|
||||
For ``.parquet`` file types, :mc-cmd:`mc sql` automatically interprets the
|
||||
data format.
|
||||
|
||||
.. _mc-sql-csv-format:
|
||||
|
||||
CSV Formatting Fields
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The following table lists valid key-value pairs for use with
|
||||
:mc-cmd-option:`mc sql csv-input` and :mc-cmd-option:`mc sql csv-output`.
|
||||
Certain key pairs are only valid for :mc-cmd-option:`~mc sql csv-input`
|
||||
See the documentation for S3 API :s3-api:`CSVInput <API_CSVInput.html>` for more
|
||||
information on S3 CSV formatting.
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 20 20 60
|
||||
:width: 100%
|
||||
|
||||
* - Key
|
||||
- ``--csv-input`` Only
|
||||
- Description
|
||||
|
||||
* - ``rd``
|
||||
-
|
||||
- The character that seperates each record (row) in the input ``.csv``
|
||||
file.
|
||||
|
||||
Corresponds to ``RecordDelimiter`` in the S3 API ``CSVInput``.
|
||||
|
||||
* - ``fd``
|
||||
-
|
||||
- The character that seperates each field in a record. Defaults to
|
||||
``,``.
|
||||
|
||||
Corresponds to ``FieldDelimeter`` in the S3 API ``CSVInput``.
|
||||
|
||||
* - ``qc``
|
||||
-
|
||||
- The character used for escaping when the ``fd`` character is part of
|
||||
a value. Defaults to ``"``.
|
||||
|
||||
Corresponds to ``QuoteCharacter`` in the S3 API ``CSVInput``.
|
||||
|
||||
* - ``qec``
|
||||
-
|
||||
- The character used for escaping a quotation mark ``"`` character
|
||||
inside an already escaped value.
|
||||
|
||||
Corresponds to ``QuoteEscapeCharacter`` in the S3 API ``CSVInput``.
|
||||
|
||||
* - ``fh``
|
||||
- Yes
|
||||
- The content of the first line in the ``.csv`` file.
|
||||
|
||||
Specify one of the following supported values:
|
||||
|
||||
- ``NONE`` - The first line is not a header.
|
||||
- ``IGNORE`` - Ignore the first line.
|
||||
- ``USE`` - The first line is a header.
|
||||
|
||||
For ``NONE`` or ``IGNORE``, you must specify column positions
|
||||
``_#`` to identify a column in the :mc-cmd-option:`~mc sql query`
|
||||
statement.
|
||||
|
||||
For ``USE``, you can specify header values to identify a column in
|
||||
the :mc-cmd-option:`~mc sql query` statement.
|
||||
|
||||
Corresponds to ``FieldHeaderInfo`` in the S3 API ``CSVInput``.
|
||||
|
||||
* - ``cc``
|
||||
- Yes
|
||||
- The character used to indicate a record should be ignored. The
|
||||
character *must* appear at the beginning of the record.
|
||||
|
||||
Corresponds to ``Comment`` in the S3 API ``CSVInput``.
|
||||
|
||||
* - ``qrd``
|
||||
- Yes
|
||||
- Specify ``TRUE`` to indicate that fields may contain record delimiter
|
||||
values (``rd``).
|
||||
|
||||
Defaults to ``FALSE``.
|
||||
|
||||
Corresponds to ``AllowQuotedRecordDelimiter`` in the S3 API
|
||||
``CSVInput``.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Select all Columns in all Objects in a Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc sql` with the :mc-cmd-option:`~mc sql recursive` and
|
||||
:mc-cmd-option:`~mc sql query` options to apply the query to all objects
|
||||
in a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc sql --recursive --query "select * from S3Object" ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc sql TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc sql TARGET>` with the path to the bucket
|
||||
on the S3-compatible host.
|
||||
|
||||
Run an Aggregation Query on an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc:`mc sql` with the :mc-cmd-option:`~mc sql query` option to query
|
||||
an object on an S3-compatible host:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc sql --query "select count(s.power) from S3Object" ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc sql TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc sql TARGET>` with the path to the object
|
||||
on the S3-compatible host.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`mc sql` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc sql [FLAGS] TARGET [TARGET...]
|
||||
|
||||
:mc:`mc sql` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to the bucket or object to run the SQL query
|
||||
against. Specify the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3 service as the prefix to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc sql [FLAGS] play/mybucket
|
||||
|
||||
.. mc-cmd:: query, e
|
||||
:option:
|
||||
|
||||
The SQL statement to execute on the specified :mc-cmd:`~mc sql TARGET`
|
||||
directory or object. Wrap the entire SQL query in double quotes ``"``.
|
||||
|
||||
Defaults to ``"select * from s3object"``.
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively searches the specified :mc-cmd:`~mc sql TARGET` directory
|
||||
using the :mc-cmd-option:`~mc sql query` SQL statement.
|
||||
|
||||
|
||||
.. mc-cmd:: csv-input
|
||||
:option:
|
||||
|
||||
The data format for ``.csv`` input objects. Specify a string of
|
||||
comma-seperated ``key=value,...`` pairs. See :ref:`mc-sql-csv-format`
|
||||
for more information on valid keys.
|
||||
|
||||
.. mc-cmd:: json-input
|
||||
:option:
|
||||
|
||||
The data format for ``.json`` input objects. Specify the type of the JSON
|
||||
contents as ``type=<VALUE>``. The value can be either:
|
||||
|
||||
- ``DOCUMENT`` - JSON `document <https://www.json.org/json-en.html>`__.
|
||||
- ``LINES`` - JSON `lines <http://jsonlines.org/>`__.
|
||||
|
||||
See the S3 API :s3-api:`JSONInput <API_JSONInput.html>` for more
|
||||
information.
|
||||
|
||||
.. mc-cmd:: compression
|
||||
:option:
|
||||
|
||||
The compression type of the input object. Specify one of the following
|
||||
supported values:
|
||||
|
||||
- ``GZIP``
|
||||
- ``BZIP2``
|
||||
- ``NONE`` (default)
|
||||
|
||||
.. mc-cmd:: csv-output
|
||||
:option:
|
||||
|
||||
The data format for ``.csv`` output. Specify a string of comma-seperated
|
||||
``key=value,...`` pairs. See :ref:`mc-sql-csv-format` for more information
|
||||
on valid keys.
|
||||
|
||||
See the S3 API :s3-api:`CSVOutput <API_CSVOutput.html>` for more
|
||||
information.
|
||||
|
||||
.. mc-cmd:: csv-output-header
|
||||
:option:
|
||||
|
||||
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.
|
||||
|
||||
|
||||
.. mc-cmd:: json-output
|
||||
:option:
|
||||
|
||||
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 :s3-api:`JSONOutput <API_JSONOutput.html>` for more
|
||||
information.
|
||||
|
||||
.. mc-cmd:: encrypt-key
|
||||
:option:
|
||||
|
||||
The encryption key to use for performing Server-Side Encryption with Client
|
||||
Keys (SSE-C). Specify comma seperated key-value pairs as ``KEY=VALUE,...``.
|
||||
|
||||
- For ``KEY``, specify the S3-compatible service
|
||||
:mc-cmd:`alias <mc alias>` and full path to the bucket, including any
|
||||
bucket prefixes. Separate the alias and bucket path with a forward slash
|
||||
``\``. For example, ``play/mybucket``
|
||||
|
||||
- For ``VALUE``, specify the data key to use for encryption object(s) in
|
||||
the bucket or bucket prefix specified to ``KEY``.
|
||||
|
||||
:mc-cmd-option:`~mc sql encrypt-key` can use the ``MC_ENCRYPT_KEY``
|
||||
environment variable for populating the list of encryption key-value
|
||||
pairs as an alternative to specifying them on the command line.
|
||||
|
108
source/reference/minio-cli/minio-mc/mc-stat.rst
Normal file
108
source/reference/minio-cli/minio-mc/mc-stat.rst
Normal file
@ -0,0 +1,108 @@
|
||||
===========
|
||||
``mc stat``
|
||||
===========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc stat
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-stat-desc
|
||||
|
||||
The :mc:`mc stat` command displays information on objects contained in the
|
||||
specified S3-compatible service bucket. :mc:`mc stat` has similar functionality
|
||||
as the ``stat`` command when used on a filesystem path.
|
||||
|
||||
.. end-mc-stat-desc
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. tabs::
|
||||
|
||||
.. tab:: Single Object
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc stat ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc stat TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc stat TARGET>` with the path to the bucket
|
||||
or object on the S3-compatible host.
|
||||
|
||||
.. tab:: Object(s) in Bucket
|
||||
|
||||
Use :mc:`mc stat` with the :mc-cmd-option:`~mc stat recursive` option
|
||||
to apply the operation to all objects in the bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc stat --recursive ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc stat TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc stat TARGET>` with the path to the bucket
|
||||
or object on the S3-compatible host.
|
||||
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`~mc stat` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc stat [FLAGS] TARGET
|
||||
|
||||
:mc:`~mc stat` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to an object or file.
|
||||
|
||||
For objects on an S3-compatible service, specify the :mc:`alias <mc alias>`
|
||||
of a configured S3 service as the prefix to the :mc-cmd:`~mc stat TARGET`
|
||||
path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc stat [FLAGS] play/mybucket
|
||||
|
||||
If you specify a directory or bucket, you must also specify
|
||||
:mc-cmd-option:`mc stat recursive` to recursively apply the command to
|
||||
the contents of that directory or bucket.
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively :mc:`mc stat` the contents of
|
||||
:mc-cmd:`~mc stat TARGET`.
|
||||
|
||||
.. mc-cmd:: encrypt-key
|
||||
:option:
|
||||
|
||||
Encrypt or decrypt objects using server-side encryption with
|
||||
client-specified keys. Specify key-value pairs as ``KEY=VALUE``.
|
||||
|
||||
- Each ``KEY`` represents a bucket or object.
|
||||
- Each ``VALUE`` represents the data key to use for encrypting
|
||||
object(s).
|
||||
|
||||
Enclose the entire list of key-value pairs passed to
|
||||
:mc-cmd-option:`~mc stat encrypt-key` in double quotes ``"``.
|
||||
|
||||
:mc-cmd-option:`~mc stat encrypt-key` can use the ``MC_ENCRYPT_KEY``
|
||||
environment variable for retrieving a list of encryption key-value pairs
|
||||
as an alternative to specifying them on the command line.
|
253
source/reference/minio-cli/minio-mc/mc-tag.rst
Normal file
253
source/reference/minio-cli/minio-mc/mc-tag.rst
Normal file
@ -0,0 +1,253 @@
|
||||
==========
|
||||
``mc tag``
|
||||
==========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc tag
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-tag-desc
|
||||
|
||||
The :mc:`mc tag` command adds, removes, and lists the tags associated to a
|
||||
bucket or object.
|
||||
|
||||
.. end-mc-tag-desc.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Apply Tags to a Bucket or Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc tag set` to apply tags to a bucket or object:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc tag set ALIAS/PATH "TAGS"
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc tag set TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc tag set TARGET>` with the path to the bucket
|
||||
or object on the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`TAGS <mc tag set TAGS>` with one or more comma-separated
|
||||
key-value pairs for each tag and its corresponding value.
|
||||
|
||||
Remove Tags from a Bucket or Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc tag remove` to remove all tags from a bucket or object:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc tag remove ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc tag remove TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc tag remove TARGET>` with the path to the bucket
|
||||
or object on the S3-compatible host.
|
||||
|
||||
List Tags for a Bucket or Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc tag list` to retrieve all tags for a bucket or object:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc tag list ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc tag list TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc tag list TARGET>` with the path to the bucket
|
||||
or object on the S3-compatible host.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. |command| replace:: :mc-cmd:`mc tag set`
|
||||
.. |rewind| replace:: :mc-cmd-option:`~mc tag set rewind`
|
||||
.. |versions| replace:: :mc-cmd-option:`~mc tag set versions`
|
||||
.. |versionid| replace:: :mc-cmd-option:`~mc tag set version-id`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc tag set TARGET`
|
||||
|
||||
.. mc-cmd:: set
|
||||
:fullpath:
|
||||
|
||||
Sets the tags for a bucket or object. :mc-cmd:`mc tag set`
|
||||
overwrites any existing tags on the bucket or object.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc tag set [FLAGS] TARGET "TAG1=VALUE1,[TAG2=VALUE2]"
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
**Required** The full path to the bucket or object to which to set the
|
||||
:mc-cmd-option:`~mc tag set TAGS`. Specify the :mc-cmd:`alias <mc alias>`
|
||||
of a configured S3-compatible service as the prefix to the
|
||||
:mc-cmd:`~mc tag set TARGET` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc version set play/mybucket
|
||||
|
||||
.. mc-cmd:: TAGS
|
||||
|
||||
One or more comma-separated key-value pairs, where each pair describes a
|
||||
single tag.
|
||||
|
||||
.. mc-cmd:: versions
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versions-desc
|
||||
:end-before: end-versions-desc
|
||||
|
||||
Use :mc-cmd-option:`~mc tag set versions` and
|
||||
:mc-cmd-option:`~mc tag set rewind` together to apply the tag all object
|
||||
versions which existed at a specific point in time.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc
|
||||
:end-before: end-rewind-desc
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc
|
||||
:end-before: end-version-id-desc
|
||||
|
||||
.. |command-2| replace:: :mc-cmd:`mc tag remove`
|
||||
.. |versions-2| replace:: :mc-cmd-option:`~mc tag remove versions`
|
||||
.. |rewind-2| replace:: :mc-cmd-option:`~mc tag remove rewind`
|
||||
.. |versionid-2| replace:: :mc-cmd-option:`~mc tag remove version-id`
|
||||
.. |alias-2| replace:: :mc-cmd-option:`~mc tag remove TARGET`
|
||||
|
||||
.. mc-cmd:: remove
|
||||
:fullpath:
|
||||
|
||||
Removes *all* tags from a bucket or object.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc tag remove [FLAGS] TARGET
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
**Required** The full path to the bucket or object from which to remove
|
||||
tags. Specify the :mc-cmd:`alias <mc alias>` of a configured S3-compatible
|
||||
service as the prefix to the :mc-cmd:`~mc tag remove TARGET` path. For
|
||||
example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc version remove play/mybucket
|
||||
|
||||
.. mc-cmd:: versions
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versions-desc-2
|
||||
:end-before: end-versions-desc-2
|
||||
|
||||
Use :mc-cmd-option:`~mc tag remove versions` and
|
||||
:mc-cmd-option:`~mc tag remove rewind` together to remove the tag from
|
||||
object versions which existed at a specific point in time.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc-2
|
||||
:end-before: end-rewind-desc-2
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc-2
|
||||
:end-before: end-version-id-desc-2
|
||||
|
||||
|
||||
.. |command-3| replace:: :mc-cmd:`mc tag list`
|
||||
.. |versions-3| replace:: :mc-cmd-option:`~mc tag list versions`
|
||||
.. |rewind-3| replace:: :mc-cmd-option:`~mc tag list rewind`
|
||||
.. |versionid-3| replace:: :mc-cmd-option:`~mc tag list version-id`
|
||||
.. |alias-3| replace:: :mc-cmd-option:`~mc tag list TARGET`
|
||||
|
||||
.. mc-cmd:: list
|
||||
:fullpath:
|
||||
|
||||
Lists the tags assigned to a bucket or object.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc tag <CMD> [FLAGS] TARGET
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
**Required** The full path to the bucket or object for which the command
|
||||
lists tags. Specify the :mc-cmd:`alias <mc alias>` of a
|
||||
configured S3-compatible service as the prefix to the
|
||||
:mc-cmd:`~mc tag list TARGET` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc version <CMD> play/mybucket
|
||||
|
||||
.. mc-cmd:: versions
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versions-desc-3
|
||||
:end-before: end-versions-desc-3
|
||||
|
||||
Use :mc-cmd-option:`~mc tag list versions` and
|
||||
:mc-cmd-option:`~mc tag list rewind` together to list all tags applied to
|
||||
all object versions which existed at a specific point in time.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc-3
|
||||
:end-before: end-rewind-desc-3
|
||||
|
||||
.. mc-cmd:: version-id, vid
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-version-id-desc-3
|
||||
:end-before: end-version-id-desc-3
|
82
source/reference/minio-cli/minio-mc/mc-tree.rst
Normal file
82
source/reference/minio-cli/minio-mc/mc-tree.rst
Normal file
@ -0,0 +1,82 @@
|
||||
===========
|
||||
``mc tree``
|
||||
===========
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc tree
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-tree-desc
|
||||
|
||||
The :mc:`mc tree` command lists buckets and directories in a tree format.
|
||||
|
||||
.. end-mc-tree-desc
|
||||
|
||||
- When applied to an S3-compatible service bucket, :mc:`mc tree` returns
|
||||
a tree listing of the bucket and all bucket prefixes.
|
||||
|
||||
- When applied to a local filesystem directory, :mc:`mc tree` returns a
|
||||
tree listing of the directory and all of its subdirectories.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc tree ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc tree TARGET>` with the :mc:`alias <mc alias>`
|
||||
of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc tree TARGET>` with the path to the bucket on the
|
||||
S3-compatible host.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. |command| replace:: :mc-cmd:`mc tree`
|
||||
.. |rewind| replace:: :mc-cmd-option:`~mc tree rewind`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc tree TARGET`
|
||||
|
||||
:mc:`~mc tree` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc tree [FLAGS] TARGET [TARGET...]
|
||||
|
||||
:mc:`~mc tree` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to an S3-compatible service bucket *or* local
|
||||
filesystem directory.
|
||||
|
||||
For objects on an S3-compatible service, specify the :mc:`alias <mc alias>`
|
||||
of a configured service as the prefix to the :mc-cmd:`~mc tree TARGET`
|
||||
path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc stat [FLAGS] play/mybucket
|
||||
|
||||
.. mc-cmd:: files, f
|
||||
:option:
|
||||
|
||||
Includes files in the object or directory in the :mc:`mc tree` output.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-rewind-desc
|
||||
:end-before: end-rewind-desc
|
||||
|
33
source/reference/minio-cli/minio-mc/mc-update.rst
Normal file
33
source/reference/minio-cli/minio-mc/mc-update.rst
Normal file
@ -0,0 +1,33 @@
|
||||
=============
|
||||
``mc update``
|
||||
=============
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. mc:: mc update
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-update-desc
|
||||
|
||||
The :mc:`mc update` command automatically updates the :program:`mc` binary to
|
||||
the latest stable version.
|
||||
|
||||
.. end-mc-update-desc
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`mc update` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc update
|
||||
|
||||
Use :mc:`mc update` after updating the :program:`minio` server binary to
|
||||
ensure consistent behavior and compatibility.
|
182
source/reference/minio-cli/minio-mc/mc-version.rst
Normal file
182
source/reference/minio-cli/minio-mc/mc-version.rst
Normal file
@ -0,0 +1,182 @@
|
||||
==============
|
||||
``mc version``
|
||||
==============
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc version
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-version-desc
|
||||
|
||||
The :mc:`mc version` command enables or disables bucket versioning.
|
||||
|
||||
.. end-mc-version-desc
|
||||
|
||||
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:`mc lock` for more information on configuring object locking.
|
||||
|
||||
Bucket Versioning Requires Erasure Coding
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Bucket versioning requires that the MinIO deployment supports erasure coding.
|
||||
See <erasure coding link> for more information.
|
||||
|
||||
Bucket Versioning with Existing Data
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Enabling bucket versioning on a bucket with existing data immediately applies
|
||||
a versioning ID to any 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-cmd:`mc rm --versions ALIAS/BUCKET/OBJECT <mc rm versions>` to delete an
|
||||
object *and* all its versions.
|
||||
|
||||
Common Operations
|
||||
-----------------
|
||||
|
||||
Enable Bucket Versioning
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc version enable` to enable versioning on a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc version enable ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc version enable TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc version enable TARGET>` with the bucket on which
|
||||
to enable versioning.
|
||||
|
||||
Disable Bucket Versioning
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc version disable` to disable versioning on a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc version disable ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc version disable TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc version disable TARGET>` with the bucket on which
|
||||
to disable versioning.
|
||||
|
||||
Get Bucket Versioning Status
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc version info` to enable versioning on a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc version info ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc version info TARGET>` with the
|
||||
:mc:`alias <mc alias>` of a configured S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc version info TARGET>` with the bucket on which
|
||||
to retrieve the versioning status.
|
||||
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc version COMMAND
|
||||
|
||||
:mc:`~mc version` supports the following commands:
|
||||
|
||||
.. mc-cmd:: enable
|
||||
:fullpath:
|
||||
|
||||
Enables bucket versioning on the specified bucket.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc version enable TARGET
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
**Required** The full path to the bucket on which to enable bucket
|
||||
versioning. Specify the :mc:`alias <mc alias>` of a configured
|
||||
S3-compatible service as the prefix to the
|
||||
:mc-cmd:`~mc version enable TARGET` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc version enable play/mybucket
|
||||
|
||||
.. mc-cmd:: disable
|
||||
:fullpath:
|
||||
|
||||
Disables bucket versioning on the specified bucket.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc version disable TARGET
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
**Required** The full path to the bucket on which to disable bucket
|
||||
versioning. Specify the :mc:`alias <mc alias>` of a configured
|
||||
S3-compatible service as the prefix to the
|
||||
:mc-cmd:`~mc version disable TARGET` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc version disable play/mybucket
|
||||
|
||||
.. mc-cmd:: info
|
||||
:fullpath:
|
||||
|
||||
Retrieves the bucket versioning status for the specified bucket.
|
||||
|
||||
The command has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc version info TARGET
|
||||
|
||||
The command accepts the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
**Required** The full path to the bucket on which to retrieve the bucket
|
||||
versioning status. Specify the :mc:`alias <mc alias>` of a configured
|
||||
S3-compatible service as the prefix to the
|
||||
:mc-cmd:`~mc version info TARGET` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc version info play/mybucket
|
98
source/reference/minio-cli/minio-mc/mc-watch.rst
Normal file
98
source/reference/minio-cli/minio-mc/mc-watch.rst
Normal file
@ -0,0 +1,98 @@
|
||||
============
|
||||
``mc watch``
|
||||
============
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc watch
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
.. start-mc-watch-desc
|
||||
|
||||
The :mc:`mc watch` command watches for events on the specified S3-compatible
|
||||
service bucket or local filesystem path. For S3 services, use :mc:`mc event` to
|
||||
configure bucket event notifications on S3-compatible services.
|
||||
|
||||
.. end-mc-watch-desc
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Watch for Events in a Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc watch --recursive ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc watch TARGET>` with the :mc:`alias <mc alias>`
|
||||
of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc watch TARGET>` with the path to the bucket.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`~mc watch` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc watch [FLAGS] TARGET
|
||||
|
||||
:mc:`~mc watch` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The S3 service :mc:`alias <mc alias>` and bucket *or* the local
|
||||
filesystem directory to watch for event notifications. Specify the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3 service as the prefix to the
|
||||
``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc event add play/mybucket
|
||||
|
||||
.. mc-cmd:: event
|
||||
:option:
|
||||
|
||||
The event(s) to watch for. Specify multiple events using a comma ``,``
|
||||
delimiter. See :ref:`mc-event-supported-events` for supported events.
|
||||
|
||||
Defaults to ``put,delete, get``.
|
||||
|
||||
.. mc-cmd:: prefix
|
||||
:option:
|
||||
|
||||
The bucket prefix in which to watch for the specified
|
||||
:mc-cmd-option:`~mc watch event`.
|
||||
|
||||
For example, given a :mc-cmd:`~mc watch TARGET` of ``play/mybucket`` and a
|
||||
:mc-cmd-option:`~mc watch prefix` of ``photos``, only events in
|
||||
``play/mybucket/photos`` trigger bucket notifications.
|
||||
|
||||
.. mc-cmd:: suffix
|
||||
:option:
|
||||
|
||||
The bucket suffix in which to watch for the specified
|
||||
:mc-cmd-option:`~mc watch event`.
|
||||
|
||||
For example, given a :mc-cmd:`~mc watch TARGET` of ``play/mybucket`` and a
|
||||
:mc-cmd-option:`~mc watch suffix` of ``.jpg``, only events in
|
||||
``play/mybucket/*.jpg`` trigger bucket notifications.
|
||||
|
||||
.. mc-cmd:: recursive, r
|
||||
:option:
|
||||
|
||||
Recursively watch for events in the specified
|
||||
:mc-cmd:`~mc watch TARGET` bucket path or local directory.
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user