1
0
mirror of https://github.com/minio/docs.git synced 2025-07-31 18:04:52 +03:00

Exclude prefixes or folders from versioning (#769)

Object versioning can now be configured with certain exclusions (no
longer strictly on a per-bucket basis). Add documentation about how to
use the new options:
* `--excluded-prefixes` to exclude objects with certain prefixes
* `--exclude-folders` to exclude anything with name ending in `/`
(folders)

- [x] Exclude prefixes
- [x] Exclude folders
- [x] Wildcards/globbing
- [x] Limitations
- [x] View versioning exclusion configuration

Staged:
[Bucket
Versioning](http://192.241.195.202:9000/staging/DOCS-760/linux/html/administration/object-management/object-versioning.html)
[mc
version](http://192.241.195.202:9000/staging/DOCS-760/linux/html/reference/minio-mc/mc-version.html)

Fixes https://github.com/minio/docs/issues/760

---------

Co-authored-by: Krishnan Parthasarathi <krisis@users.noreply.github.com>
This commit is contained in:
Andrea Longo
2023-03-28 16:51:11 -06:00
committed by GitHub
parent 086fb8c327
commit 31d5fbd117
3 changed files with 161 additions and 14 deletions

View File

@ -52,7 +52,18 @@ The :mc:`mc version` command enables, suspends, and retrieves the
Parameters
~~~~~~~~~~
.. mc-cmd:: ALIAS
:required:
The :ref:`alias <alias>` of a MinIO deployment and the full path
to the bucket for which to set the versioning configuration. For example:
.. code-block:: shell
mc version enable myminio/mybucket
.. mc-cmd:: enable
:optional:
Enables versioning on the MinIO bucket specified to
:mc-cmd:`ALIAS <mc version ALIAS>`.
@ -60,15 +71,27 @@ Parameters
Mutually exclusive with :mc-cmd:`~mc version suspend` and
:mc-cmd:`~mc version info`
.. mc-cmd:: suspend
.. mc-cmd:: --exclude-folders
:optional:
Disables versioning on the MinIO bucket specified to
:mc-cmd:`ALIAS <mc version ALIAS>`.
Use with :mc-cmd:`mc version enable` to disable versioning on all folders (objects whose name ends with ``/``) in the specified bucket.
Mutually exclusive with :mc-cmd:`~mc version suspend` and
:mc-cmd:`~mc version info`
.. mc-cmd:: --excluded-prefixes
:optional:
Use with :mc-cmd:`mc version enable` to disable versioning on objects matching a list of prefixes, up to 10.
The list of prefixes match all objects containing the specified strings in their prefix or name, similar to a regular expression of the form ``prefix*``.
To match objects by prefix only, use ``prefix/*``.
For example, the following command excludes any objects containing ``_test`` or ``_temp`` in their prefix or name from versioning:
.. code-block:: shell
:class: copyable
mc version enable --excluded-prefixes "_test, _temp" local/my-bucket
.. mc-cmd:: info
:optional:
Returns the versioning configuration for the MinIO bucket specified to
:mc-cmd:`ALIAS <mc version ALIAS>`.
@ -76,14 +99,14 @@ Parameters
Mutually exclusive with :mc-cmd:`~mc version suspend` and
:mc-cmd:`~mc version info`
.. mc-cmd:: ALIAS
.. mc-cmd:: suspend
:optional:
*Required* The :ref:`alias <alias>` of a MinIO deployment and the full path
to the bucket for which to set the versioning configuration. For example:
Disables versioning on the MinIO bucket specified to
:mc-cmd:`ALIAS <mc version ALIAS>`.
.. code-block:: shell
mc version enable myminio/mybucket
Mutually exclusive with :mc-cmd:`~mc version suspend` and
:mc-cmd:`~mc version info`
Global Flags
~~~~~~~~~~~~
@ -171,4 +194,4 @@ S3 Compatibility
.. include:: /includes/common-minio-mc.rst
:start-after: start-minio-mc-s3-compatibility
:end-before: end-minio-mc-s3-compatibility
:end-before: end-minio-mc-s3-compatibility