You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Harshavardhana
60417950c7
|
5 years ago | |
---|---|---|
.. | ||
README.md | 5 years ago |
README.md
Bucket Lifecycle Configuration Quickstart Guide
Enable object lifecycle configuration on buckets to setup automatic deletion of objects after a specified number of days or a specified date.
1. Prerequisites
- Install MinIO - MinIO Quickstart Guide.
- Install
mc
- mc Quickstart Guide
2. Enable bucket lifecycle configuration
- Create a bucket lifecycle configuration which expires the objects under the prefix
old/
on2020-01-01T00:00:00.000Z
date and the objects undertemp/
after 7 days. - Enable bucket lifecycle configuration using
mc
:
$ mc ilm import play/testbucket
{
"Rules": [
{
"Expiration": {
"Date": "2020-01-01T00:00:00.000Z"
},
"ID": "OldPictures",
"Filter": {
"Prefix": "old/"
},
"Status": "Enabled"
},
{
"Expiration": {
"Days": 7
},
"ID": "TempUploads",
"Filter": {
"Prefix": "temp/"
},
"Status": "Enabled"
}
]
}
Lifecycle configuration imported successfully to `play/testbucket`.
- List the current settings
$ mc ilm list play/testbucket
ID | Prefix | Enabled | Expiry | Date/Days | Transition | Date/Days | Storage-Class | Tags
------------|----------|------------|--------|--------------|--------------|------------------|------------------|------------------
OldPictures | old/ | ✓ | ✓ | 1 Jan 2020 | ✗ | | |
------------|----------|------------|--------|--------------|--------------|------------------|------------------|------------------
TempUploads | temp/ | ✓ | ✓ | 7 day(s) | ✗ | | |
------------|----------|------------|--------|--------------|--------------|------------------|------------------|------------------