biothings.api
biothings.api copied to clipboard
Add S3 snapshot repository retention policy
Elasticsearch snapshot supports lifecycle management policy (SLM), we can set a policy like this:
"retention": {
"expire_after": "30d",
"min_count": 5,
"max_count": 50
}
Let's add it to hub config as an optional feature, likely in SNAPSHOT_CONFIG
, and set it during the creation of a snapshot repository.
REF: https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-take-snapshot.html#automate-snapshots-slm