mirror of
https://github.com/minio/minio.git
synced 2025-03-02 23:09:13 -05:00
docs: Update ILM doc with versioning features (#10714)
This commit is contained in:
parent
d6d770c1b1
commit
6fd088f448
@ -12,7 +12,7 @@ Enable object lifecycle configuration on buckets to setup automatic deletion of
|
||||
- Enable bucket lifecycle configuration using `mc`:
|
||||
|
||||
```sh
|
||||
$ mc ilm import play/testbucket
|
||||
$ mc ilm import play/testbucket <<EOF
|
||||
{
|
||||
"Rules": [
|
||||
{
|
||||
@ -37,7 +37,10 @@ $ mc ilm import play/testbucket
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
```
|
||||
Lifecycle configuration imported successfully to `play/testbucket`.
|
||||
```
|
||||
|
||||
@ -52,6 +55,53 @@ TempUploads | temp/ | ✓ | ✓ | 7 day(s) | ✗
|
||||
------------|----------|------------|--------|--------------|--------------|------------------|------------------|------------------
|
||||
```
|
||||
|
||||
## 3. Activate ILM versioning features
|
||||
|
||||
This will only work with a versioned bucket, take a look at [Bucket Versioning Guide](https://docs.min.io/docs/minio-bucket-versioning-guide.html) for more understanding.
|
||||
|
||||
### 3.1 Automatic removal of non current objects versions
|
||||
|
||||
A non-current object version is a version which is not the latest for a given object. It is possible to set up an automatic removal of non-current versions when a version becomes older than a given number of days.
|
||||
|
||||
e.g., To scan objects stored under `user-uploads/` prefix and remove versions older than one year.
|
||||
```
|
||||
{
|
||||
"Rules": [
|
||||
{
|
||||
"ID": "Removing all old versions",
|
||||
"Filter": {
|
||||
"Prefix": "users-uploads/"
|
||||
},
|
||||
"NoncurrentVersionExpiration": {
|
||||
"NoncurrentDays": 365
|
||||
},
|
||||
"Status": "Enabled"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### 3.2 Automatic removal of delete markers with no other versions
|
||||
|
||||
When an object has only one version as a delete marker, the latter can be automatically removed after a certain number of days using the following configuration:
|
||||
|
||||
```
|
||||
{
|
||||
"Rules": [
|
||||
{
|
||||
"ID": "Removing all old versions",
|
||||
"Expiration": {
|
||||
"Days": 1,
|
||||
"ExpiredObjectDeleteMarker": true
|
||||
},
|
||||
"Status": "Enabled"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Explore Further
|
||||
- [MinIO | Golang Client API Reference](https://docs.min.io/docs/golang-client-api-reference.html#SetBucketLifecycle)
|
||||
- [Object Lifecycle Management](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
|
||||
|
Loading…
x
Reference in New Issue
Block a user