mirror of
https://github.com/minio/docs.git
synced 2025-06-04 08:42:23 +03:00
Standardizing mc command format and layout
This commit is contained in:
parent
e3e9caf593
commit
179722e56a
@ -85,6 +85,7 @@ body div.left button.sphinxsidebarbutton {
|
||||
left: 200px;
|
||||
top: 90px;
|
||||
color: gray;
|
||||
font-family: Mark, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
body div.left div.sphinxsidebarwrapper a.current.reference.internal {
|
||||
@ -161,11 +162,19 @@ body div.center h4,
|
||||
body div.center h5,
|
||||
body div.center h6 {
|
||||
font-family: Mark, sans-serif;
|
||||
font-weight: normal;
|
||||
font-weight: bold;
|
||||
margin: 30px 0px 10px 0px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body div.center h2 {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
body div.center h3 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
body #toc-backref {
|
||||
color: var(--minio-meridian);
|
||||
}
|
||||
@ -185,10 +194,8 @@ body div.center a.toc-backref {
|
||||
}
|
||||
|
||||
body div.center dl.minio {
|
||||
border-bottom: 1px solid #01262e2a;
|
||||
border-top: 1px solid #01262e2a;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
body div.center code.descclassname {
|
||||
@ -213,6 +220,10 @@ body div.center table.docutils th {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
body div.center dl {
|
||||
margin: 20px 0 20px 0;
|
||||
}
|
||||
|
||||
body div.center dl dd {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
@ -102,4 +102,6 @@ html_static_path = ['_static']
|
||||
|
||||
html_css_files = ['css-style.css']
|
||||
|
||||
html_js_files = ['js/main.js']
|
||||
html_js_files = ['js/main.js']
|
||||
|
||||
html_title = 'MinIO Documentation'
|
8
source/includes/facts-locking.rst
Normal file
8
source/includes/facts-locking.rst
Normal file
@ -0,0 +1,8 @@
|
||||
.. start-command-requires-locking-desc
|
||||
|
||||
The bucket *must* have object locking enabled to use this command.
|
||||
You can only enable object locking when creating a bucket. See
|
||||
:mc-cmd-option:`mc mb with-lock` for more information on creating buckets
|
||||
with object locking enabled.
|
||||
|
||||
.. end-command-requires-locking-desc
|
@ -128,4 +128,14 @@ Directs |command-3| to operate only on the specified object version.
|
||||
that supports :ref:`minio-bucket-versioning`. For MinIO deployments, use
|
||||
:mc-cmd:`mc version` to enable or disable bucket versioning.
|
||||
|
||||
.. end-version-id-desc-3
|
||||
.. end-version-id-desc-3
|
||||
|
||||
.. start-versioning-admonition
|
||||
|
||||
.. admonition:: Requires Versioning
|
||||
:class: note
|
||||
|
||||
|command| requires :ref:`bucket versioning <minio-bucket-versioning>` to
|
||||
use this feature. Use :mc:`mc version` to enable versioning on a bucket.
|
||||
|
||||
.. end-versioning-admonition
|
@ -138,7 +138,7 @@ Syntax
|
||||
- Replace ``DESTHOSTNAME`` with the hostname and port of the MinIO
|
||||
deployment (i.e. ``minio-server.example.net:9000``).
|
||||
|
||||
- Replace ``DESTBUCKET`` with the name of the bucket on the
|
||||
- Replace ``DESTBUCKET`` with the bucket on the
|
||||
destination.
|
||||
|
||||
.. mc-cmd:: region
|
||||
|
@ -184,9 +184,8 @@ The following table lists :mc-cmd:`mc` commands:
|
||||
:end-before: end-mc-legalhold-desc
|
||||
|
||||
* - :mc:`mc lock`
|
||||
- .. include:: /minio-cli/minio-mc/mc-lock.rst
|
||||
:start-after: start-mc-lock-desc
|
||||
:end-before: end-mc-lock-desc
|
||||
- Deprecated since
|
||||
:release:`RELEASE.2020-09-18T00-13-21Z`. Use :mc:`mc retention`.
|
||||
|
||||
* - :mc:`mc ls`
|
||||
- .. include:: /minio-cli/minio-mc/mc-ls.rst
|
||||
|
@ -28,14 +28,14 @@ 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>`.
|
||||
|
||||
S3 Access Control and Limitations
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Required Credentials and Access Control
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc-cmd:`mc alias` requires specifying an access key and corresponding secret
|
||||
key for a user on the S3-compatible host. :program:`mc` can only perform
|
||||
operations on that host for which the user has explicit permission. If the
|
||||
specified user cannot perform an action or access a resource on the S3 host,
|
||||
:program:`mc` inherits those restrictions.
|
||||
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`.
|
||||
@ -46,8 +46,8 @@ For more complete documentation on S3 Access Control, see
|
||||
For all other S3-compatible services, defer to the documentation for that
|
||||
service.
|
||||
|
||||
Common Operations
|
||||
-----------------
|
||||
Examples
|
||||
--------
|
||||
|
||||
Add an S3-Compatible Service
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -60,12 +60,15 @@ Use :mc-cmd:`mc alias set` to add an S3-compatible service for use with
|
||||
|
||||
mc alias set ALIAS HOSTNAME ACCESSKEY SECRETKEY
|
||||
|
||||
- Replace ``ALIAS`` with the name of the alias to associate to the S3-compatible service.
|
||||
- Replace :mc-cmd:`~mc alias set ALIAS` with the alias to associate
|
||||
to the S3-compatible service.
|
||||
|
||||
- Replace ``HOSTNAME`` with the hostname or IP address of the S3-compatible service.
|
||||
- Replace :mc-cmd:`~mc alias set HOSTNAME` with the hostname or IP address of
|
||||
the S3-compatible service.
|
||||
|
||||
- Replace ``ACCESSKEY`` and ``SECRETKEY`` with the access and secret key for a
|
||||
user on 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
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -78,10 +81,11 @@ Use :mc-cmd:`mc alias remove` to remove an S3-compatible alias from the
|
||||
|
||||
mc alias remove ALIAS
|
||||
|
||||
- Replace ``ALIAS`` with the name of the S3-compatible service to remove.
|
||||
- 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 S3-compatible
|
||||
services.
|
||||
Use :mc-cmd:`mc alias list` to list the currently configured aliases and their
|
||||
associated S3-compatible service.
|
||||
|
||||
List Configured S3-Compatible Services
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -106,13 +110,13 @@ Syntax
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc alias set ALIAS HOSTNAME ACCESS_KEY SECRET_KEY --api [S3v2|S3v4]
|
||||
mc alias set ALIAS HOSTNAME ACCESSKEY SECRETKEY --api [S3v2|S3v4]
|
||||
|
||||
:mc-cmd:`mc alias set` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: ALIAS
|
||||
|
||||
The name to associate to the S3-compatible service.
|
||||
*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
|
||||
@ -120,24 +124,24 @@ Syntax
|
||||
|
||||
.. mc-cmd:: HOSTNAME
|
||||
|
||||
The URL for the S3-compatible service endpoint.
|
||||
*Required* The URL for the S3-compatible service endpoint.
|
||||
|
||||
.. mc-cmd:: ACCESS_KEY
|
||||
.. mc-cmd:: ACCESSKEY
|
||||
|
||||
The access key for authenticating to the S3 service. The
|
||||
``ACCESS_KEY`` must correspond to a user or role on the S3 service.
|
||||
*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 ``ACCESS_KEY`` user or role grants the required permissions.
|
||||
the ``ACCESSKEY`` user or role grants the required permissions.
|
||||
|
||||
.. mc-cmd:: SECRET_KEY
|
||||
.. mc-cmd:: SECRETKEY
|
||||
|
||||
The corresponding secret for the specified ``ACCESS_KEY``.
|
||||
*Required* The corresponding secret for the specified ``ACCESSKEY``.
|
||||
|
||||
.. mc-cmd:: api
|
||||
:option:
|
||||
|
||||
The Amazon S3 Signature version to use when connecting to the
|
||||
*Optional* The Amazon S3 Signature version to use when connecting to the
|
||||
S3 service. Supports the following values:
|
||||
|
||||
- ``S3v2``
|
||||
@ -155,6 +159,13 @@ Syntax
|
||||
|
||||
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:
|
||||
|
||||
@ -166,13 +177,3 @@ Syntax
|
||||
|
||||
mc alias list
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Add a New S3 Service Alias
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc alias set myminio https://myminio.example.net myminioaccesskey myminiosecretkey
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc cat
|
||||
|
||||
@ -22,33 +22,72 @@ display the contents of the specified file or object to ``STDOUT``.
|
||||
|
||||
.. end-mc-cat-desc
|
||||
|
||||
Quick Reference
|
||||
---------------
|
||||
Common Operations
|
||||
-----------------
|
||||
|
||||
:mc-cmd:`mc cat play\object.txt <mc cat SOURCE>`
|
||||
Returns the contents of ``object.txt``. ``play`` corresponds to the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible service.
|
||||
View an S3 Object
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc-cmd:`mc cat --rewind "30d" play\myobject.txt <mc cat rewind>`
|
||||
Returns the contents of the ``object.txt`` as it existed ``30`` days
|
||||
prior to the current date. ``play`` corresponds to the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible service.
|
||||
Use :mc-cmd:`mc cat` to return the object:
|
||||
|
||||
:mc-cmd-option:`mc cat rewind` requires :ref:`bucket versioning
|
||||
<minio-bucket-versioning>`. Use :mc:`mc version` to enable versioning
|
||||
on a bucket.
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
:mc-cmd:`mc cat --version-id 4f85ff5c-ade5-4fb7-be54-1b62dd00f45f play\myobject.txt <mc cat version-id>`
|
||||
Returns the contents of the ``object.txt`` version with matching
|
||||
``--version-id``. ``play`` corresponds to the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible service.
|
||||
mc cat ALIAS/PATH
|
||||
|
||||
:mc-cmd-option:`mc cat version-id` requires :ref:`bucket versioning
|
||||
<minio-bucket-versioning>`. Use :mc:`mc version` to enable versioning
|
||||
on a bucket.
|
||||
- Replace :mc-cmd:`ALIAS <mc cat SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
Use :mc-cmd:`mc ls versions play\myobject.txt <mc ls versions>` to list all
|
||||
versions of the object.
|
||||
- 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
|
||||
------
|
||||
@ -72,7 +111,27 @@ Syntax
|
||||
|
||||
**REQUIRED**
|
||||
|
||||
The full path to the file or object to concatenate.
|
||||
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:
|
||||
@ -105,64 +164,3 @@ Syntax
|
||||
environment variable for retrieving a list of encryption key-value pairs
|
||||
as an alternative to specifying them on the command line.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Display the Contents of an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cat play/mybucket/object.txt
|
||||
|
||||
Display the Contents of a Server Encrypted Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cat --encrypt-key="play/mybucket=32ByteLongSecretKeyMustBeGiven1" play/mybucket/object.txt
|
||||
|
||||
If the secret key contains non-printable characters, specify a ``base64``
|
||||
encoded string instead:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cat --encrypt-key="play/mybucket=MzJieXRlc2xvbmdzZWNyZWFiY2RlZmcJZ2l2ZW5uMjE=" play/mybucket/object.txt
|
||||
|
||||
Display the Past Contents of an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
To retrieve the contents of an object a specific number of days in the past,
|
||||
specify :mc-cmd-option:`mc cat rewind` with a duration of ``##d``:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cat --rewind "10d" play/mybucket/object.txt
|
||||
|
||||
To retrieve the contents of an object at a specific date or time in the past,
|
||||
specify :mc-cmd-option:`mc cat rewind` with an ISO8601-formatted timestamp:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc cat --rewind "2020.03.04T12:34" play/mybucket/object.txt
|
||||
|
||||
:mc-cmd-option:`mc cat rewind` requires :ref:`bucket versioning
|
||||
<minio-bucket-versioning>`. Use :mc:`mc version` to enable versioning
|
||||
on a bucket.
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc cp
|
||||
|
||||
@ -20,25 +20,162 @@ S3-compatible service.
|
||||
|
||||
.. end-mc-cp-desc
|
||||
|
||||
Quick Reference
|
||||
---------------
|
||||
Examples
|
||||
~~~~~~~~
|
||||
|
||||
:mc-cmd:`mc cp ~/Data/myobject.txt play/data/myobject.txt <mc cp>`
|
||||
Copies ``myobject.txt`` from the local filesystem ``~/Data`` folder to the
|
||||
``data`` bucket. ``play`` corresponds to the :mc-cmd:`alias <mc alias>` of a
|
||||
configured S3-compatible service.
|
||||
|
||||
Copy Object to S3
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc-cmd:`mc cp --recursive ~/Data/ play/data <mc cp recursive`
|
||||
Recursively copies the contents of ``~/Data/`` to the ``data`` bucket.
|
||||
``play`` corresponds to the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3-compatible service.
|
||||
Use :mc-cmd:`mc cp` to copy an object to an S3-compatible host:
|
||||
|
||||
:mc-cmd:`mc cp --rewind "30d" play/data/object.txt play/data/object-30d.txt <mc cp rewind>`
|
||||
Copies ``object.txt`` from the ``data`` bucket as it existed 30 days prior to
|
||||
the current date. The command creates the copy ``objects-30d.txt`` in the
|
||||
same bucket. ``play`` corresponds to the :mc-cmd:`alias <mc alias>` of a
|
||||
configured S3-compatible service.
|
||||
.. 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
|
||||
------
|
||||
@ -48,7 +185,7 @@ Syntax
|
||||
.. |versionid| replace:: :mc-cmd-option:`~mc cp version-id`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc cp SOURCE`
|
||||
|
||||
:mc:`~mc cp` has the following syntax:
|
||||
:mc:`mc cp` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
|
@ -22,27 +22,8 @@ of objects.
|
||||
|
||||
.. end-mc-diff-desc
|
||||
|
||||
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.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
Output Legend
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
:mc:`mc diff` uses the following legend when formatting the diff output:
|
||||
|
||||
@ -62,4 +43,23 @@ Examples
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc diff play/bucket1 play/bucket2
|
||||
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.
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc encrypt
|
||||
|
||||
@ -24,18 +24,26 @@ For more information on configuring SSE, see
|
||||
|
||||
.. 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:`~mc encrypt` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc encrypt COMMAND [COMMAND FLAGS] [ARGUMENTS...]
|
||||
|
||||
:mc:`~mc encrypt` supports the following commands:
|
||||
|
||||
.. mc-cmd:: set
|
||||
:fullpath:
|
||||
|
||||
Sets the default encryption settings for the bucket. The command has the
|
||||
following syntax:
|
||||
@ -58,7 +66,7 @@ Syntax
|
||||
.. mc-cmd:: KMSKEY
|
||||
|
||||
Specify the KMS Master Key to use for performing SSE object encryption.
|
||||
Only required if :mc-cmd:`~mc encrypt ENCRYPTION` is ``sse-kms``.
|
||||
Only required if :mc-cmd:`~mc encrypt set ENCRYPTION` is ``sse-kms``.
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
@ -71,6 +79,7 @@ Syntax
|
||||
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:
|
||||
@ -85,13 +94,14 @@ Syntax
|
||||
|
||||
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:
|
||||
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:
|
||||
@ -106,29 +116,10 @@ Syntax
|
||||
|
||||
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:
|
||||
to the ``TARGET`` path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc encrypt remove play/mybucket
|
||||
|
||||
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 settings, use the
|
||||
:mc:`mc mv` mc with the :mc-cmd:`~mc mv --encrypt` or
|
||||
:mc-cmd:`~mc mv --encrypt-key` arguments to manually modify the
|
||||
encryption settings or encrypted state of the bucket contents *before*
|
||||
changing the bucket default.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
ToDo
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc event
|
||||
|
||||
@ -26,18 +26,124 @@ 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:`~mc event` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc event COMMAND [COMMAND FLAGS | -h] [ARGUMENTS ...]
|
||||
|
||||
:mc:`~mc event` supports the following commands:
|
||||
|
||||
.. 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:
|
||||
@ -98,6 +204,7 @@ Syntax
|
||||
``play/mybucket/*.jpg`` trigger bucket notifications.
|
||||
|
||||
.. mc-cmd:: remove
|
||||
:fullpath:
|
||||
|
||||
Removes an existing bucket event notification. The command has the
|
||||
following syntax:
|
||||
@ -161,6 +268,7 @@ Syntax
|
||||
bucket notifications in ``play/mybucket/*.jpg``.
|
||||
|
||||
.. mc-cmd:: list
|
||||
:fullpath:
|
||||
|
||||
Lists bucket event notifications.
|
||||
|
||||
@ -194,77 +302,5 @@ Syntax
|
||||
notification target at server startup. See
|
||||
:doc:`/minio-features/bucket-notifications` for more information.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
.. _mc-event-supported-events:
|
||||
|
||||
Supported Bucket Events
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
MinIO supports the following S3 events.
|
||||
|
||||
.. 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
|
||||
--------
|
||||
|
||||
Create a New Notification Event in Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc event play/mybucket arn:minio:sqs::notification-target-name:notification-target \
|
||||
--event put,delete
|
||||
|
||||
|
||||
Remove an Existing Notification Event in Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc event play/mybucket arn:minio:sqs::notification-target-name:notification-target \
|
||||
--event put,delete
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc find
|
||||
|
||||
@ -15,15 +15,149 @@ Description
|
||||
|
||||
.. start-mc-find-desc
|
||||
|
||||
The :mc:`mc find` command searches the specified paths using
|
||||
the given criteria and returns only those objects that match the criteria.
|
||||
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:
|
||||
:mc:`mc find` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
@ -34,13 +168,31 @@ Syntax
|
||||
|
||||
.. mc-cmd:: PATH
|
||||
|
||||
The full path to search. Specify the :mc:`~mc alias` of
|
||||
a configured S3 service as the prefix to the
|
||||
:mc-cmd:`~mc mirror PATH`. For example:
|
||||
*Required*
|
||||
|
||||
The full path to search.
|
||||
|
||||
For objects on S3-compatible hosts, specify the path to the object as
|
||||
``ALIAS/PATH``, where:
|
||||
|
||||
.. code-block::
|
||||
- ``ALIAS`` is the :mc:`alias <mc alias>` of a configured S3-compatible host,
|
||||
*and*
|
||||
|
||||
mc find play/mybucket [FLAGS]
|
||||
- ``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:
|
||||
@ -117,107 +269,6 @@ Syntax
|
||||
Continuously monitor the :mc-cmd:`~mc find PATH` and return
|
||||
any new objects which match the specified criteria.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
.. _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 All Objects with Specific File Extension
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc find play/bucket --name "*.jpg"
|
||||
|
||||
Find All Matching Objects and Copy To S3 Service
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc find ~/data/images/ --name "*.jpg" --exec "mc cp {} play/images/"
|
||||
|
||||
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 ~/data/images/ --name "*.jpg" --watch --exec "mc cp {} play/images/"
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc head
|
||||
|
||||
@ -20,37 +20,77 @@ where ``n`` is an argument specified to the command.
|
||||
|
||||
.. end-mc-head-desc
|
||||
|
||||
Quick Reference
|
||||
---------------
|
||||
:mc:`mc head` does not perform any transformation or formatting of object
|
||||
contents to facilitate readability.
|
||||
|
||||
:mc-cmd:`mc head play/object.txt <mc head SOURCE>`
|
||||
Returns the first 10 lines of ``object.txt``. ``play`` corresponds to the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible service.
|
||||
Examples
|
||||
--------
|
||||
|
||||
:mc-cmd:`mc head --lines 20 play/object.txt <mc head lines>`
|
||||
Returns the first 20 lines of ``object.txt``. ``play`` corresponds to the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible service.
|
||||
View Partial Contents of an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc-cmd:`mc head --rewind "30d" play/object.txt <mc head rewind>`
|
||||
Returns the first 10 lines of ``object.txt`` as it existed 30 days prior to
|
||||
the current date. ``play`` corresponds to the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible service.
|
||||
Use :mc-cmd:`mc head` to return the first 10 lines of an object:
|
||||
|
||||
:mc-cmd-option:`mc head rewind` requires :ref:`bucket versioning
|
||||
<minio-bucket-versioning>`. Use :mc:`mc version` to enable versioning
|
||||
on a bucket.
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
:mc-cmd:`mc head --version-id 4f85ff5c-ade5-4fb7-be54-1b62dd00f45f play/object.txt <mc head version-id>`
|
||||
Returns the first 10 lines of the ``object.txt`` version with matching
|
||||
``--version-id``. ``play`` corresponds to the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible service.
|
||||
mc head ALIAS/PATH
|
||||
|
||||
:mc-cmd-option:`mc head version-id` requires :ref:`bucket versioning
|
||||
<minio-bucket-versioning>`. Use :mc:`mc version` to enable versioning
|
||||
on a bucket.
|
||||
- Replace :mc-cmd:`ALIAS <mc head SOURCE>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
Use :mc-cmd:`mc ls versions play\myobject.txt <mc ls versions>` to list all
|
||||
versions of the object.
|
||||
- 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
|
||||
------
|
||||
@ -117,39 +157,3 @@ Syntax
|
||||
: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.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
:mc:`mc head` makes no assumptions about the format of the object data.
|
||||
If the object data is not human readable, the output of :mc:`mc head`
|
||||
will also not be human readable.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Display ``n`` Lines of an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc head --lines 20 play/mybucket/myobject.txt
|
||||
|
||||
Display ``n`` Lines of an Encrypted Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc head lines --20 \
|
||||
--encrypt-key "play/mybucket=32byteslongsecretkeymustbegiven1" \
|
||||
play/mybucket/myobject.txt
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc ilm
|
||||
|
||||
@ -22,18 +22,98 @@ 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:`mc ilm` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc ilm COMMAND [COMMAND FLAGS] [ARGUMENTS...]
|
||||
|
||||
:mc:`mc ilm` supports the following subcommands:
|
||||
|
||||
.. mc-cmd:: list
|
||||
:fullpath:
|
||||
|
||||
Lists the current lifecycle management rules of the specified bucket. The
|
||||
subcommand has the following syntax:
|
||||
@ -79,6 +159,7 @@ Syntax
|
||||
- ``expiry set``
|
||||
|
||||
.. mc-cmd:: add
|
||||
:fullpath:
|
||||
|
||||
Adds or modifies bucket lifecycle management rules. The command has
|
||||
the following syntax:
|
||||
@ -90,15 +171,19 @@ Syntax
|
||||
|
||||
.. 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.
|
||||
*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 play/mybucket
|
||||
mc ilm list [FLAGS] play/mybucket
|
||||
|
||||
.. mc-cmd:: id
|
||||
:option:
|
||||
@ -165,6 +250,7 @@ Syntax
|
||||
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:
|
||||
@ -207,6 +293,7 @@ Syntax
|
||||
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:
|
||||
@ -230,6 +317,7 @@ Syntax
|
||||
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:
|
||||
@ -251,30 +339,3 @@ Syntax
|
||||
|
||||
mc ilm import play/mybucket < play_mybucket_lifecycle_rules.json
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Add a Bucket Lifecycle Management Rule
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ilm add --id "Devices" --expiry-date "2021-01-23" play/mybucket
|
||||
|
||||
|
||||
Remove a Bucket Lifecycle Management Rule
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc ilm remove --id "Devices" play/mybucket
|
@ -30,52 +30,69 @@ mode on the object.
|
||||
See :mc-cmd-option:`mc mb with-lock` for documentation on creating
|
||||
buckets with object locking enabled.
|
||||
|
||||
Quick Reference
|
||||
---------------
|
||||
Examples
|
||||
--------
|
||||
|
||||
:mc-cmd:`mc legalhold set play/mybucket/myobject.txt <mc legalhold set>`
|
||||
Enables legalhold on the ``myobject.txt`` object in the ``mybucket`` bucket.
|
||||
``play`` corresponds to the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3-compatible service.
|
||||
Enable Legal Hold On Objects
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc-cmd:`mc legalhold set --recursive play/mybucket <mc legalhold set recursive>`
|
||||
Recursively enables legalhold on the contents of the ``mybucket`` bucket.
|
||||
``play`` corresponds to the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3-compatible service.
|
||||
|
||||
:mc-cmd:`mc legalhold set --rewind "30d" --recursive play/mybucket <mc legalhold set rewind>`
|
||||
Recursively enables legalhold on the contents of the ``mybucket`` bucket
|
||||
as they existed 30 days prior to the current date. ``play`` corresponds
|
||||
to the :mc-cmd:`alias <mc alias>` of a configured S3-compatible service.
|
||||
|
||||
:mc-cmd-option:`mc legalhold set rewind` requires :ref:`bucket versioning
|
||||
<minio-bucket-versioning>`. Use :mc:`mc version` to enable versioning
|
||||
on a bucket.
|
||||
|
||||
:mc-cmd:`mc legalhold clear play/mybucket/myobject.txt <mc legalhold clear>`
|
||||
Removes legalhold on the ``myobject.txt`` object in the ``mybucket``
|
||||
bucket. ``play`` corresponds to the :mc-cmd:`alias <mc alias>` of a
|
||||
configured S3-compatible service.
|
||||
|
||||
:mc-cmd:`mc legalhold info play/mybucket/myobject.txt <mc legalhold info>`
|
||||
Retrieves the legalhold status of the ``myobject.txt`` object in the
|
||||
``mybucket`` bucket. ``play`` corresponds to the :mc-cmd:`alias <mc alias>`
|
||||
of a configured S3-compatible service.
|
||||
|
||||
Syntax
|
||||
------
|
||||
Use :mc-cmd:`mc legalhold set` to enable legal hold on objects:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc legalhold COMMAND
|
||||
mc legalhold set [--recursive] ALIAS/PATH
|
||||
|
||||
:mc:`~mc legalhold` supports the following commands:
|
||||
- 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 legahold 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 info rewind`
|
||||
.. |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`
|
||||
|
||||
@ -95,11 +112,13 @@ Syntax
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to the object or bucket on which to enable
|
||||
*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::
|
||||
.. code-block:: shell
|
||||
|
||||
mc legalhold set play/mybucket/myobject.txt
|
||||
|
||||
@ -232,36 +251,3 @@ Syntax
|
||||
:start-after: start-version-id-desc-3
|
||||
:end-before: end-version-id-desc-3
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Enable Legal Hold on Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
This example assumes that the specified bucket has object locking enabled.
|
||||
See :mc-cmd-option:`mc mb with-lock` for more information on creating buckets
|
||||
with object locking enabled.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc legalhold set --recursive play/mybucket
|
||||
|
||||
Enable Legal Hold on an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
This example assumes that the specified bucket has object locking enabled.
|
||||
See :mc-cmd-option:`mc mb with-lock` for more information on creating buckets
|
||||
with object locking enabled.
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc legalhold set play/mybucket/myobject.csv
|
||||
|
||||
|
@ -4,10 +4,6 @@
|
||||
|
||||
.. default-domain:: minio
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
|
||||
.. mc:: mc lock
|
||||
|
||||
Description
|
||||
@ -21,151 +17,11 @@ object retention for a configurable period of time.
|
||||
|
||||
.. end-mc-lock-desc
|
||||
|
||||
Use :mc:`mc retention` to set object lock settings on specific objects
|
||||
in a bucket. :mc:`mc retention` overrides any bucket default lock
|
||||
settings set using :mc:`mc lock`.
|
||||
.. admonition:: DEPRECATED
|
||||
:class: important
|
||||
|
||||
.. 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.
|
||||
|
||||
:mc:`mc lock` *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.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
:mc:`~mc lock` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc lock TARGET COMMAND | MODE VALIDITY
|
||||
|
||||
:mc:`~mc lock` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
*Required* The full path to the bucket for which to set or get the bucket
|
||||
default 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 lock play/mybucket COMMAND | MODE VALIDITY
|
||||
|
||||
.. mc-cmd:: info
|
||||
|
||||
Retrieves the current object lock configuation for the
|
||||
:mc-cmd:`~mc lock TARGET` bucket.
|
||||
|
||||
Mutually exclusive with :mc-cmd:`mc lock MODE`.
|
||||
|
||||
.. mc-cmd:: clear
|
||||
|
||||
Unsets the current object lock configuration for the
|
||||
:mc-cmd:`~mc lock TARGET` bucket.
|
||||
|
||||
Mutually exclusive with :mc-cmd:`mc lock MODE`.
|
||||
|
||||
.. mc-cmd:: MODE
|
||||
|
||||
Sets the locking mode for the :mc-cmd:`~mc lock TARGET` bucket. 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 lock VALIDITY`.
|
||||
|
||||
Mutually exclusive with :mc-cmd:`mc lock info` and
|
||||
:mc-cmd:`mc lock clear`.
|
||||
|
||||
.. mc-cmd:: VALIDITY
|
||||
|
||||
The duration which objects remain in the specified
|
||||
:mc-cmd:`~mc lock 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.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
:mc:`mc lock` *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.
|
||||
|
||||
Interaction with Legal Holds
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
MinIO supports enabling a legal hold lock on objects. Enabling legal hold on an
|
||||
object prevents any modification or deletion of the object.
|
||||
|
||||
An object with an active legal hold remains locked regardless of the :mc:`mc
|
||||
lock` bucket configuration. Setting, modifying, or clearing the bucket default
|
||||
object lock settings has no effect on objects under legal hold. Object lock
|
||||
settings only apply after the legal hold is explicitly disabled.
|
||||
|
||||
For more information on object legal holds, see :mc-cmd:`mc legalhold`.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Get Bucket Object Lock Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
This example assumes that the specified bucket has object locking enabled.
|
||||
See :mc-cmd-option:`mc mb with-lock` for more information on creating buckets
|
||||
with object locking enabled.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc legalhold play/mybucket info
|
||||
|
||||
Clear Bucket Object Lock Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
This example assumes that the specified bucket has object locking enabled.
|
||||
See :mc-cmd-option:`mc mb with-lock` for more information on creating buckets
|
||||
with object locking enabled.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc legalhold play/mybucket clear
|
||||
|
||||
Set Bucket Object Lock Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
This example assumes that the specified bucket has object locking enabled.
|
||||
See :mc-cmd-option:`mc mb with-lock` for more information on creating buckets
|
||||
with object locking enabled.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc legalhold play/mybucket governance 30d
|
||||
For older versions of :program:`mc`, use ``mc lock --help`` for usage.
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc ls
|
||||
|
||||
@ -21,35 +21,71 @@ functionality as the ``ls`` command.
|
||||
|
||||
.. end-mc-ls-desc
|
||||
|
||||
Quick Reference
|
||||
---------------
|
||||
Examples
|
||||
--------
|
||||
|
||||
:mc-cmd:`mc ls play/mybucket <mc ls TARGET>`
|
||||
Lists the contents of the ``mybucket`` bucket. ``play`` corresponds to the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible service.
|
||||
List Bucket Contents
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc-cmd:`mc ls --recursive play <mc ls recursive>`
|
||||
Recursively lists all buckets and objects on the S3-compatible service.
|
||||
``play`` corresponds to the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3-compatible service.
|
||||
Use :mc-cmd:`mc ls <mc ls TARGET>` to list the contents of a bucket:
|
||||
|
||||
:mc-cmd:`mc ls --versions play/myversionedbucket <mc ls versions>`
|
||||
Lists the version of all objects in the ``myversionbucket`` bucket. ``play``
|
||||
corresponds to the :mc-cmd:`alias <mc alias>` of a configured S3-compatible
|
||||
service.
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
:mc-cmd-option:`mc ls versions` requires :ref:`bucket versioning
|
||||
<minio-bucket-versioning>`. Use :mc:`mc version` to enable versioning
|
||||
on a bucket.
|
||||
mc ls [--recursive] ALIAS/PATH
|
||||
|
||||
:mc-cmd:`mc ls --rewind 7d play/myversionedbucket <mc ls versions>`
|
||||
Lists the contents of the ``myversionedbucket`` bucket as they
|
||||
existed 7 days prior to the current date. ``play`` corresponds to the
|
||||
:mc-cmd:`alias <mc alias>` of a configured S3-compatible service.
|
||||
- Replace :mc-cmd:`ALIAS <mc ls TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
:mc-cmd-option:`mc ls versions` requires :ref:`bucket versioning
|
||||
<minio-bucket-versioning>`. Use :mc:`mc version` to enable versioning
|
||||
on a bucket.
|
||||
- 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
|
||||
------
|
||||
@ -71,7 +107,6 @@ Syntax
|
||||
:mc-cmd:`mc ls` supports the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
:fullpath:
|
||||
|
||||
*Required* The full path to one or more locations whose contents the command
|
||||
lists.
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc mb
|
||||
|
||||
@ -22,6 +22,37 @@ 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
|
||||
------
|
||||
|
||||
@ -72,24 +103,3 @@ Syntax
|
||||
Bucket Object Retention, or Bucket Legal Hold if object locking is
|
||||
disabled for a bucket.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
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
|
||||
--------
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc mb --with-lock play/mybucket
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc mirror
|
||||
|
||||
@ -15,12 +15,74 @@ Description
|
||||
|
||||
.. start-mc-mirror-desc
|
||||
|
||||
The :mc:`mc mirror` command synchronizes content between a source
|
||||
filesystem and a target S3-compatible service. :mc:`~mc mirror` has
|
||||
similar functionality to ``rsync``.
|
||||
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
|
||||
------
|
||||
|
||||
@ -34,20 +96,53 @@ Syntax
|
||||
|
||||
.. mc-cmd:: SOURCE
|
||||
|
||||
**REQUIRED**
|
||||
*REQUIRED*
|
||||
|
||||
The full path to the object or directory to synchronize. If specifying
|
||||
a directory, :mc:`mc mirror` synchronizes all objects in the
|
||||
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**
|
||||
*REQUIRED*
|
||||
|
||||
The full path to bucket in which :mc:`mc mirror` copies
|
||||
synchronized SOURCE objects. Specify the :mc:`alias <mc alias>` of a
|
||||
configured S3 service as the prefix to the :mc-cmd:`~mc mirror TARGET`
|
||||
path.
|
||||
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:
|
||||
@ -140,34 +235,3 @@ Syntax
|
||||
You can only delete encrypted objects if you specify the correct
|
||||
:mc-cmd-option:`~mc mirror encrypt-key` secret key.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Mirror a Local Directory to an S3 Service
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
|
||||
.. code-block::
|
||||
:class: copyable
|
||||
|
||||
mc mirror ~/data/ play/mybucket
|
||||
|
||||
Continuously Mirror a Local Directory to an S3 Service
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
|
||||
.. code-block::
|
||||
:class: copyable
|
||||
|
||||
mc mirror --watch ~/data/ play/mybucket
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc mv
|
||||
|
||||
@ -20,6 +20,120 @@ 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
|
||||
------
|
||||
|
||||
@ -33,7 +147,7 @@ Syntax
|
||||
|
||||
.. mc-cmd:: SOURCE
|
||||
|
||||
**REQUIRED**
|
||||
*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>`.
|
||||
@ -52,10 +166,10 @@ Syntax
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
**REQUIRED**
|
||||
*REQUIRED*
|
||||
|
||||
The full path to the bucket to move the specified
|
||||
:mc-cmd:`~mc mv SOURCES` to. Specify the :mc:`alias <mc alias>`
|
||||
: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.
|
||||
|
||||
@ -152,123 +266,5 @@ Syntax
|
||||
environment variable for retrieving a list of encryption key-value pairs
|
||||
as an alternative to specifying them on the command line.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
:mc:`mc mv` verifies all move operations to
|
||||
object storage using MD5SUM checksums.
|
||||
|
||||
Interrupted or failed move operations can resume from the point of failure
|
||||
by issuing the :mc:`mc mv` operation again with the
|
||||
:mc-cmd-option:`~mc mv continue` argument.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Move 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 mv myobject.txt play/mybucket
|
||||
|
||||
Move 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 mv --attr key1=value1;key2=value2 myobject.txt play/mybucket
|
||||
|
||||
Move a folder recursively from MinIO cloud storage to Amazon S3 cloud storage with specified metadata.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-s3-alias
|
||||
:end-before: end-play-s3-alias
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc mv --attr Cache-Control=max-age=90000,min-fresh=9000\;key1=value1\;key2=value2 \
|
||||
--recursive play/mybucket/bucketname/ s3/mybucket/
|
||||
|
||||
|
||||
Move 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 mv --storage-class REDUCED_REDUNDANCY myobject.txt play/mybucket
|
||||
|
||||
Move a server-side encrypted file to an object storage.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-s3-alias
|
||||
:end-before: end-play-s3-alias
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc mv --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 mv` key rotation requires creating an additional alias with the same
|
||||
endpoing as the target S3 service alias. :mc:`mc mv` 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 mv --encrypt-key 'myminio1/mybucket=32byteslongsecretkeymustgenerate , myminio2/mybucket/=32byteslongsecretkeymustgenerat1' \
|
||||
myminio1/mybucket/encryptedobject myminio2/mybucket/encryptedobject
|
||||
|
||||
Move 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 mv --attr Cache-Control=no-cache myscript.js play/mybucket
|
||||
|
||||
Move 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 mv -a myobject.txt play/mybucket
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc policy
|
||||
|
||||
@ -27,6 +27,92 @@ 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
|
||||
------
|
||||
|
||||
@ -39,6 +125,7 @@ Syntax
|
||||
: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:
|
||||
@ -74,6 +161,7 @@ Syntax
|
||||
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:
|
||||
@ -92,7 +180,7 @@ Syntax
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
The full path to the bucket, folder, orobject to which the command applies
|
||||
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:
|
||||
@ -102,6 +190,7 @@ Syntax
|
||||
mc set public play/mybucket
|
||||
|
||||
.. mc-cmd:: get
|
||||
:fullpath:
|
||||
|
||||
Prints the current anonymous policy for the specified bucket, folder,
|
||||
or object on the console.
|
||||
@ -113,15 +202,21 @@ Syntax
|
||||
|
||||
mc policy get TARGET
|
||||
|
||||
Specify the :mc:`alias <mc alias>` of a configured S3 service
|
||||
as the prefix to the ``TARGET`` bucket path. For example:
|
||||
The command requires the following arguments:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc get play/mybucket
|
||||
.. 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.
|
||||
@ -132,16 +227,22 @@ Syntax
|
||||
:class: copyable
|
||||
|
||||
mc policy get-json TARGET
|
||||
|
||||
Specify the :mc:`alias <mc alias>` of a configured S3 service
|
||||
as the prefix to the ``TARGET`` bucket path. For example:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
The command requires the following arguments:
|
||||
|
||||
mc policy get-json play/mybucket
|
||||
.. 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.
|
||||
@ -153,69 +254,18 @@ Syntax
|
||||
|
||||
mc policy list TARGET
|
||||
|
||||
Specify the :mc:`alias <mc alias>` of a configured S3 service
|
||||
as the prefix to the ``TARGET`` bucket path. For example:
|
||||
The command requires the following arguments:
|
||||
|
||||
.. mc-cmd:: TARGET
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
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:
|
||||
|
||||
mc policy list play/mybucket
|
||||
.. code-block:: shell
|
||||
|
||||
mc set public play/mybucket
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Get Current Anonymous Policy for Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy get play/mybucket
|
||||
|
||||
To retrieve the :s3-docs`IAM JSON policy document <using-iam-policies>`, use the
|
||||
:mc-cmd:`mc policy get-json` mc:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy get-json play/mybucket
|
||||
|
||||
Set Anonymous Policy for Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy set upload play/mybucket
|
||||
|
||||
See :mc-cmd:`mc policy set` for the list of supported built-in policies.
|
||||
|
||||
To set the anonymous policy for the specified bucket using
|
||||
an :s3-docs:`IAM JSON file <using-iam-policies>`, use the
|
||||
:mc-cmd:`mc policy set-json` mc:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy set-json ~/policies/s3-upload.json play/mybucket
|
||||
|
||||
Remove Anonymous Policy for Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc policy set none play/mybucket
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc rb
|
||||
|
||||
@ -19,10 +19,26 @@ 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 rb` instead.
|
||||
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
|
||||
------
|
||||
|
||||
@ -31,7 +47,19 @@ Syntax
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc rb [FLAGS] SOURCE TARGET
|
||||
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:
|
||||
@ -43,17 +71,3 @@ Syntax
|
||||
|
||||
Allows running :mc:`mc rb` when the :mc-cmd:`~mc rb TARGET` specifies the
|
||||
root (all buckets) on the S3-compatible service.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc rb play/mybucket
|
@ -23,30 +23,246 @@ object locking and data retention, see <link>.
|
||||
|
||||
.. end-mc-retention-desc
|
||||
|
||||
.. important::
|
||||
|
||||
: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.
|
||||
|
||||
.. note::
|
||||
|
||||
Starting in version :release:``, :mc:`mc retention` fully replaces :mc:`mc
|
||||
lock` for setting the default object lock settings for a bucket.
|
||||
:release:`` deprecates and removes :mc:`mc lock`.
|
||||
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.
|
||||
|
||||
Syntax
|
||||
------
|
||||
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.
|
||||
|
||||
:mc:`~mc retention` has the following syntax:
|
||||
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 COMMANDS [COMMAND ARGUMENTS]
|
||||
mc retention --recursive --default set ALIAS/PATH MODE DURATION
|
||||
|
||||
:mc:`~mc retention` supports the following commands:
|
||||
- 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:
|
||||
@ -61,118 +277,31 @@ Syntax
|
||||
|
||||
mc retention set [FLAGS] TARGET 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 verison-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:`mc retention set` supports the following arguments:
|
||||
|
||||
.. 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`.
|
||||
|
||||
.. versionadded:: RELEASE.2020-08-XXT00-00-00Z
|
||||
|
||||
:mc-cmd-option:`mc retention set default` replaces the functionality of
|
||||
the deprecated :mc-cmd:`mc lock` command.
|
||||
|
||||
If specifying :mc-cmd-option:`~mc retention set default`,
|
||||
:mc-cmd:`mc retention set` ignores all other flags.
|
||||
|
||||
.. mc-cmd:: version-id
|
||||
:option:
|
||||
|
||||
Applies the object lock settings to the specified version of the
|
||||
:mc-cmd:`~mc retention set TARGET` object. Requires
|
||||
the bucket to have versioning enabled. Use :mc:`mc version` to
|
||||
enable bucket versioning.
|
||||
|
||||
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:
|
||||
|
||||
Applies the object lock settings to all versions of the
|
||||
:mc-cmd:`~mc retention set TARGET` object or object(s). Requires the
|
||||
bucket to have versioning enabled. Use :mc:`mc version` to enable bucket
|
||||
versioning.
|
||||
|
||||
Use :mc-cmd-option:`~mc retention set rewind` and
|
||||
:mc-cmd-option:`~mc retention set versions` together to apply the object
|
||||
lock settings to all versions of the object or object(s) which existed at
|
||||
the specified duration prior to the current date. *or* at the specified
|
||||
date.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`~mc retention set version-id`.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
Applies the object lock settings to the latest version of the object or
|
||||
object(s) which existed at either the specified duration prior to the
|
||||
current date *or* at a specific date.
|
||||
|
||||
- For duration, specify a string in ``#d#hh#mm#ss`` format. For example:
|
||||
``--rewind "1d2hh3mm4ss"``.
|
||||
|
||||
- For a date in time, specify an ISO8601-formatted timestamp. For example:
|
||||
``--rewind "2020.03.24T10:00"``.
|
||||
|
||||
For example, to apply the object lock settings to the object or object(s)
|
||||
as they existed 30 days prior to the current date: ``--rewind "30d"``
|
||||
|
||||
Use :mc-cmd-option:`~mc retention set rewind` and
|
||||
:mc-cmd-option:`~mc retention set versions` together to apply the object
|
||||
lock settings to all versions of the object or object(s) which existed at
|
||||
the specified duration prior to the current date. *or* at the specified
|
||||
date.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`~mc retention set version-id`.
|
||||
|
||||
.. 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:
|
||||
*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 specifying a bucket prefix, include the
|
||||
:mc-cmd-option:`~mc retention set recursive` flag to apply the object
|
||||
lock configuration to all objects in the bucket.
|
||||
- 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
|
||||
|
||||
@ -199,7 +328,77 @@ Syntax
|
||||
- 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`.
|
||||
@ -211,18 +410,31 @@ Syntax
|
||||
|
||||
mc retention info [ARGUMENTS] TARGET
|
||||
|
||||
- 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 verison-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:`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:
|
||||
|
||||
@ -237,21 +449,26 @@ Syntax
|
||||
Returns the default object lock settings for the bucket specified to
|
||||
:mc-cmd:`~mc retention info TARGET`.
|
||||
|
||||
.. versionadded:: RELEASE.2020-08-XXT00-00-00Z
|
||||
|
||||
:mc-cmd-option:`mc retention info default` replaces the functionality
|
||||
of the deprecated :mc-cmd:`mc lock info` command.
|
||||
|
||||
If specifying :mc-cmd-option:`~mc retention info default`,
|
||||
:mc-cmd:`mc retention info` ignores all other flags.
|
||||
|
||||
.. mc-cmd:: version-id
|
||||
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:
|
||||
|
||||
Returns the object lock settings of the specified version of the
|
||||
:mc-cmd:`~mc retention info TARGET` object. Requires
|
||||
the bucket to have versioning enabled. Use :mc:`mc version` to
|
||||
enable bucket versioning.
|
||||
.. 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:
|
||||
|
||||
@ -262,80 +479,55 @@ Syntax
|
||||
.. mc-cmd:: versions
|
||||
:option:
|
||||
|
||||
Returns the object lock settings of all versions of the
|
||||
:mc-cmd:`~mc retention info TARGET` object or object(s). Requires the
|
||||
bucket to have versioning enabled. Use :mc:`mc version` to enable bucket
|
||||
versioning.
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versions-desc-2
|
||||
:end-before: end-versions-desc-2
|
||||
|
||||
Use :mc-cmd-option:`~mc retention info rewind` and
|
||||
:mc-cmd-option:`~mc retention info versions` together to return the object
|
||||
lock settings of all versions of the object or object(s) which existed at
|
||||
the specified duration prior to the current date. *or* at the specified
|
||||
date.
|
||||
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.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`~mc retention info version-id`.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
Returns the object lock settings of the latest version of the object or
|
||||
object(s) which existed at either the specified duration prior to the
|
||||
current date *or* at a specific date.
|
||||
|
||||
- For duration, specify a string in ``#d#hh#mm#ss`` format. For example:
|
||||
``--rewind "1d2hh3mm4ss"``.
|
||||
|
||||
- For a date in time, specify an ISO8601-formatted timestamp. For example:
|
||||
``--rewind "2020.03.24T10:00"``.
|
||||
|
||||
For example, to return the object lock settings to the object or object(s)
|
||||
as they existed 30 days prior to the current date: ``--rewind "30d"``
|
||||
|
||||
Use :mc-cmd-option:`~mc retention info rewind` and
|
||||
:mc-cmd-option:`~mc retention info versions` together to return the object
|
||||
lock settings of all versions of the object or object(s) which existed at
|
||||
the specified duration prior to the current date. *or* at the specified
|
||||
date.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`~mc retention info version-id`.
|
||||
|
||||
.. 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 play/mybucket/object.txt MODE VALIDITY
|
||||
|
||||
If specifying a bucket or bucket prefix, include the
|
||||
:mc-cmd-option:`~mc retention info recursive` flag to return the object
|
||||
lock configuration to all objects in the prefix.
|
||||
.. |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 info` has the following syntax:
|
||||
:mc-cmd:`mc retention clear` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention clear [ARGUMENTS] TARGET
|
||||
|
||||
- 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.
|
||||
:mc-cmd:`mc retention clear` supports the following arguments:
|
||||
|
||||
- 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 verison-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:: TARGET
|
||||
|
||||
:mc-cmd:`mc retention info` supports the following arguments:
|
||||
*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:
|
||||
@ -350,22 +542,27 @@ Syntax
|
||||
|
||||
Clears the default object lock settings for the bucket specified to
|
||||
:mc-cmd:`~mc retention clear TARGET`.
|
||||
|
||||
.. versionadded:: RELEASE.2020-08-XXT00-00-00Z
|
||||
|
||||
:mc-cmd-option:`mc retention clear default` replaces the functionality
|
||||
of the deprecated :mc-cmd:`mc lock clear` command.
|
||||
|
||||
If specifying :mc-cmd-option:`~mc retention clear default`,
|
||||
:mc-cmd:`mc retention clear` ignores all other flags.
|
||||
|
||||
.. mc-cmd:: version-id
|
||||
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:
|
||||
|
||||
Clears the object lock settings of the specified version of the
|
||||
:mc-cmd:`~mc retention clear TARGET` object. Requires
|
||||
the bucket to have versioning enabled. Use :mc:`mc version` to
|
||||
enable bucket versioning.
|
||||
.. 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:
|
||||
|
||||
@ -376,211 +573,15 @@ Syntax
|
||||
.. mc-cmd:: versions
|
||||
:option:
|
||||
|
||||
Clears the object lock settings of all versions of the
|
||||
:mc-cmd:`~mc retention clear TARGET` object or object(s). Requires the
|
||||
bucket to have versioning enabled. Use :mc:`mc version` to enable bucket
|
||||
versioning.
|
||||
.. include:: /includes/facts-versioning.rst
|
||||
:start-after: start-versions-desc-3
|
||||
:end-before: end-versions-desc-3
|
||||
|
||||
Use :mc-cmd-option:`~mc retention clear rewind` and
|
||||
:mc-cmd-option:`~mc retention clear versions` together to clear the
|
||||
object lock settings of all versions of the object or object(s) which
|
||||
existed at the specified duration prior to the current date. *or* at the
|
||||
specified date.
|
||||
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.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`~mc retention clear version-id`.
|
||||
|
||||
.. mc-cmd:: rewind
|
||||
:option:
|
||||
|
||||
Clears the object lock settings of the latest version of the object or
|
||||
object(s) which existed at either the specified duration prior to the
|
||||
current date *or* at a specific date.
|
||||
|
||||
- For duration, specify a string in ``#d#hh#mm#ss`` format. For example:
|
||||
``--rewind "1d2hh3mm4ss"``.
|
||||
|
||||
- For a date in time, specify an ISO8601-formatted timestamp. For example:
|
||||
``--rewind "2020.03.24T10:00"``.
|
||||
|
||||
For example, to clear the object lock settings to the object or object(s)
|
||||
as they existed 30 days prior to the current date: ``--rewind "30d"``
|
||||
|
||||
Use :mc-cmd-option:`~mc retention clear rewind` and
|
||||
:mc-cmd-option:`~mc retention clear versions` together to clear the
|
||||
object lock settings of all versions of the object or object(s) which
|
||||
existed at the specified duration prior to the current date *or* at the
|
||||
specified date.
|
||||
|
||||
Mutually exclusive with :mc-cmd-option:`~mc retention clear version-id`.
|
||||
|
||||
.. 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 MODE VALIDITY
|
||||
|
||||
If specifying a bucket prefix, include the
|
||||
:mc-cmd-option:`~mc retention info recursive` flag to return the object
|
||||
lock configuration to all objects in the prefix.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
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).
|
||||
|
||||
- Use the :mc-cmd-option:`mc retention set versions`,
|
||||
:mc-cmd-option:`mc retention info versions`, or
|
||||
:mc-cmd-option:`mc retention clear versions` to target
|
||||
all versions of an object or object(s).
|
||||
|
||||
- Use the :mc-cmd-option:`mc retention set version-id`,
|
||||
:mc-cmd-option:`mc retention info version-id`, or
|
||||
:mc-cmd-option:`mc retention clear version-id` to target a specific
|
||||
version of an object.
|
||||
|
||||
Interaction with Legal Holds
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Enabling a legal hold on an object prevents any modification or deletion of that
|
||||
object, similar to the :mc-cmd:`COMPLIANCE <mc retention set MODE>` object
|
||||
locking mode. Legal holds are independent of object lock settings - an object
|
||||
can have both a legal hold *and* object locking enabled at the same time.
|
||||
*However*, the legal hold *overrides* the object lock settings. That is,
|
||||
regardless of the object lock settings, the legal hold prevents any object
|
||||
modification or deletion until the hold is explicitly lifted. Setting,
|
||||
modifying, or clearing object lock 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 Bucket Object Lock Configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
This example assumes that the specified bucket has object locking enabled.
|
||||
See :mc-cmd-option:`mc mb with-lock` for more information on creating buckets
|
||||
with object locking enabled.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention --recursive --default set play/mybucket/ governance 30d
|
||||
|
||||
Set Object Lock Configuration for Specific Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
This example assumes that the specified bucket has object locking enabled.
|
||||
See :mc-cmd-option:`mc mb with-lock` for more information on creating buckets
|
||||
with object locking enabled.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention set play/mybucket/data.csv governance 30d
|
||||
|
||||
Set Object Lock Configuration for Versioned Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
This example assumes that the specified bucket has object locking enabled.
|
||||
See :mc-cmd-option:`mc mb with-lock` for more information on creating buckets
|
||||
with object locking enabled.
|
||||
|
||||
For buckets with :mc:`versioning <mc version>` enabled, use the
|
||||
:mc-cmd-option:`~mc retention set versions` option to apply the object lock
|
||||
settings to all versions of the object.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention --versions set play/mybucket/data.csv governance 30d
|
||||
|
||||
Use the :mc-cmd-option:`~mc retention set version-id` option to apply the
|
||||
object lock settings to a specific version of the object.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention --version-id hTyrbac12.sdsd set play/mybucket/data.csv governance 30d
|
||||
|
||||
Retrieve Object Lock Settings for an Object or Object(s)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
This example assumes that the specified bucket has object locking enabled.
|
||||
See :mc-cmd-option:`mc mb with-lock` for more information on creating buckets
|
||||
with object locking enabled.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention info play/mybucket/data.csv
|
||||
|
||||
To retrieve the object lock settings for all objects in the bucket or a bucket
|
||||
prefix, include the :mc-cmd-option:`~mc retention info recursive` option:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention --recursive info play/mybucket
|
||||
|
||||
mc retention --recursive info play/mybucket/myprefix/
|
||||
|
||||
Clear Object Lock Settings for an Object or Object(s)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
This example assumes that the specified bucket has object locking enabled.
|
||||
See :mc-cmd-option:`mc mb with-lock` for more information on creating buckets
|
||||
with object locking enabled.
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention clear play/mybucket/data.csv
|
||||
|
||||
To clear the object lock settings for all objects in the bucket or a bucket
|
||||
prefix, include the :mc-cmd-option:`~mc retention info recursive` option:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc retention --recursive clear play/mybucket
|
||||
|
||||
mc retention --recursive clear play/mybucket/myprefix/
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc rm
|
||||
|
||||
@ -20,6 +20,92 @@ 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:`mc mv --continue` or :mc-cmd:`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
|
||||
------
|
||||
|
||||
@ -29,7 +115,7 @@ Syntax
|
||||
.. |versionid| replace:: :mc-cmd-option:`~mc rm version-id`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc rm TARGET`
|
||||
|
||||
:mc:`~mc rm` has the following syntax:
|
||||
:mc:`mc rm` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
@ -175,68 +261,7 @@ Syntax
|
||||
environment variable for populating the list of encryption key-value
|
||||
pairs as an alternative to specifying them on the command line.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
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
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc rm play/mybucket/myobject.txt
|
||||
|
||||
Recursively Remove a Bucket's Contents
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc rm --recursive --force play/mybucket
|
||||
|
||||
Remove All Incomplete Upload Files for an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: moveable
|
||||
|
||||
mc rm --incomplete play/mybucket/myobject.1gig
|
||||
|
||||
Remove Objects Older Than Specified Time Period
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: moveable
|
||||
|
||||
mc rm --recursive --force --older-than 1d2h30m play/mybucket
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc share
|
||||
|
||||
@ -25,6 +25,136 @@ 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
|
||||
------
|
||||
|
||||
@ -32,12 +162,6 @@ Syntax
|
||||
.. |versionid| replace:: :mc-cmd-option:`~mc share download version-id`
|
||||
.. |alias| replace:: :mc-cmd-option:`~mc share download TARGET`
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc share COMMAND
|
||||
|
||||
:mc:`~mc share` supports the following commands:
|
||||
|
||||
.. mc-cmd:: download
|
||||
:fullpath:
|
||||
|
||||
@ -123,7 +247,7 @@ Syntax
|
||||
|
||||
Replace ``<FILE>`` with the path to the file to upload.
|
||||
|
||||
Replace ``<NAME>`` with the name of the file once uploaded.
|
||||
Replace ``<NAME>`` with the file once uploaded.
|
||||
|
||||
|
||||
.. mc-cmd:: expire, E
|
||||
@ -159,118 +283,3 @@ Syntax
|
||||
|
||||
List all unexpired URLs generated by :mc-cmd:`mc share download`.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Generate a CURL GET Command for an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc share download play/mybucket/myobject.txt
|
||||
|
||||
To specify a custom expiry, pass the ``--expiry`` flag. The following
|
||||
command sets a 4 hour expiry for the generated URL:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc share download --expiry 4h play/mybucket/myobject.txt
|
||||
|
||||
Generate a CURL GET Command For Each Object in Bucket or Bucket Prefix
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc share download --recursive play/mybucket/
|
||||
|
||||
The command returns a CURL command for each object in the bucket or bucket
|
||||
prefix.
|
||||
|
||||
To specify a custom expiry, pass the ``--expiry`` flag. The following
|
||||
command sets a 4 hour expiry for the generated URL:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc share download --recursive --expiry 4h play/mybucket/
|
||||
|
||||
Generate a CURL POST Command for an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc share upload play/mybucket/myobject.csv
|
||||
|
||||
The command returns a CURL command for uploading an object to the specified
|
||||
bucket with the object name. Replace the ``<FILE>`` string in the returned
|
||||
CURL command with the path to the file to upload.
|
||||
|
||||
To specify a custom expiry, pass the ``--expiry`` flag. The following
|
||||
command sets a 4 hour expiry for the generated URL:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc share upload --expiry 4h play/mybucket/myobject.csv
|
||||
|
||||
Generate a CURL POST Command for a Bucket or Bucket Prefix
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc share upload --recursive play/mybucket/photos
|
||||
|
||||
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.
|
||||
|
||||
To specify a custom expiry, pass the ``--expiry`` flag. The following
|
||||
command sets a 4 hour expiry for the generated URL:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc share upload --recursive --expiry 4h play/mybucket/photos
|
||||
|
||||
You can use a shell script loop to recursively upload the contents of a bucket
|
||||
to the S3-compatible service. The following example uses a ``for in``
|
||||
loop:
|
||||
|
||||
.. 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.
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc sql
|
||||
|
||||
@ -24,6 +24,146 @@ 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
|
||||
------
|
||||
|
||||
@ -139,146 +279,3 @@ Syntax
|
||||
environment variable for populating the list of encryption key-value
|
||||
pairs as an alternative to specifying them on the command line.
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
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
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc sql --recursive \
|
||||
--query "select * from S3Object" s3/personalbucket/my-large-csvs/
|
||||
|
||||
Run an Aggregation Query on an Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc sql --query "select count(s.power) from S3Object" myminio/iot-devices/power-ratio.csv
|
||||
|
||||
Run an Aggregation Query on an Encrypted Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc sql --encrypt-key "myminio/iot-devices=32byteslongsecretkeymustbegiven1" \
|
||||
--query "select count(s.power) from S3Object" myminio/iot-devices/power-ratio-encrypted.csv
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc stat
|
||||
|
||||
@ -21,6 +21,41 @@ 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
|
||||
------
|
||||
|
||||
@ -71,18 +106,3 @@ Syntax
|
||||
: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.
|
||||
|
||||
|
||||
|
||||
Behavior
|
||||
--------
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
@ -20,34 +20,67 @@ bucket or object.
|
||||
|
||||
.. end-mc-tag-desc.
|
||||
|
||||
Quick Reference
|
||||
---------------
|
||||
Examples
|
||||
--------
|
||||
|
||||
:mc-cmd:`mc tag set play/mybucket/myobject.csv "tag1=value1,tag2=value2" <mc tag set>`
|
||||
Applies the tags ``tag1`` and ``tag2`` and their corresponding values to
|
||||
the ``myobject.csv`` object in the ``mybucket`` bucket. ``play``
|
||||
corresponds to the :mc-cmd:`alias <mc alias>` of a configured S3-compatible
|
||||
service.
|
||||
Apply Tags to a Bucket or Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc-cmd:`mc tag remove play/mybucket/myobject.csv <mc tag remove>`
|
||||
Removes all tags assigned to the ``myobject.csv`` bucket. ``play``
|
||||
corresponds to the :mc-cmd:`alias <mc alias>` of a configured S3-compatible
|
||||
service.
|
||||
Use :mc-cmd:`mc tag set` to apply tags to a bucket or object:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc tag 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 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 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
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Remove Tags from a Bucket or Object
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use :mc-cmd:`mc tag info` to retrieve all tags for a bucket or object:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc tag ALIAS/PATH
|
||||
|
||||
- Replace :mc-cmd:`ALIAS <mc tag info TARGET>` with the
|
||||
:mc:`alias <mc alias>` of the S3-compatible host.
|
||||
|
||||
- Replace :mc-cmd:`PATH <mc tag info TARGET>` with the path to the bucket
|
||||
or object on the S3-compatible host.
|
||||
|
||||
:mc-cmd:`mc tag info play/mybucket/myobject.csv <mc tag info>`
|
||||
Retrieves the tags assigned to the ``myobject.csv`` bucket. ``play``
|
||||
corresponds to the :mc-cmd:`alias <mc alias>` of a configured S3-compatible
|
||||
service.
|
||||
|
||||
Syntax
|
||||
------
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc tag COMMAND
|
||||
|
||||
:mc:`mc tag` supports the following commands:
|
||||
|
||||
.. |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`
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc tree
|
||||
|
||||
@ -17,14 +17,28 @@ Description
|
||||
|
||||
The :mc:`mc tree` command lists buckets and directories in a tree format.
|
||||
|
||||
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.
|
||||
|
||||
.. 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
|
||||
------
|
||||
|
||||
@ -66,14 +80,3 @@ Syntax
|
||||
:start-after: start-rewind-desc
|
||||
:end-before: end-rewind-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 tree play/mybucket
|
@ -15,7 +15,7 @@ Description
|
||||
|
||||
.. start-mc-update-desc
|
||||
|
||||
The :command:`mc update` command automatically updates the ``mc`` binary to
|
||||
The :mc:`mc update` command automatically updates the :program:`mc` binary to
|
||||
the latest stable version.
|
||||
|
||||
.. end-mc-update-desc
|
||||
@ -23,11 +23,11 @@ the latest stable version.
|
||||
Syntax
|
||||
------
|
||||
|
||||
:command:`~mc update` has the following syntax:
|
||||
:mc:`mc update` has the following syntax:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc update
|
||||
|
||||
Consider updating ``mc`` whenever you update the ``minio`` server binary to
|
||||
Use :mc:`mc update` after updating the :program:`minio` server binary to
|
||||
ensure consistent behavior and compatibility.
|
@ -45,24 +45,56 @@ 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.
|
||||
|
||||
Quick Reference
|
||||
---------------
|
||||
Common Operations
|
||||
-----------------
|
||||
|
||||
:mc-cmd:`mc version enable play/mybucket <mc version enable>`
|
||||
Enables bucket versioning on the ``mybucket`` bucket. ``play``
|
||||
corresponds to the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3-compatible service.
|
||||
Enable Bucket Versioning
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
:mc-cmd:`mc version disable play/mybucket <mc version disable>`
|
||||
Disables bucket versioning on the ``mybucket`` bucket. ``play``
|
||||
corresponds to the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3-compatible service.
|
||||
Use :mc-cmd:`mc version enable` to enable versioning on a bucket:
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
:mc-cmd:`mc version info play/mybucket <mc version info>`
|
||||
Retrieves the bucket versioning status of the ``mybucket`` bucket. ``play``
|
||||
corresponds to the :mc-cmd:`alias <mc alias>` of a configured
|
||||
S3-compatible service.
|
||||
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
|
||||
@ -147,31 +179,4 @@ Syntax
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mc version info play/mybucket
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Enable Bucket Versioning
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc version play/mybucket enable
|
||||
|
||||
Disable Bucket Versioning
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc version play/mybucket suspend
|
||||
mc version info play/mybucket
|
@ -6,7 +6,7 @@
|
||||
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
:depth: 1
|
||||
:depth: 2
|
||||
|
||||
.. mc:: mc watch
|
||||
|
||||
@ -21,6 +21,22 @@ 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
|
||||
------
|
||||
|
||||
@ -78,31 +94,5 @@ Syntax
|
||||
Recursively watch for events in the specified
|
||||
:mc-cmd:`~mc watch TARGET` bucket path or local directory.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Watch for Events in a Bucket
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc watch play/testbucket
|
||||
|
||||
Watch for Events in a Local Directory
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. include:: /includes/play-alias-available.rst
|
||||
:start-after: play-alias-only
|
||||
:end-before: end-play-alias-only
|
||||
|
||||
.. code-block:: shell
|
||||
:class: copyable
|
||||
|
||||
mc watch ~/photos
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user