Archival & Lifecycle
Automated object tiering, expiry policies, compliance holds, and cost-optimised long-term storage management.
On This Page
Lifecycle Overview
InfraHub Storage applies MinIO object lifecycle rules to automatically manage storage cost and compliance over time. Objects progress through three stages:
Hot — STANDARD
Cold — STANDARD_IA
Expired / Deleted
Storage Tiers
| Tier | Storage Class | Active Days | Access Pattern | Cost |
|---|---|---|---|---|
| Hot | STANDARD | 0 – 29 | Frequent reads/writes | Full rate |
| Cold | STANDARD_IA | 30 – 364 | Rare access — audit, legal, retrieval on demand | ~40% lower |
| Expired | — | 365+ | Deleted by MinIO lifecycle engine | Zero |
STANDARD and REDUCED_REDUNDANCY natively. The STANDARD_IA tier transition in MinIO is achieved via a lifecycle transition rule that moves objects to a different MinIO tier (requires MinIO Tier configuration). On AWS S3, STANDARD_IA is a native S3 storage class.
MinIO Lifecycle Policy
The following XML lifecycle policy implements the three-stage model. Apply it to the bizfirst-files bucket.
<LifecycleConfiguration>
<Rule>
<ID>bizfirst-storage-lifecycle</ID>
<Status>Enabled</Status>
<Filter>
<Prefix></Prefix> <!-- applies to all objects -->
</Filter>
<!-- Transition to cold tier at Day 30 -->
<Transition>
<Days>30</Days>
<StorageClass>STANDARD_IA</StorageClass>
</Transition>
<!-- Expire (delete) at Day 365 -->
<Expiration>
<Days>365</Days>
</Expiration>
</Rule>
</LifecycleConfiguration>
Applying the Policy
Using the MinIO Client (mc)
# Save the policy XML to a file
mc ilm import local/bizfirst-files < lifecycle.xml
# Verify the rule was applied
mc ilm ls local/bizfirst-files
Using the MinIO Console
Open Bucket Settings
In the MinIO Console, navigate to Buckets → bizfirst-files → Lifecycle.
Add Transition Rule
Click Add Lifecycle Rule. Set Prefix to empty (all objects), Transition after 30 days, Storage Class STANDARD_IA.
Add Expiry Rule
Add a second rule: Expiry after 365 days. This permanently deletes objects that have not been transitioned to a different tier.
Save & Verify
Click Save. Run mc ilm ls local/bizfirst-files to confirm both rules appear.
Compliance Holds
For objects that must be retained beyond the normal 365-day expiry (e.g. legal hold, audit evidence, regulatory requirement), apply an object lock or use a protected prefix that excludes those objects from the expiry rule.
Option 1 — Exclude a Prefix from Expiry
Use a separate lifecycle rule with <Prefix>compliance/</Prefix> that has no expiry. Store compliance-sensitive objects under the compliance/ prefix.
<Rule>
<ID>compliance-no-expiry</ID>
<Status>Enabled</Status>
<Filter><Prefix>compliance/</Prefix></Filter>
<Transition>
<Days>30</Days>
<StorageClass>STANDARD_IA</StorageClass>
</Transition>
<!-- No Expiration element — objects are retained indefinitely -->
</Rule>
Option 2 — MinIO Object Lock (WORM)
Enable Object Lock on the bucket at creation time. Apply retention locks per object using the MinIO SDK or mc:
mc retention set --default COMPLIANCE 2555d local/bizfirst-files
# 2555 days ≈ 7 years
Per-Tenant Archival
When PrependTenantID=true, every object key is prefixed with tenant_{tenantID}/. This makes it possible to apply per-tenant lifecycle rules using a prefix filter:
<Filter><Prefix>tenant_42/</Prefix></Filter>
Common scenarios:
| Scenario | Approach |
|---|---|
| Tenant cancels subscription | Apply immediate expiry rule to tenant_{id}/ prefix |
| Tenant requires 7-year retention | Add no-expiry rule for tenant_{id}/compliance/ |
| Export tenant data | mc cp --recursive local/bizfirst-files/tenant_42/ ./export/ |
AWS S3 Lifecycle Rules
On AWS S3, lifecycle rules are configured via the AWS Console, CLI, or Terraform. The equivalent policy:
aws s3api put-bucket-lifecycle-configuration \
--bucket bizfirst-files \
--lifecycle-configuration '{
"Rules": [{
"ID": "bizfirst-storage-lifecycle",
"Status": "Enabled",
"Filter": {"Prefix": ""},
"Transitions": [{"Days": 30, "StorageClass": "STANDARD_IA"}],
"Expiration": {"Days": 365}
}]
}'
Cost Impact
| Scenario | Without Lifecycle | With Lifecycle | Annual Saving |
|---|---|---|---|
| 100 GB dataset, mostly older than 30 days | $6/month (MinIO B2) | ~$3.60/month | ~40% |
| 1 TB dataset, 80% older than 30 days | $60/month | ~$38/month | ~37% |
| After Day 365 — objects deleted | Storage grows unbounded | Capped by expiry | 100% on expired objects |
Restoring Archived Objects
Objects in the cold tier (STANDARD_IA) are still directly accessible — retrieval is immediate on MinIO and incurs a small retrieval fee on AWS S3. For objects that have been expired (deleted), recovery requires a restic restore. See Point-in-Time Restore for the full procedure.