mc retention: add --recursive and --bypass flags. (#3100)

--bypass flag allows overriding governance if user
has override permissions
This commit is contained in:
poornas
2020-03-19 12:24:09 -07:00
committed by GitHub
parent 91da0da183
commit 3230acae32
6 changed files with 38 additions and 18 deletions
+5 -3
View File
@@ -603,15 +603,17 @@ USAGE:
mc retention [FLAGS] TARGET [governance | compliance] [VALIDITY]
FLAGS:
--bypass bypass governance
--recursive, -r apply retention recursively
--json enable JSON formatted output
--help, -h show help
```
*Example: Set governance for 30 days for objects with prefix `prefix` on bucket `mybucket`*
*Example: Set governance for 30 days for object `prefix` on bucket `mybucket`*
```
mc retention myminio/mybucket/prefix governance 30d
Object retention successfully set for prefix `myminio/mybucket/prefix`.
mc retention myminio/mybucket/prefix governance 30d -r
Object retention successfully set for objects with prefix `myminio/mybucket/prefix`.
```
*Objects created with prefix `prefix` in the above bucket `mybucket` cannot be deleted until the compliance period is over*