Portal Community

On This Page

  1. Lifecycle Overview
  2. Storage Tiers
  3. MinIO Lifecycle Policy
  4. Applying the Policy
  5. Compliance Holds
  6. Per-Tenant Archival
  7. AWS S3 Lifecycle Rules
  8. Cost Impact
  9. Restoring Archived Objects

Lifecycle Overview

InfraHub Storage applies MinIO object lifecycle rules to automatically manage storage cost and compliance over time. Objects progress through three stages:

Day 0–29
Hot — STANDARD
Day 30–364
Cold — STANDARD_IA
Day 365+
Expired / Deleted
Default policy The expiry at Day 365 applies to the default lifecycle rule. Objects under a compliance hold are exempt from expiry until the hold is released.

Storage Tiers

TierStorage ClassActive DaysAccess PatternCost
HotSTANDARD0 – 29Frequent reads/writesFull rate
ColdSTANDARD_IA30 – 364Rare access — audit, legal, retrieval on demand~40% lower
Expired365+Deleted by MinIO lifecycle engineZero
MinIO and storage classes MinIO supports 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
Object Lock requires bucket-level enablement at creation Object Lock cannot be added to an existing bucket. Create a dedicated compliance bucket with versioning and object lock enabled.

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:

ScenarioApproach
Tenant cancels subscriptionApply immediate expiry rule to tenant_{id}/ prefix
Tenant requires 7-year retentionAdd no-expiry rule for tenant_{id}/compliance/
Export tenant datamc 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

ScenarioWithout LifecycleWith LifecycleAnnual 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 deletedStorage grows unboundedCapped by expiry100% 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.

Expired objects are gone from MinIO Once an object reaches Day 365 and the lifecycle engine deletes it, it cannot be recovered from MinIO directly. Ensure your restic backups are current and verified before relying on expiry rules.