Skip to content

Commit 7cc1bed

Browse files
committed
Adds information about changes to ILM deletes.
- New option with JSON to expire all versions of an object with a delete marker. - Changes `mc ilm rule` subcommand flags `--expire-all-object-versions` to note that only applies to objects without a delete marker. Closes #1201
1 parent 0747c9a commit 7cc1bed

File tree

5 files changed

+109
-2
lines changed

5 files changed

+109
-2
lines changed

source/administration/object-management/create-lifecycle-management-expiration-rule.rst

+26
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ delete markers:
9999
--noncurrent-expire-days NONCURRENT_DAYS \
100100
--expire-delete-marker
101101
102+
- To expire all versions of an object with no delete marker, include :mc-cmd:`~mc ilm rule add --expire-all-object-versions`.
103+
104+
.. code-block:: shell
105+
:class: copyable
106+
107+
mc ilm rule add ALIAS/PATH \
108+
--expire-all-object-versions
109+
102110
- Replace :mc-cmd:`ALIAS <mc ilm rule add ALIAS>` with the
103111
:mc:`alias <mc alias>` of the S3-compatible host.
104112

@@ -110,3 +118,21 @@ delete markers:
110118
which to expire noncurrent object versions. For example, specify ``30d`` to
111119
expire a version after it has been noncurrent for at least 30 days.
112120

121+
Expire All Versions of a Deleted Object
122+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123+
124+
Starting with :mc-release:`MinIO Server RELEASE.2024-05-01T01-11-10Z`, MinIO supports deleting all versions of an object that has a delete marker as its latest version.
125+
MinIO only supports this function with JSON.
126+
127+
To add this function, first export the rule to modify with :mc:`mc ilm rule export`.
128+
Modify the exported rule with additional ``JSON`` that resembles the following:
129+
130+
.. code-block:: text
131+
:class: copyable
132+
133+
<DelMarkerObjectExpiration>
134+
<Days> 10 </Days>
135+
</DelMarkerObjectExpiration>
136+
137+
This example ``JSON`` expires all versions of the deleted object after 10 days.
138+
Modify the value in the ``<Days>`` element to the number of days you want to wait after deleting or expiring the object.

source/administration/object-management/object-delete.rst

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ See the :ref:`scanner <minio-concepts-scanner>` page for more details on how the
9898
``DeleteMarkers`` are their own objects.
9999
Lifecycle rules can remove ``DeleteMarkers`` that are the only remaining versions of their objects.
100100

101+
.. versionchanged:: MinIO RELEASE.2024-05-01T01-11-10Z
102+
103+
With ``JSON``, lifecycle rules can remove all versions of a deleted object after a specified number of days.
104+
101105
Retained Objects
102106
----------------
103107

source/administration/object-management/object-lifecycle-management.rst

+20-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Versioned Buckets
110110
~~~~~~~~~~~~~~~~~
111111

112112
MinIO adopts :s3-docs:`S3 behavior <intro-lifecycle-rules.html#intro-lifecycle-rules-actions>` for expiration rules on :ref:`versioned buckets <minio-bucket-versioning>`.
113-
MinIO has two specific default behaviors for versioned buckets:
113+
MinIO has several default behaviors for versioned buckets:
114114

115115
- MinIO applies the expiration option to only the *current* object version by creating a ``DeleteMarker`` as is normal with versioned delete.
116116

@@ -120,9 +120,27 @@ MinIO has two specific default behaviors for versioned buckets:
120120

121121
To expire delete markers when there are no remaining versions for that object, specify the :mc-cmd:`~mc ilm rule add --expire-delete-marker` option when creating the expiration rule.
122122

123-
- To expire *all* versions of an object after a specified period of days, use the :mc-cmd:`~mc ilm rule add --expire-all-object-versions` flag with the :mc-cmd:`~mc ilm rule add --expire-days` flag.
123+
.. versionchanged:: MinIO RELEASE.2024-05-01T01-11-10Z
124+
125+
MinIO supports expiring all versions of an object where the latest version is a delete marker, *including expiring the delete marker*, but only with JSON.
126+
Add a JSON rule with :mc:`mc ilm rule import`.
127+
128+
For example, to expire all versions of a deleted object 10 days after the object deletion, use the following JSON:
129+
130+
.. code-block:: text
131+
:class: copyable
132+
133+
<DelMarkerObjectExpiration>
134+
<Days> 10 </Days>
135+
</DelMarkerObjectExpiration>
136+
137+
- To expire *all* versions of an object that does *not* have a delete marker after a specified period of days, use the :mc-cmd:`~mc ilm rule add --expire-all-object-versions` flag with the :mc-cmd:`~mc ilm rule add --expire-days` flag.
124138
This permits the permanent deletion of the object after the specified number of days pass.
125139

140+
.. versionchanged:: MinIO RELEASE.2024-05-01T01-11-10Z
141+
142+
This flag applies only to objects that do **not** have a delete marker.
143+
126144
.. _minio-lifecycle-management-scanner:
127145

128146
Lifecycle Management Object Scanner

source/reference/minio-mc/mc-ilm-rule-add.rst

+23
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ Parameters
126126

127127
After the :ref:`scanner <minio-concepts-scanner>` processes this command, no versions of the object remain on the deployment.
128128

129+
.. versionchanged:: MinIO RELEASE.2024-05-01T01-11-10Z
130+
131+
This flag *only* applies to objects that do **not** have a delete marker as the latest version.
132+
129133
.. mc-cmd:: --expire-days
130134
:optional:
131135

@@ -466,6 +470,25 @@ regardless of its transition status. Use
466470
management rules for any potential interactions between expiry and transition
467471
rules.
468472

473+
Expire All Versions of a Deleted Object
474+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
475+
476+
Starting with :mc-release:`MinIO Server RELEASE.2024-05-01T01-11-10Z`, MinIO supports deleting all versions of an object that has a delete marker as its latest version.
477+
MinIO only supports this function with JSON.
478+
479+
To add this function, first export the rule to modify with :mc:`mc ilm rule export`.
480+
Modify the file you exported the rule to with additional JSON that resembles the following:
481+
482+
.. code-block:: text
483+
:class: copyable
484+
485+
<DelMarkerObjectExpiration>
486+
<Days> 10 </Days>
487+
</DelMarkerObjectExpiration>
488+
489+
This example ``JSON`` expires all versions of the deleted object after 10 days.
490+
Modify the value in the ``<Days>`` element to the number of days you want to wait after deleting or expiring the object.
491+
469492
S3 Compatibility
470493
~~~~~~~~~~~~~~~~
471494

source/reference/minio-mc/mc-ilm-rule-edit.rst

+36
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ rule on a MinIO bucket.
6060
[--prefix "string"] \
6161
[--enable] \
6262
[--disable] \
63+
[--expire-all-object-versions] \
6364
[--expire-days "string"] \
6465
[--expire-delete-marker] \
6566
[--transition-days "string"] \
@@ -119,6 +120,22 @@ Parameters
119120
120121
The command modifies a rule that expires objects in the ``mydata`` bucket of the ``myminio`` ALIAS after 90 days for any object with the ``meetingnotes/`` prefix.
121122

123+
124+
.. mc-cmd:: --expire-all-object-versions
125+
:optional:
126+
127+
.. versionadded:: mc RELEASE.2024-02-24T01-33-20Z
128+
129+
Expire all current **and** noncurrent versions of an object.
130+
Use with the :mc-cmd:`~mc ilm rule add --expire-days` option to specify the number of days after which all versions of an object should be deleted by the scanner process.
131+
132+
After the :ref:`scanner <minio-concepts-scanner>` processes this command, no versions of the object remain on the deployment.
133+
134+
.. versionadded:: MinIO RELEASE.2024-05-01T01-11-10Z
135+
136+
This flag *only* applies to objects that do **not** have a delete marker as the latest version.
137+
138+
122139
.. mc-cmd:: --expire-days
123140
:optional:
124141

@@ -323,6 +340,25 @@ For permissions required to edit a rule, refer to the :ref:`required permissions
323340
Behavior
324341
--------
325342

343+
Expire All Versions of a Deleted Object
344+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
345+
346+
Starting with :mc-release:`MinIO Server RELEASE.2024-05-01T01-11-10Z`, MinIO supports deleting all versions of an object that has a delete marker as its latest version.
347+
MinIO only supports this function with JSON.
348+
349+
To add this function, first export the rule to modify with :mc:`mc ilm rule export`.
350+
Modify the file you exported the rule to with additional JSON that resembles the following:
351+
352+
.. code-block:: text
353+
:class: copyable
354+
355+
<DelMarkerObjectExpiration>
356+
<Days> 10 </Days>
357+
</DelMarkerObjectExpiration>
358+
359+
This example ``JSON`` expires all versions of the deleted object after 10 days.
360+
Modify the value in the ``<Days>`` element to the number of days you want to wait after deleting or expiring the object.
361+
326362
S3 Compatibility
327363
~~~~~~~~~~~~~~~~
328364

0 commit comments

Comments
 (0)