From 6f0ed2a091e0f02d5052c4401b3b3d87ee67e7fb Mon Sep 17 00:00:00 2001 From: Andrea Longo Date: Sat, 26 Aug 2023 01:33:25 -0600 Subject: [PATCH] Add equivalent mc ilm rule commands for some JSON rule examples (#17923) --- docs/bucket/lifecycle/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/bucket/lifecycle/README.md b/docs/bucket/lifecycle/README.md index 9a5b2c873..456686cd8 100644 --- a/docs/bucket/lifecycle/README.md +++ b/docs/bucket/lifecycle/README.md @@ -84,6 +84,11 @@ e.g., To scan objects stored under `user-uploads/` prefix and remove versions ol } ``` +This JSON rule is equivalent to the following MinIO Client command: +``` +mc ilm rule add --noncurrent-expire-days 365 --prefix "user-uploads/" myminio/mydata +``` + ### 3.2 Automatic removal of noncurrent versions keeping only most recent ones after noncurrent days It is possible to configure automatic removal of older noncurrent versions keeping only the most recent `N` using `NewerNoncurrentVersions`. @@ -108,6 +113,11 @@ e.g, To remove noncurrent versions of all objects keeping the most recent 5 nonc } ``` +This JSON rule is equivalent to the following MinIO Client command: +``` +mc ilm rule add --noncurrent-expire-days 30 --noncurrent-expire-newer 5 myminio/mydata +``` + #### 3.2.a Automatic removal of noncurrent versions keeping only most recent ones immediately (MinIO only extension) This is available only on MinIO as an extension to the NewerNoncurrentVersions feature. The following rule makes it possible to remove older noncurrent versions