Maintenance
Day-to-day operations for InfraHub Storage — capacity checks, backup verification, MinIO console, log review, and routine housekeeping.
On This Page
Daily Checklist
| Check | Command / Action | Pass Condition |
|---|---|---|
| MinIO container running | docker ps | grep bizfirst-minio | Status = Up |
| Health endpoint responds | curl -f http://minio:9000/minio/health/live | HTTP 200 |
| Disk usage below 80% | Grafana dashboard or mc admin info local | < 80% used |
| Backup ran last night | Check backup container logs or Loki alert | "Backup completed" in logs |
| No capacity exceptions in app logs | Search Loki for StorageCapacityException | Zero occurrences |
Weekly Checklist
| Check | Command / Action | Purpose |
|---|---|---|
| List backup snapshots | docker exec bizfirst-backup restic snapshots | Confirm 7 daily snapshots exist |
| Verify backup integrity | docker exec bizfirst-backup restic check | Detect pack file corruption |
| Review lifecycle rule status | mc ilm ls local/bizfirst-files | Confirm rules are still Enabled |
| Review error rate trend | Grafana — S3 error rate panel | Detect gradual degradation |
| Check disk growth rate | Grafana — Disk Used GB trend over 7 days | Project time to 80% threshold |
Capacity Management
Check Current Disk Usage
# Summary via MinIO admin
mc admin info local
# Per-bucket usage
mc du local/bizfirst-files
# Per-prefix usage (top-level tenant directories)
mc du local/bizfirst-files --depth 1
Identify Large or Unexpected Objects
# List objects sorted by size (largest first)
mc find local/bizfirst-files --larger 50MiB | sort
# Count objects per tenant prefix
mc ls local/bizfirst-files --recursive | grep "tenant_" | awk '{print $5}' | \
sed 's|/.*||' | sort | uniq -c | sort -rn
Trigger Lifecycle Processing Manually
# Force lifecycle rule evaluation (MinIO 2023+)
mc admin lifecycle start local/bizfirst-files
Expanding Storage Capacity
Stop MinIO
docker stop bizfirst-minioResize the Docker volume or attach a larger disk
On Linux, extend the underlying LVM volume or attach a new disk and mount it. Update docker-compose.yml volume mapping if needed.
Restart MinIO
docker start bizfirst-minioVerify new capacity
mc admin info localBackup Verification
List Snapshots
docker exec bizfirst-backup restic snapshots --tag bizfirst-storage
Integrity Check (fast)
docker exec bizfirst-backup restic check
Integrity Check with Data Sampling (thorough — run monthly)
docker exec bizfirst-backup restic check --read-data-subset=20%
Test Restore to Temporary Directory
# Restore latest snapshot to /tmp/test-restore (does not affect live data)
docker exec bizfirst-backup restic restore latest \
--target /tmp/test-restore \
--tag bizfirst-storage
# Confirm files are present
ls /tmp/test-restore/data/
# Clean up
rm -rf /tmp/test-restore
MinIO Console
The MinIO web console is available at http://minio:9001 (or http://localhost:9001 in local dev). Log in with the MINIO_ROOT_USER / MINIO_ROOT_PASSWORD credentials.
| Console Section | Use for |
|---|---|
| Buckets | View bucket list, object counts, storage used |
| Buckets → Browse | Inspect individual objects, view metadata, download files |
| Buckets → Lifecycle | View and edit lifecycle rules without using mc |
| Monitoring | Real-time metrics — disk usage, request rate, error rate |
| Identity → Users | Create and manage access keys for the application |
| Identity → Policies | Configure IAM-style bucket access policies |
Log Review
Application Logs — Key Patterns to Monitor
| Log Message | Source | Action |
|---|---|---|
Disk capacity check failed — write proceeding without guard | MinioCapacityGuard | Prometheus endpoint unreachable — check network |
Write rejected — disk at X% | MinioCapacityGuard | Disk at threshold — immediate capacity action |
[S3ObjectService.Upload] AWS Error | S3ObjectService | S3 API error — check credentials and bucket name |
[S3ObjectService.Exists] AWS Error | S3ObjectService | Connectivity issue — check MinIO container health |
MinIO Container Logs
# Last 100 lines
docker logs bizfirst-minio --tail 100
# Follow in real-time
docker logs bizfirst-minio -f
# Filter for errors
docker logs bizfirst-minio 2>&1 | grep -i error
Backup Container Logs
# Check last backup run
docker logs bizfirst-backup --tail 50
MinIO Upgrades
Take a backup snapshot before upgrading
docker exec bizfirst-backup restic backup /data --tag pre-upgradePull the new MinIO image
docker pull minio/minio:RELEASE.YYYY-MM-DD...Stop and recreate the container
docker compose up -d --no-deps minioVerify health and metrics
curl -f http://minio:9000/minio/health/live
curl http://minio:9000/minio/v2/metrics/cluster | grep minio_node_diskAccess Key Rotation
Rotate MinIO access keys periodically or after a suspected credential compromise.
Create new access key in MinIO Console
Navigate to Identity → Users → serviceaccount → Create Access Key. Copy the new key ID and secret.
Update environment variables
Update MINIO_ACCESS_KEY / MINIO_SECRET_KEY in your secret store (Kubernetes Secret, Docker .env, Vault).
Restart the application
The new credentials are picked up on the next container restart (FileStorageSettings is bound at startup).
Delete the old access key
In MinIO Console, delete the old key to prevent its further use.
Update backup container
Update B2_APPLICATION_KEY_ID / B2_APPLICATION_KEY in the backup container environment if Backblaze B2 keys were also rotated.