mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 04:00:25 +03:00
Add MaxNoncurrentVersions to NoncurrentExpiration action (#13580)
This unit allows users to limit the maximum number of noncurrent
versions of an object.
To enable this rule you need the following *ilm.json*
```
cat >> ilm.json <<EOF
{
"Rules": [
{
"ID": "test-max-noncurrent",
"Status": "Enabled",
"Filter": {
"Prefix": "user-uploads/"
},
"NoncurrentVersionExpiration": {
"MaxNoncurrentVersions": 5
}
}
]
}
EOF
mc ilm import myminio/mybucket < ilm.json
```
This commit is contained in:
committed by
GitHub
parent
1e2fac054c
commit
3da9ee15d3
@@ -93,7 +93,8 @@ type FileInfoVersions struct {
|
||||
// latest version.
|
||||
LatestModTime time.Time `msg:"lm"`
|
||||
|
||||
Versions []FileInfo `msg:"vs"`
|
||||
Versions []FileInfo `msg:"vs"`
|
||||
FreeVersions []FileInfo `msg:"fvs"`
|
||||
}
|
||||
|
||||
// findVersionIndex will return the version index where the version
|
||||
|
||||
Reference in New Issue
Block a user