You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 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
Copy file name to clipboardExpand all lines: source/administration/object-management/create-lifecycle-management-expiration-rule.rst
+26
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,14 @@ delete markers:
99
99
--noncurrent-expire-days NONCURRENT_DAYS \
100
100
--expire-delete-marker
101
101
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
+
102
110
- Replace :mc-cmd:`ALIAS <mc ilm rule add ALIAS>` with the
103
111
:mc:`alias <mc alias>` of the S3-compatible host.
104
112
@@ -110,3 +118,21 @@ delete markers:
110
118
which to expire noncurrent object versions. For example, specify ``30d`` to
111
119
expire a version after it has been noncurrent for at least 30 days.
112
120
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.
Copy file name to clipboardExpand all lines: source/administration/object-management/object-lifecycle-management.rst
+20-2
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ Versioned Buckets
110
110
~~~~~~~~~~~~~~~~~
111
111
112
112
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:
114
114
115
115
- MinIO applies the expiration option to only the *current* object version by creating a ``DeleteMarker`` as is normal with versioned delete.
116
116
@@ -120,9 +120,27 @@ MinIO has two specific default behaviors for versioned buckets:
120
120
121
121
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.
122
122
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.
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.
124
138
This permits the permanent deletion of the object after the specified number of days pass.
This flag *only* applies to objects that do **not** have a delete marker as the latest version.
132
+
129
133
.. mc-cmd:: --expire-days
130
134
:optional:
131
135
@@ -466,6 +470,25 @@ regardless of its transition status. Use
466
470
management rules for any potential interactions between expiry and transition
467
471
rules.
468
472
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.
Copy file name to clipboardExpand all lines: source/reference/minio-mc/mc-ilm-rule-edit.rst
+36
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,7 @@ rule on a MinIO bucket.
60
60
[--prefix "string"] \
61
61
[--enable] \
62
62
[--disable] \
63
+
[--expire-all-object-versions] \
63
64
[--expire-days "string"] \
64
65
[--expire-delete-marker] \
65
66
[--transition-days "string"] \
@@ -119,6 +120,22 @@ Parameters
119
120
120
121
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.
121
122
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.
This flag *only* applies to objects that do **not** have a delete marker as the latest version.
137
+
138
+
122
139
.. mc-cmd:: --expire-days
123
140
:optional:
124
141
@@ -323,6 +340,25 @@ For permissions required to edit a rule, refer to the :ref:`required permissions
323
340
Behavior
324
341
--------
325
342
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.
0 commit comments